4
113
50
1101
3
2
88
45
31
10
5
6
16
3
94
3
3
bin
bin
24
21
13
12
44
35
40
7
219
141
18
22
770
761
Changeset was too big and was cut off... Show full diff
| 1 |
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory") |
|
| 2 |
|
|
| 3 |
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h |
|
| 4 |
HINTS ${COIN_ROOT_DIR}/include
|
|
| 5 |
) |
|
| 6 |
FIND_LIBRARY(COIN_CBC_LIBRARY |
|
| 7 |
NAMES Cbc libCbc |
|
| 8 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 9 |
) |
|
| 10 |
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY |
|
| 11 |
NAMES CbcSolver libCbcSolver |
|
| 12 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 13 |
) |
|
| 14 |
FIND_LIBRARY(COIN_CGL_LIBRARY |
|
| 15 |
NAMES Cgl libCgl |
|
| 16 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 17 |
) |
|
| 18 |
FIND_LIBRARY(COIN_CLP_LIBRARY |
|
| 19 |
NAMES Clp libClp |
|
| 20 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 21 |
) |
|
| 22 |
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY |
|
| 23 |
NAMES CoinUtils libCoinUtils |
|
| 24 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 25 |
) |
|
| 26 |
FIND_LIBRARY(COIN_OSI_LIBRARY |
|
| 27 |
NAMES Osi libOsi |
|
| 28 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 29 |
) |
|
| 30 |
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY |
|
| 31 |
NAMES OsiCbc libOsiCbc |
|
| 32 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 33 |
) |
|
| 34 |
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY |
|
| 35 |
NAMES OsiClp libOsiClp |
|
| 36 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 37 |
) |
|
| 38 |
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY |
|
| 39 |
NAMES OsiVol libOsiVol |
|
| 40 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 41 |
) |
|
| 42 |
FIND_LIBRARY(COIN_VOL_LIBRARY |
|
| 43 |
NAMES Vol libVol |
|
| 44 |
HINTS ${COIN_ROOT_DIR}/lib
|
|
| 45 |
) |
|
| 46 |
|
|
| 47 |
INCLUDE(FindPackageHandleStandardArgs) |
|
| 48 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG |
|
| 49 |
COIN_INCLUDE_DIR |
|
| 50 |
COIN_CBC_LIBRARY |
|
| 51 |
COIN_CBC_SOLVER_LIBRARY |
|
| 52 |
COIN_CGL_LIBRARY |
|
| 53 |
COIN_CLP_LIBRARY |
|
| 54 |
COIN_COIN_UTILS_LIBRARY |
|
| 55 |
COIN_OSI_LIBRARY |
|
| 56 |
COIN_OSI_CBC_LIBRARY |
|
| 57 |
COIN_OSI_CLP_LIBRARY |
|
| 58 |
COIN_OSI_VOL_LIBRARY |
|
| 59 |
COIN_VOL_LIBRARY |
|
| 60 |
) |
|
| 61 |
|
|
| 62 |
IF(COIN_FOUND) |
|
| 63 |
SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
|
|
| 64 |
SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
|
|
| 65 |
SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
|
|
| 66 |
SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
|
|
| 67 |
ENDIF(COIN_FOUND) |
|
| 68 |
|
|
| 69 |
MARK_AS_ADVANCED( |
|
| 70 |
COIN_INCLUDE_DIR |
|
| 71 |
COIN_CBC_LIBRARY |
|
| 72 |
COIN_CBC_SOLVER_LIBRARY |
|
| 73 |
COIN_CGL_LIBRARY |
|
| 74 |
COIN_CLP_LIBRARY |
|
| 75 |
COIN_COIN_UTILS_LIBRARY |
|
| 76 |
COIN_OSI_LIBRARY |
|
| 77 |
COIN_OSI_CBC_LIBRARY |
|
| 78 |
COIN_OSI_CLP_LIBRARY |
|
| 79 |
COIN_OSI_VOL_LIBRARY |
|
| 80 |
COIN_VOL_LIBRARY |
|
| 81 |
) |
|
| 82 |
|
|
| 83 |
IF(COIN_FOUND) |
|
| 84 |
SET(LEMON_HAVE_LP TRUE) |
|
| 85 |
SET(LEMON_HAVE_MIP TRUE) |
|
| 86 |
SET(LEMON_HAVE_CLP TRUE) |
|
| 87 |
SET(LEMON_HAVE_CBC TRUE) |
|
| 88 |
ENDIF(COIN_FOUND) |
| 1 |
SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory") |
|
| 2 |
|
|
| 3 |
FIND_PATH(CPLEX_INCLUDE_DIR |
|
| 4 |
ilcplex/cplex.h |
|
| 5 |
PATHS "C:/ILOG/CPLEX91/include" |
|
| 6 |
PATHS "/opt/ilog/cplex91/include" |
|
| 7 |
HINTS ${CPLEX_ROOT_DIR}/include
|
|
| 8 |
) |
|
| 9 |
FIND_LIBRARY(CPLEX_LIBRARY |
|
| 10 |
cplex91 |
|
| 11 |
PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda" |
|
| 12 |
PATHS "/opt/ilog/cplex91/bin" |
|
| 13 |
HINTS ${CPLEX_ROOT_DIR}/bin
|
|
| 14 |
) |
|
| 15 |
|
|
| 16 |
INCLUDE(FindPackageHandleStandardArgs) |
|
| 17 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR) |
|
| 18 |
|
|
| 19 |
FIND_PATH(CPLEX_BIN_DIR |
|
| 20 |
cplex91.dll |
|
| 21 |
PATHS "C:/ILOG/CPLEX91/bin/x86_win32" |
|
| 22 |
) |
|
| 23 |
|
|
| 24 |
IF(CPLEX_FOUND) |
|
| 25 |
SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
|
|
| 26 |
SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
|
|
| 27 |
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
| 28 |
SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
|
|
| 29 |
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
| 30 |
ENDIF(CPLEX_FOUND) |
|
| 31 |
|
|
| 32 |
MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR) |
|
| 33 |
|
|
| 34 |
IF(CPLEX_FOUND) |
|
| 35 |
SET(LEMON_HAVE_LP TRUE) |
|
| 36 |
SET(LEMON_HAVE_MIP TRUE) |
|
| 37 |
SET(LEMON_HAVE_CPLEX TRUE) |
|
| 38 |
ENDIF(CPLEX_FOUND) |
| 1 |
SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory") |
|
| 2 |
|
|
| 3 |
SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]") |
|
| 4 |
GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE)
|
|
| 5 |
|
|
| 6 |
FIND_PATH(GLPK_INCLUDE_DIR |
|
| 7 |
glpk.h |
|
| 8 |
PATHS ${GLPK_REGKEY}/include
|
|
| 9 |
HINTS ${GLPK_ROOT_DIR}/include
|
|
| 10 |
) |
|
| 11 |
FIND_LIBRARY(GLPK_LIBRARY |
|
| 12 |
glpk |
|
| 13 |
PATHS ${GLPK_REGKEY}/lib
|
|
| 14 |
HINTS ${GLPK_ROOT_DIR}/lib
|
|
| 15 |
) |
|
| 16 |
|
|
| 17 |
IF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY) |
|
| 18 |
FILE(READ ${GLPK_INCLUDE_DIR}/glpk.h GLPK_GLPK_H)
|
|
| 19 |
|
|
| 20 |
STRING(REGEX MATCH "define[ ]+GLP_MAJOR_VERSION[ ]+[0-9]+" GLPK_MAJOR_VERSION_LINE "${GLPK_GLPK_H}")
|
|
| 21 |
STRING(REGEX REPLACE "define[ ]+GLP_MAJOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MAJOR "${GLPK_MAJOR_VERSION_LINE}")
|
|
| 22 |
|
|
| 23 |
STRING(REGEX MATCH "define[ ]+GLP_MINOR_VERSION[ ]+[0-9]+" GLPK_MINOR_VERSION_LINE "${GLPK_GLPK_H}")
|
|
| 24 |
STRING(REGEX REPLACE "define[ ]+GLP_MINOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MINOR "${GLPK_MINOR_VERSION_LINE}")
|
|
| 25 |
|
|
| 26 |
SET(GLPK_VERSION_STRING "${GLPK_VERSION_MAJOR}.${GLPK_VERSION_MINOR}")
|
|
| 27 |
|
|
| 28 |
IF(GLPK_FIND_VERSION) |
|
| 29 |
IF(GLPK_FIND_VERSION_COUNT GREATER 2) |
|
| 30 |
MESSAGE(SEND_ERROR "unexpected version string") |
|
| 31 |
ENDIF(GLPK_FIND_VERSION_COUNT GREATER 2) |
|
| 32 |
|
|
| 33 |
MATH(EXPR GLPK_REQUESTED_VERSION "${GLPK_FIND_VERSION_MAJOR}*100 + ${GLPK_FIND_VERSION_MINOR}")
|
|
| 34 |
MATH(EXPR GLPK_FOUND_VERSION "${GLPK_VERSION_MAJOR}*100 + ${GLPK_VERSION_MINOR}")
|
|
| 35 |
|
|
| 36 |
IF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION) |
|
| 37 |
SET(GLPK_PROPER_VERSION_FOUND FALSE) |
|
| 38 |
ELSE(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION) |
|
| 39 |
SET(GLPK_PROPER_VERSION_FOUND TRUE) |
|
| 40 |
ENDIF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION) |
|
| 41 |
ELSE(GLPK_FIND_VERSION) |
|
| 42 |
SET(GLPK_PROPER_VERSION_FOUND TRUE) |
|
| 43 |
ENDIF(GLPK_FIND_VERSION) |
|
| 44 |
ENDIF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY) |
|
| 45 |
|
|
| 46 |
INCLUDE(FindPackageHandleStandardArgs) |
|
| 47 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND) |
|
| 48 |
|
|
| 49 |
IF(GLPK_FOUND) |
|
| 50 |
SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR})
|
|
| 51 |
SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
|
|
| 52 |
SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
|
|
| 53 |
ENDIF(GLPK_FOUND) |
|
| 54 |
|
|
| 55 |
MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR) |
|
| 56 |
|
|
| 57 |
IF(GLPK_FOUND) |
|
| 58 |
SET(LEMON_HAVE_LP TRUE) |
|
| 59 |
SET(LEMON_HAVE_MIP TRUE) |
|
| 60 |
SET(LEMON_HAVE_GLPK TRUE) |
|
| 61 |
ENDIF(GLPK_FOUND) |
| 1 |
SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory") |
|
| 2 |
SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}")
|
|
| 3 |
|
|
| 4 |
IF(UNIX) |
|
| 5 |
SET(LEMON_LIB_NAME "libemon.a") |
|
| 6 |
ELSEIF(WIN32) |
|
| 7 |
SET(LEMON_LIB_NAME "lemon.lib") |
|
| 8 |
ENDIF(UNIX) |
|
| 9 |
|
|
| 10 |
SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library")
|
|
| 11 |
SET(LEMON_LIBRARIES "${LEMON_LIBRARY}")
|
|
| 12 |
|
|
| 13 |
MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR) |
| 1 |
SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.") |
| 1 |
%!PS-Adobe-3.0 EPSF-3.0 |
|
| 2 |
%%BoundingBox: 15 18 829 570 |
|
| 3 |
%%HiResBoundingBox: 15.1913 18.4493 828.078 569.438 |
|
| 4 |
%%Creator: Karbon14 EPS Exportfilter 0.5 |
|
| 5 |
%%CreationDate: (04/15/06 15:20:26) |
|
| 6 |
%%For: (Balazs Dezso) () |
|
| 7 |
%%Title: () |
|
| 8 |
|
|
| 9 |
/N {newpath} def
|
|
| 10 |
/C {closepath} def
|
|
| 11 |
/m {moveto} def
|
|
| 12 |
/c {curveto} def
|
|
| 13 |
/l {lineto} def
|
|
| 14 |
/s {stroke} def
|
|
| 15 |
/f {fill} def
|
|
| 16 |
/w {setlinewidth} def
|
|
| 17 |
/d {setdash} def
|
|
| 18 |
/r {setrgbcolor} def
|
|
| 19 |
/S {gsave} def
|
|
| 20 |
/R {grestore} def
|
|
| 21 |
|
|
| 22 |
N |
|
| 23 |
251.402 32.047 m |
|
| 24 |
532.945 293.946 814.484 555.844 814.484 555.844 c |
|
| 25 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 26 |
|
|
| 27 |
N |
|
| 28 |
749.012 32.047 m |
|
| 29 |
742.465 293.946 735.918 555.844 735.918 555.844 c |
|
| 30 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 31 |
|
|
| 32 |
N |
|
| 33 |
539.492 32.047 m |
|
| 34 |
637.703 293.946 735.918 555.844 735.918 555.844 c |
|
| 35 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 36 |
|
|
| 37 |
N |
|
| 38 |
172.832 32.047 m |
|
| 39 |
454.375 293.946 735.918 555.844 735.918 555.844 c |
|
| 40 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 41 |
|
|
| 42 |
N |
|
| 43 |
107.355 32.047 m |
|
| 44 |
421.637 293.946 735.918 555.844 735.918 555.844 c |
|
| 45 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 46 |
|
|
| 47 |
N |
|
| 48 |
644.25 555.844 m |
|
| 49 |
696.633 293.946 749.012 32.047 749.012 32.047 c |
|
| 50 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 51 |
|
|
| 52 |
N |
|
| 53 |
474.016 555.844 m |
|
| 54 |
611.516 293.946 749.012 32.047 749.012 32.047 c |
|
| 55 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 56 |
|
|
| 57 |
N |
|
| 58 |
683.535 32.047 m |
|
| 59 |
663.894 293.946 644.25 555.844 644.25 555.844 c |
|
| 60 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 61 |
|
|
| 62 |
N |
|
| 63 |
120.453 555.844 m |
|
| 64 |
401.992 293.946 683.535 32.047 683.535 32.047 c |
|
| 65 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 66 |
|
|
| 67 |
N |
|
| 68 |
28.7853 555.844 m |
|
| 69 |
356.16 293.946 683.535 32.047 683.535 32.047 c |
|
| 70 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 71 |
|
|
| 72 |
N |
|
| 73 |
539.492 32.047 m |
|
| 74 |
546.039 293.946 552.586 555.844 552.586 555.844 c |
|
| 75 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 76 |
|
|
| 77 |
N |
|
| 78 |
316.875 32.047 m |
|
| 79 |
349.613 293.946 382.351 555.844 382.351 555.844 c |
|
| 80 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 81 |
|
|
| 82 |
N |
|
| 83 |
107.355 32.047 m |
|
| 84 |
244.855 293.946 382.351 555.844 382.351 555.844 c |
|
| 85 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 86 |
|
|
| 87 |
N |
|
| 88 |
290.687 555.844 m |
|
| 89 |
375.805 293.946 460.922 32.047 460.922 32.047 c |
|
| 90 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 91 |
|
|
| 92 |
N |
|
| 93 |
120.453 555.844 m |
|
| 94 |
290.687 293.946 460.922 32.047 460.922 32.047 c |
|
| 95 |
[] 0 d 0 0 0 r 1.96407 w s |
|
| 96 |
|
|
| 97 |
N |
|
| 98 |
172.832 32.047 m |
|
| 99 |
146.64 293.946 120.453 555.844 120.453 555.844 c |
|
| 100 |
[] 0 d 1 0 0 r 3.92814 w s |
|
| 101 |
|
|
| 102 |
N |
|
| 103 |
15.6913 555.844 m |
|
| 104 |
15.6913 555.844 l |
|
| 105 |
15.6913 548.614 21.5553 542.75 28.7853 542.75 c |
|
| 106 |
36.0163 542.75 41.8833 548.614 41.8833 555.844 c |
|
| 107 |
41.8833 563.075 36.0163 568.938 28.7853 568.938 c |
|
| 108 |
21.5553 568.938 15.6913 563.075 15.6913 555.844 c |
|
| 109 |
15.6913 555.844 l |
|
| 110 |
C |
|
| 111 |
S 0 0 0 r f R |
|
| 112 |
|
|
| 113 |
N |
|
| 114 |
16.8833 555.844 m |
|
| 115 |
16.8833 555.844 l |
|
| 116 |
16.8833 549.27 22.2113 543.942 28.7853 543.942 c |
|
| 117 |
35.3593 543.942 40.6913 549.27 40.6913 555.844 c |
|
| 118 |
40.6913 562.418 35.3593 567.747 28.7853 567.747 c |
|
| 119 |
22.2113 567.747 16.8833 562.418 16.8833 555.844 c |
|
| 120 |
16.8833 555.844 l |
|
| 121 |
C |
|
| 122 |
S 1 0.5 1 r f R |
|
| 123 |
|
|
| 124 |
N |
|
| 125 |
107.355 555.844 m |
|
| 126 |
107.355 555.844 l |
|
| 127 |
107.355 548.614 113.223 542.75 120.453 542.75 c |
|
| 128 |
127.683 542.75 133.547 548.614 133.547 555.844 c |
|
| 129 |
133.547 563.075 127.683 568.938 120.453 568.938 c |
|
| 130 |
113.223 568.938 107.355 563.075 107.355 555.844 c |
|
| 131 |
107.355 555.844 l |
|
| 132 |
C |
|
| 133 |
S 0 0 0 r f R |
|
| 134 |
|
|
| 135 |
N |
|
| 136 |
108.547 555.844 m |
|
| 137 |
108.547 555.844 l |
|
| 138 |
108.547 549.27 113.879 543.942 120.453 543.942 c |
|
| 139 |
127.027 543.942 132.355 549.27 132.355 555.844 c |
|
| 140 |
132.355 562.418 127.027 567.747 120.453 567.747 c |
|
| 141 |
113.879 567.747 108.547 562.418 108.547 555.844 c |
|
| 142 |
108.547 555.844 l |
|
| 143 |
C |
|
| 144 |
S 1 0 1 r f R |
|
| 145 |
|
|
| 146 |
N |
|
| 147 |
199.019 555.844 m |
|
| 148 |
199.019 555.844 l |
|
| 149 |
199.019 548.614 204.887 542.75 212.117 542.75 c |
|
| 150 |
219.348 542.75 225.211 548.614 225.211 555.844 c |
|
| 151 |
225.211 563.075 219.348 568.938 212.117 568.938 c |
|
| 152 |
204.887 568.938 199.019 563.075 199.019 555.844 c |
|
| 153 |
199.019 555.844 l |
|
| 154 |
C |
|
| 155 |
S 0 0 0 r f R |
|
| 156 |
|
|
| 157 |
N |
|
| 158 |
200.211 555.844 m |
|
| 159 |
200.211 555.844 l |
|
| 160 |
200.211 549.27 205.543 543.942 212.117 543.942 c |
|
| 161 |
218.691 543.942 224.019 549.27 224.019 555.844 c |
|
| 162 |
224.019 562.418 218.691 567.747 212.117 567.747 c |
|
| 163 |
205.543 567.747 200.211 562.418 200.211 555.844 c |
|
| 164 |
200.211 555.844 l |
|
| 165 |
C |
|
| 166 |
S 1 0.5 1 r f R |
|
| 167 |
|
|
| 168 |
N |
|
| 169 |
277.59 555.844 m |
|
| 170 |
277.59 555.844 l |
|
| 171 |
277.59 548.614 283.457 542.75 290.687 542.75 c |
|
| 172 |
297.918 542.75 303.781 548.614 303.781 555.844 c |
|
| 173 |
303.781 563.075 297.918 568.938 290.687 568.938 c |
|
| 174 |
283.457 568.938 277.59 563.075 277.59 555.844 c |
|
| 175 |
277.59 555.844 l |
|
| 176 |
C |
|
| 177 |
S 0 0 0 r f R |
|
| 178 |
|
|
| 179 |
N |
|
| 180 |
278.781 555.844 m |
|
| 181 |
278.781 555.844 l |
|
| 182 |
278.781 549.27 284.113 543.942 290.687 543.942 c |
|
| 183 |
297.262 543.942 302.59 549.27 302.59 555.844 c |
|
| 184 |
302.59 562.418 297.262 567.747 290.687 567.747 c |
|
| 185 |
284.113 567.747 278.781 562.418 278.781 555.844 c |
|
| 186 |
278.781 555.844 l |
|
| 187 |
C |
|
| 188 |
S 1 0 1 r f R |
|
| 189 |
|
|
| 190 |
N |
|
| 191 |
369.258 555.844 m |
|
| 192 |
369.258 555.844 l |
|
| 193 |
369.258 548.614 375.121 542.75 382.351 542.75 c |
|
| 194 |
389.582 542.75 395.445 548.614 395.445 555.844 c |
|
| 195 |
395.445 563.075 389.582 568.938 382.351 568.938 c |
|
| 196 |
375.121 568.938 369.258 563.075 369.258 555.844 c |
|
| 197 |
369.258 555.844 l |
|
| 198 |
C |
|
| 199 |
S 0 0 0 r f R |
|
| 200 |
|
|
| 201 |
N |
|
| 202 |
370.445 555.844 m |
|
| 203 |
370.445 555.844 l |
|
| 204 |
370.445 549.27 375.777 543.942 382.351 543.942 c |
|
| 205 |
388.926 543.942 394.258 549.27 394.258 555.844 c |
|
| 206 |
394.258 562.418 388.926 567.747 382.351 567.747 c |
|
| 207 |
375.777 567.747 370.445 562.418 370.445 555.844 c |
|
| 208 |
370.445 555.844 l |
|
| 209 |
C |
|
| 210 |
S 1 0 1 r f R |
|
| 211 |
|
|
| 212 |
N |
|
| 213 |
460.922 555.844 m |
|
| 214 |
460.922 555.844 l |
|
| 215 |
460.922 548.614 466.785 542.75 474.016 542.75 c |
|
| 216 |
481.246 542.75 487.109 548.614 487.109 555.844 c |
|
| 217 |
487.109 563.075 481.246 568.938 474.016 568.938 c |
|
| 218 |
466.785 568.938 460.922 563.075 460.922 555.844 c |
|
| 219 |
460.922 555.844 l |
|
| 220 |
C |
|
| 221 |
S 0 0 0 r f R |
|
| 222 |
|
|
| 223 |
N |
|
| 224 |
462.113 555.844 m |
|
| 225 |
462.113 555.844 l |
|
| 226 |
462.113 549.27 467.441 543.942 474.016 543.942 c |
|
| 227 |
480.59 543.942 485.922 549.27 485.922 555.844 c |
|
| 228 |
485.922 562.418 480.59 567.747 474.016 567.747 c |
|
| 229 |
467.441 567.747 462.113 562.418 462.113 555.844 c |
|
| 230 |
462.113 555.844 l |
|
| 231 |
C |
|
| 232 |
S 1 0.5 1 r f R |
|
| 233 |
|
|
| 234 |
N |
|
| 235 |
539.492 555.844 m |
|
| 236 |
539.492 555.844 l |
|
| 237 |
539.492 548.614 545.355 542.75 552.586 542.75 c |
|
| 238 |
559.816 542.75 565.68 548.614 565.68 555.844 c |
|
| 239 |
565.68 563.075 559.816 568.938 552.586 568.938 c |
|
| 240 |
545.355 568.938 539.492 563.075 539.492 555.844 c |
|
| 241 |
539.492 555.844 l |
|
| 242 |
C |
|
| 243 |
S 0 0 0 r f R |
|
| 244 |
|
|
| 245 |
N |
|
| 246 |
540.683 555.844 m |
|
| 247 |
540.683 555.844 l |
|
| 248 |
540.683 549.27 546.012 543.942 552.586 543.942 c |
|
| 249 |
559.16 543.942 564.492 549.27 564.492 555.844 c |
|
| 250 |
564.492 562.418 559.16 567.747 552.586 567.747 c |
|
| 251 |
546.012 567.747 540.683 562.418 540.683 555.844 c |
|
| 252 |
540.683 555.844 l |
|
| 253 |
C |
|
| 254 |
S 1 0 1 r f R |
|
| 255 |
|
|
| 256 |
N |
|
| 257 |
631.156 555.844 m |
|
| 258 |
631.156 555.844 l |
|
| 259 |
631.156 548.614 637.019 542.75 644.25 542.75 c |
|
| 260 |
651.48 542.75 657.348 548.614 657.348 555.844 c |
|
| 261 |
657.348 563.075 651.48 568.938 644.25 568.938 c |
|
| 262 |
637.019 568.938 631.156 563.075 631.156 555.844 c |
|
| 263 |
631.156 555.844 l |
|
| 264 |
C |
|
| 265 |
S 0 0 0 r f R |
|
| 266 |
|
|
| 267 |
N |
|
| 268 |
632.348 555.844 m |
|
| 269 |
632.348 555.844 l |
|
| 270 |
632.348 549.27 637.676 543.942 644.25 543.942 c |
|
| 271 |
650.824 543.942 656.156 549.27 656.156 555.844 c |
|
| 272 |
656.156 562.418 650.824 567.747 644.25 567.747 c |
|
| 273 |
637.676 567.747 632.348 562.418 632.348 555.844 c |
|
| 274 |
632.348 555.844 l |
|
| 275 |
C |
|
| 276 |
S 1 0.5 1 r f R |
|
| 277 |
|
|
| 278 |
N |
|
| 279 |
722.82 555.844 m |
|
| 280 |
722.82 555.844 l |
|
| 281 |
722.82 548.614 728.687 542.75 735.918 542.75 c |
|
| 282 |
743.149 542.75 749.012 548.614 749.012 555.844 c |
|
| 283 |
749.012 563.075 743.149 568.938 735.918 568.938 c |
|
| 284 |
728.687 568.938 722.82 563.075 722.82 555.844 c |
|
| 285 |
722.82 555.844 l |
|
| 286 |
C |
|
| 287 |
S 0 0 0 r f R |
|
| 288 |
|
|
| 289 |
N |
|
| 290 |
724.012 555.844 m |
|
| 291 |
724.012 555.844 l |
|
| 292 |
724.012 549.27 729.344 543.942 735.918 543.942 c |
|
| 293 |
742.492 543.942 747.82 549.27 747.82 555.844 c |
|
| 294 |
747.82 562.418 742.492 567.747 735.918 567.747 c |
|
| 295 |
729.344 567.747 724.012 562.418 724.012 555.844 c |
|
| 296 |
724.012 555.844 l |
|
| 297 |
C |
|
| 298 |
S 1 0 1 r f R |
|
| 299 |
|
|
| 300 |
N |
|
| 301 |
801.391 555.844 m |
|
| 302 |
801.391 555.844 l |
|
| 303 |
801.391 548.614 807.254 542.75 814.484 542.75 c |
|
| 304 |
821.715 542.75 827.578 548.614 827.578 555.844 c |
|
| 305 |
827.578 563.075 821.715 568.938 814.484 568.938 c |
|
| 306 |
807.254 568.938 801.391 563.075 801.391 555.844 c |
|
| 307 |
801.391 555.844 l |
|
| 308 |
C |
|
| 309 |
S 0 0 0 r f R |
|
| 310 |
|
|
| 311 |
N |
|
| 312 |
802.582 555.844 m |
|
| 313 |
802.582 555.844 l |
|
| 314 |
802.582 549.27 807.91 543.942 814.484 543.942 c |
|
| 315 |
821.059 543.942 826.387 549.27 826.387 555.844 c |
|
| 316 |
826.387 562.418 821.059 567.747 814.484 567.747 c |
|
| 317 |
807.91 567.747 802.582 562.418 802.582 555.844 c |
|
| 318 |
802.582 555.844 l |
|
| 319 |
C |
|
| 320 |
S 1 0 1 r f R |
|
| 321 |
|
|
| 322 |
N |
|
| 323 |
15.6913 32.047 m |
|
| 324 |
15.6913 32.047 l |
|
| 325 |
15.6913 24.8165 21.5553 18.9493 28.7853 18.9493 c |
|
| 326 |
36.0163 18.9493 41.8833 24.8165 41.8833 32.047 c |
|
| 327 |
41.8833 39.2775 36.0163 45.1407 28.7853 45.1407 c |
|
| 328 |
21.5553 45.1407 15.6913 39.2775 15.6913 32.047 c |
|
| 329 |
15.6913 32.047 l |
|
| 330 |
C |
|
| 331 |
S 0 0 0 r f R |
|
| 332 |
|
|
| 333 |
N |
|
| 334 |
16.8833 32.047 m |
|
| 335 |
16.8833 32.047 l |
|
| 336 |
16.8833 25.4728 22.2113 20.1407 28.7853 20.1407 c |
|
| 337 |
35.3593 20.1407 40.6913 25.4728 40.6913 32.047 c |
|
| 338 |
40.6913 38.6212 35.3593 43.9493 28.7853 43.9493 c |
|
| 339 |
22.2113 43.9493 16.8833 38.6212 16.8833 32.047 c |
|
| 340 |
16.8833 32.047 l |
|
| 341 |
C |
|
| 342 |
S 0.5 0.5 1 r f R |
|
| 343 |
|
|
| 344 |
N |
|
| 345 |
94.2623 32.047 m |
|
| 346 |
94.2623 32.047 l |
|
| 347 |
94.2623 24.8165 100.125 18.9493 107.355 18.9493 c |
|
| 348 |
114.586 18.9493 120.453 24.8165 120.453 32.047 c |
|
| 349 |
120.453 39.2775 114.586 45.1407 107.355 45.1407 c |
|
| 350 |
100.125 45.1407 94.2623 39.2775 94.2623 32.047 c |
|
| 351 |
94.2623 32.047 l |
|
| 352 |
C |
|
| 353 |
S 0 0 0 r f R |
|
| 354 |
|
|
| 355 |
N |
|
| 356 |
95.4533 32.047 m |
|
| 357 |
95.4533 32.047 l |
|
| 358 |
95.4533 25.4728 100.781 20.1407 107.355 20.1407 c |
|
| 359 |
113.93 20.1407 119.262 25.4728 119.262 32.047 c |
|
| 360 |
119.262 38.6212 113.93 43.9493 107.355 43.9493 c |
|
| 361 |
100.781 43.9493 95.4533 38.6212 95.4533 32.047 c |
|
| 362 |
95.4533 32.047 l |
|
| 363 |
C |
|
| 364 |
S 0.5 0.5 1 r f R |
|
| 365 |
|
|
| 366 |
N |
|
| 367 |
159.734 32.047 m |
|
| 368 |
159.734 32.047 l |
|
| 369 |
159.734 24.8165 165.601 18.9493 172.832 18.9493 c |
|
| 370 |
180.062 18.9493 185.926 24.8165 185.926 32.047 c |
|
| 371 |
185.926 39.2775 180.062 45.1407 172.832 45.1407 c |
|
| 372 |
165.601 45.1407 159.734 39.2775 159.734 32.047 c |
|
| 373 |
159.734 32.047 l |
|
| 374 |
C |
|
| 375 |
S 0 0 0 r f R |
|
| 376 |
|
|
| 377 |
N |
|
| 378 |
160.926 32.047 m |
|
| 379 |
160.926 32.047 l |
|
| 380 |
160.926 25.4728 166.258 20.1407 172.832 20.1407 c |
|
| 381 |
179.406 20.1407 184.734 25.4728 184.734 32.047 c |
|
| 382 |
184.734 38.6212 179.406 43.9493 172.832 43.9493 c |
|
| 383 |
166.258 43.9493 160.926 38.6212 160.926 32.047 c |
|
| 384 |
160.926 32.047 l |
|
| 385 |
C |
|
| 386 |
S 0.5 0.5 1 r f R |
|
| 387 |
|
|
| 388 |
N |
|
| 389 |
238.305 32.047 m |
|
| 390 |
238.305 32.047 l |
|
| 391 |
238.305 24.8165 244.172 18.9493 251.402 18.9493 c |
|
| 392 |
258.633 18.9493 264.496 24.8165 264.496 32.047 c |
|
| 393 |
264.496 39.2775 258.633 45.1407 251.402 45.1407 c |
|
| 394 |
244.172 45.1407 238.305 39.2775 238.305 32.047 c |
|
| 395 |
238.305 32.047 l |
|
| 396 |
C |
|
| 397 |
S 0 0 0 r f R |
|
| 398 |
|
|
| 399 |
N |
|
| 400 |
239.496 32.047 m |
|
| 401 |
239.496 32.047 l |
|
| 402 |
239.496 25.4728 244.828 20.1407 251.402 20.1407 c |
|
| 403 |
257.976 20.1407 263.305 25.4728 263.305 32.047 c |
|
| 404 |
263.305 38.6212 257.976 43.9493 251.402 43.9493 c |
|
| 405 |
244.828 43.9493 239.496 38.6212 239.496 32.047 c |
|
| 406 |
239.496 32.047 l |
|
| 407 |
C |
|
| 408 |
S 0.5 0.5 1 r f R |
|
| 409 |
|
|
| 410 |
N |
|
| 411 |
303.781 32.047 m |
|
| 412 |
303.781 32.047 l |
|
| 413 |
303.781 24.8165 309.644 18.9493 316.875 18.9493 c |
|
| 414 |
324.105 18.9493 329.973 24.8165 329.973 32.047 c |
|
| 415 |
329.973 39.2775 324.105 45.1407 316.875 45.1407 c |
|
| 416 |
309.644 45.1407 303.781 39.2775 303.781 32.047 c |
|
| 417 |
303.781 32.047 l |
|
| 418 |
C |
|
| 419 |
S 0 0 0 r f R |
|
| 420 |
|
|
| 421 |
N |
|
| 422 |
304.973 32.047 m |
|
| 423 |
304.973 32.047 l |
|
| 424 |
304.973 25.4728 310.301 20.1407 316.875 20.1407 c |
|
| 425 |
323.449 20.1407 328.781 25.4728 328.781 32.047 c |
|
| 426 |
328.781 38.6212 323.449 43.9493 316.875 43.9493 c |
|
| 427 |
310.301 43.9493 304.973 38.6212 304.973 32.047 c |
|
| 428 |
304.973 32.047 l |
|
| 429 |
C |
|
| 430 |
S 0.5 0.5 1 r f R |
|
| 431 |
|
|
| 432 |
N |
|
| 433 |
382.351 32.047 m |
|
| 434 |
382.351 32.047 l |
|
| 435 |
382.351 24.8165 388.215 18.9493 395.445 18.9493 c |
|
| 436 |
402.676 18.9493 408.543 24.8165 408.543 32.047 c |
|
| 437 |
408.543 39.2775 402.676 45.1407 395.445 45.1407 c |
|
| 438 |
388.215 45.1407 382.351 39.2775 382.351 32.047 c |
|
| 439 |
382.351 32.047 l |
|
| 440 |
C |
|
| 441 |
S 0 0 0 r f R |
|
| 442 |
|
|
| 443 |
N |
|
| 444 |
383.543 32.047 m |
|
| 445 |
383.543 32.047 l |
|
| 446 |
383.543 25.4728 388.871 20.1407 395.445 20.1407 c |
|
| 447 |
402.019 20.1407 407.351 25.4728 407.351 32.047 c |
|
| 448 |
407.351 38.6212 402.019 43.9493 395.445 43.9493 c |
|
| 449 |
388.871 43.9493 383.543 38.6212 383.543 32.047 c |
|
| 450 |
383.543 32.047 l |
|
| 451 |
C |
|
| 452 |
S 0.5 0.5 1 r f R |
|
| 453 |
|
|
| 454 |
N |
|
| 455 |
447.828 32.047 m |
|
| 456 |
447.828 32.047 l |
|
| 457 |
447.828 24.8165 453.691 18.9493 460.922 18.9493 c |
|
| 458 |
468.152 18.9493 474.016 24.8165 474.016 32.047 c |
|
| 459 |
474.016 39.2775 468.152 45.1407 460.922 45.1407 c |
|
| 460 |
453.691 45.1407 447.828 39.2775 447.828 32.047 c |
|
| 461 |
447.828 32.047 l |
|
| 462 |
C |
|
| 463 |
S 0 0 0 r f R |
|
| 464 |
|
|
| 465 |
N |
|
| 466 |
449.016 32.047 m |
|
| 467 |
449.016 32.047 l |
|
| 468 |
449.016 25.4728 454.348 20.1407 460.922 20.1407 c |
|
| 469 |
467.496 20.1407 472.824 25.4728 472.824 32.047 c |
|
| 470 |
472.824 38.6212 467.496 43.9493 460.922 43.9493 c |
|
| 471 |
454.348 43.9493 449.016 38.6212 449.016 32.047 c |
|
| 472 |
449.016 32.047 l |
|
| 473 |
C |
|
| 474 |
S 0.5 0.5 1 r f R |
|
| 475 |
|
|
| 476 |
N |
|
| 477 |
526.394 32.047 m |
|
| 478 |
526.394 32.047 l |
|
| 479 |
526.394 24.8165 532.262 18.9493 539.492 18.9493 c |
|
| 480 |
546.723 18.9493 552.586 24.8165 552.586 32.047 c |
|
| 481 |
552.586 39.2775 546.723 45.1407 539.492 45.1407 c |
|
| 482 |
532.262 45.1407 526.394 39.2775 526.394 32.047 c |
|
| 483 |
526.394 32.047 l |
|
| 484 |
C |
|
| 485 |
S 0 0 0 r f R |
|
| 486 |
|
|
| 487 |
N |
|
| 488 |
527.586 32.047 m |
|
| 489 |
527.586 32.047 l |
|
| 490 |
527.586 25.4728 532.918 20.1407 539.492 20.1407 c |
|
| 491 |
546.066 20.1407 551.394 25.4728 551.394 32.047 c |
|
| 492 |
551.394 38.6212 546.066 43.9493 539.492 43.9493 c |
|
| 493 |
532.918 43.9493 527.586 38.6212 527.586 32.047 c |
|
| 494 |
527.586 32.047 l |
|
| 495 |
C |
|
| 496 |
S 0.5 0.5 1 r f R |
|
| 497 |
|
|
| 498 |
N |
|
| 499 |
591.871 32.047 m |
|
| 500 |
591.871 32.047 l |
|
| 501 |
591.871 24.8165 597.734 18.9493 604.965 18.9493 c |
|
| 502 |
612.195 18.9493 618.062 24.8165 618.062 32.047 c |
|
| 503 |
618.062 39.2775 612.195 45.1407 604.965 45.1407 c |
|
| 504 |
597.734 45.1407 591.871 39.2775 591.871 32.047 c |
|
| 505 |
591.871 32.047 l |
|
| 506 |
C |
|
| 507 |
S 0 0 0 r f R |
|
| 508 |
|
|
| 509 |
N |
|
| 510 |
593.062 32.047 m |
|
| 511 |
593.062 32.047 l |
|
| 512 |
593.062 25.4728 598.39 20.1407 604.965 20.1407 c |
|
| 513 |
611.539 20.1407 616.871 25.4728 616.871 32.047 c |
|
| 514 |
616.871 38.6212 611.539 43.9493 604.965 43.9493 c |
|
| 515 |
598.39 43.9493 593.062 38.6212 593.062 32.047 c |
|
| 516 |
593.062 32.047 l |
|
| 517 |
C |
|
| 518 |
S 0.5 0.5 1 r f R |
|
| 519 |
|
|
| 520 |
N |
|
| 521 |
670.441 32.047 m |
|
| 522 |
670.441 32.047 l |
|
| 523 |
670.441 24.8165 676.305 18.9493 683.535 18.9493 c |
|
| 524 |
690.766 18.9493 696.633 24.8165 696.633 32.047 c |
|
| 525 |
696.633 39.2775 690.766 45.1407 683.535 45.1407 c |
|
| 526 |
676.305 45.1407 670.441 39.2775 670.441 32.047 c |
|
| 527 |
670.441 32.047 l |
|
| 528 |
C |
|
| 529 |
S 0 0 0 r f R |
|
| 530 |
|
|
| 531 |
N |
|
| 532 |
671.633 32.047 m |
|
| 533 |
671.633 32.047 l |
|
| 534 |
671.633 25.4728 676.961 20.1407 683.535 20.1407 c |
|
| 535 |
690.109 20.1407 695.441 25.4728 695.441 32.047 c |
|
| 536 |
695.441 38.6212 690.109 43.9493 683.535 43.9493 c |
|
| 537 |
676.961 43.9493 671.633 38.6212 671.633 32.047 c |
|
| 538 |
671.633 32.047 l |
|
| 539 |
C |
|
| 540 |
S 0 0 1 r f R |
|
| 541 |
|
|
| 542 |
N |
|
| 543 |
735.918 32.047 m |
|
| 544 |
735.918 32.047 l |
|
| 545 |
735.918 24.8165 741.781 18.9493 749.012 18.9493 c |
|
| 546 |
756.242 18.9493 762.106 24.8165 762.106 32.047 c |
|
| 547 |
762.106 39.2775 756.242 45.1407 749.012 45.1407 c |
|
| 548 |
741.781 45.1407 735.918 39.2775 735.918 32.047 c |
|
| 549 |
735.918 32.047 l |
|
| 550 |
C |
|
| 551 |
S 0 0 0 r f R |
|
| 552 |
|
|
| 553 |
N |
|
| 554 |
737.105 32.047 m |
|
| 555 |
737.105 32.047 l |
|
| 556 |
737.105 25.4728 742.437 20.1407 749.012 20.1407 c |
|
| 557 |
755.586 20.1407 760.914 25.4728 760.914 32.047 c |
|
| 558 |
760.914 38.6212 755.586 43.9493 749.012 43.9493 c |
|
| 559 |
742.437 43.9493 737.105 38.6212 737.105 32.047 c |
|
| 560 |
737.105 32.047 l |
|
| 561 |
C |
|
| 562 |
S 0 0 1 r f R |
|
| 563 |
|
|
| 564 |
N |
|
| 565 |
801.391 32.047 m |
|
| 566 |
801.391 32.047 l |
|
| 567 |
801.391 24.8165 807.254 18.9493 814.484 18.9493 c |
|
| 568 |
821.715 18.9493 827.578 24.8165 827.578 32.047 c |
|
| 569 |
827.578 39.2775 821.715 45.1407 814.484 45.1407 c |
|
| 570 |
807.254 45.1407 801.391 39.2775 801.391 32.047 c |
|
| 571 |
801.391 32.047 l |
|
| 572 |
C |
|
| 573 |
S 0 0 0 r f R |
|
| 574 |
|
|
| 575 |
N |
|
| 576 |
802.582 32.047 m |
|
| 577 |
802.582 32.047 l |
|
| 578 |
802.582 25.4728 807.91 20.1407 814.484 20.1407 c |
|
| 579 |
821.059 20.1407 826.387 25.4728 826.387 32.047 c |
|
| 580 |
826.387 38.6212 821.059 43.9493 814.484 43.9493 c |
|
| 581 |
807.91 43.9493 802.582 38.6212 802.582 32.047 c |
|
| 582 |
802.582 32.047 l |
|
| 583 |
C |
|
| 584 |
S 0.5 0.5 1 r f R |
|
| 585 |
|
|
| 586 |
%%EOF |
| 1 |
%!PS-Adobe-2.0 EPSF-2.0 |
|
| 2 |
%%Creator: LEMON, graphToEps() |
|
| 3 |
%%CreationDate: Tue Nov 15 16:51:43 2005 |
|
| 4 |
%%BoundingBox: 0 0 842 596 |
|
| 5 |
%%EndComments |
|
| 6 |
/lb { setlinewidth setrgbcolor newpath moveto
|
|
| 7 |
4 2 roll 1 index 1 index curveto stroke } bind def |
|
| 8 |
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
|
|
| 9 |
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
|
|
| 10 |
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
|
|
| 11 |
2 index 1 index sub 2 index 2 index add lineto |
|
| 12 |
2 index 1 index sub 2 index 2 index sub lineto |
|
| 13 |
2 index 1 index add 2 index 2 index sub lineto |
|
| 14 |
closepath pop pop pop} bind def |
|
| 15 |
/di { newpath 2 index 1 index add 2 index moveto
|
|
| 16 |
2 index 2 index 2 index add lineto |
|
| 17 |
2 index 1 index sub 2 index lineto |
|
| 18 |
2 index 2 index 2 index sub lineto |
|
| 19 |
closepath pop pop pop} bind def |
|
| 20 |
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
|
|
| 21 |
setrgbcolor 1.1 div c fill |
|
| 22 |
} bind def |
|
| 23 |
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
|
|
| 24 |
setrgbcolor 1.1 div sq fill |
|
| 25 |
} bind def |
|
| 26 |
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
|
|
| 27 |
setrgbcolor 1.1 div di fill |
|
| 28 |
} bind def |
|
| 29 |
/arrl 1 def |
|
| 30 |
/arrw 0.3 def |
|
| 31 |
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
|
|
| 32 |
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
|
|
| 33 |
/w exch def /len exch def |
|
| 34 |
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto |
|
| 35 |
len w sub arrl sub dx dy lrl |
|
| 36 |
arrw dy dx neg lrl |
|
| 37 |
dx arrl w add mul dy w 2 div arrw add mul sub |
|
| 38 |
dy arrl w add mul dx w 2 div arrw add mul add rlineto |
|
| 39 |
dx arrl w add mul neg dy w 2 div arrw add mul sub |
|
| 40 |
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto |
|
| 41 |
arrw dy dx neg lrl |
|
| 42 |
len w sub arrl sub neg dx dy lrl |
|
| 43 |
closepath fill } bind def |
|
| 44 |
/cshow { 2 index 2 index moveto dup stringwidth pop
|
|
| 45 |
neg 2 div fosi .35 mul neg rmoveto show pop pop} def |
|
| 46 |
|
|
| 47 |
gsave |
|
| 48 |
90 rotate |
|
| 49 |
0 -842 translate |
|
| 50 |
71.6378 15 translate |
|
| 51 |
0.389093 dup scale |
|
| 52 |
90 rotate |
|
| 53 |
1197.47 -613.138 translate |
|
| 54 |
%Edges: |
|
| 55 |
gsave |
|
| 56 |
513.857 -446.322 296.569 -487.43 79.2808 -528.539 0 0 0 2 lb |
|
| 57 |
513.857 -446.322 575.52 -315.655 637.183 -184.989 0 0 0 2 lb |
|
| 58 |
393.468 566.711 494.771 434.577 596.074 302.442 0 0 0 2 lb |
|
| 59 |
393.468 566.711 155.625 579.925 -82.2171 593.138 0 0 0 2 lb |
|
| 60 |
393.468 566.711 251.056 450.726 108.644 334.741 0 0 0 2 lb |
|
| 61 |
869.153 52.8539 732.613 177.648 596.074 302.442 0 0 0 2 lb |
|
| 62 |
869.153 52.8539 753.168 -66.0676 637.183 -184.989 0 0 0 2 lb |
|
| 63 |
-82.2171 593.138 -91.0261 346.487 -99.8351 99.8351 0 0 0 2 lb |
|
| 64 |
-663.61 546.157 -753.168 394.936 -842.726 243.715 0 0 0 2 lb |
|
| 65 |
-663.61 546.157 -574.052 437.513 -484.494 328.869 0 0 0 2 lb |
|
| 66 |
-1077.63 161.498 -960.178 202.606 -842.726 243.715 0 0 0 2 lb |
|
| 67 |
-1077.63 161.498 -968.987 66.0674 -860.344 -29.3633 0 0 0 2 lb |
|
| 68 |
-1177.47 -234.906 -1029.18 -381.722 -880.898 -528.539 0 0 0 2 lb |
|
| 69 |
-1177.47 -234.906 -1018.91 -132.135 -860.344 -29.3633 0 0 0 2 lb |
|
| 70 |
-880.898 -528.539 -744.359 -387.595 -607.82 -246.651 0 0 0 2 lb |
|
| 71 |
-499.175 -499.175 -355.295 -475.685 -211.415 -452.194 0 0 0 2 lb |
|
| 72 |
-499.175 -499.175 -553.498 -372.913 -607.82 -246.651 0 0 0 2 lb |
|
| 73 |
-499.175 -499.175 -386.587 -315.087 -274 -131 0 0 0 2 lb |
|
| 74 |
79.2808 -528.539 -66.0671 -490.366 -211.415 -452.194 0 0 0 2 lb |
|
| 75 |
637.183 -184.989 421.363 -253.993 205.543 -322.996 0 0 0 2 lb |
|
| 76 |
205.543 -322.996 162.966 -226.097 120.389 -129.198 0 0 0 2 lb |
|
| 77 |
399.34 88.0898 259.865 -20.5541 120.389 -129.198 0 0 0 2 lb |
|
| 78 |
399.34 88.0898 253.992 211.415 108.644 334.741 0 0 0 2 lb |
|
| 79 |
-842.726 243.715 -471.281 171.775 -99.8351 99.8351 0 0 0 2 lb |
|
| 80 |
-842.726 243.715 -558.363 56.3575 -274 -131 0 0 0 2 lb |
|
| 81 |
-860.344 -29.3633 -734.082 -138.007 -607.82 -246.651 0 0 0 2 lb |
|
| 82 |
-211.415 -452.194 -45.513 -290.696 120.389 -129.198 0 0 0 2 lb |
|
| 83 |
-99.8351 99.8351 4.40445 217.288 108.644 334.741 0 0 0 2 lb |
|
| 84 |
-99.8351 99.8351 -292.165 214.352 -484.494 328.869 0 0 0 2 lb |
|
| 85 |
120.389 -129.198 -76.8055 -130.099 -274 -131 0 0 0 2 lb |
|
| 86 |
grestore |
|
| 87 |
%Nodes: |
|
| 88 |
gsave |
|
| 89 |
-274 -131 20 1 0 0 nc |
|
| 90 |
-607.82 -246.651 20 1 0 0 nc |
|
| 91 |
-484.494 328.869 20 0 0 1 nc |
|
| 92 |
108.644 334.741 20 0 0 1 nc |
|
| 93 |
120.389 -129.198 20 0 0 1 nc |
|
| 94 |
-99.8351 99.8351 20 1 0 0 nc |
|
| 95 |
-211.415 -452.194 20 1 0 0 nc |
|
| 96 |
-860.344 -29.3633 20 0 0 1 nc |
|
| 97 |
-842.726 243.715 20 0 0 1 nc |
|
| 98 |
399.34 88.0898 20 1 0 0 nc |
|
| 99 |
205.543 -322.996 20 1 0 0 nc |
|
| 100 |
637.183 -184.989 20 0 0 1 nc |
|
| 101 |
79.2808 -528.539 20 0 0 1 nc |
|
| 102 |
-499.175 -499.175 20 0 0 1 nc |
|
| 103 |
-880.898 -528.539 20 0 0 1 nc |
|
| 104 |
-1177.47 -234.906 20 1 0 0 nc |
|
| 105 |
-1077.63 161.498 20 1 0 0 nc |
|
| 106 |
-663.61 546.157 20 1 0 0 nc |
|
| 107 |
-82.2171 593.138 20 0 0 1 nc |
|
| 108 |
596.074 302.442 20 0 0 1 nc |
|
| 109 |
869.153 52.8539 20 1 0 0 nc |
|
| 110 |
393.468 566.711 20 1 0 0 nc |
|
| 111 |
513.857 -446.322 20 1 0 0 nc |
|
| 112 |
grestore |
|
| 113 |
grestore |
|
| 114 |
showpage |
| 1 |
%!PS-Adobe-2.0 EPSF-2.0 |
|
| 2 |
%%Creator: LEMON, graphToEps() |
|
| 3 |
%%CreationDate: Fri Nov 4 13:47:12 2005 |
|
| 4 |
%%BoundingBox: 0 0 842 596 |
|
| 5 |
%%EndComments |
|
| 6 |
/lb { setlinewidth setrgbcolor newpath moveto
|
|
| 7 |
4 2 roll 1 index 1 index curveto stroke } bind def |
|
| 8 |
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
|
|
| 9 |
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
|
|
| 10 |
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
|
|
| 11 |
2 index 1 index sub 2 index 2 index add lineto |
|
| 12 |
2 index 1 index sub 2 index 2 index sub lineto |
|
| 13 |
2 index 1 index add 2 index 2 index sub lineto |
|
| 14 |
closepath pop pop pop} bind def |
|
| 15 |
/di { newpath 2 index 1 index add 2 index moveto
|
|
| 16 |
2 index 2 index 2 index add lineto |
|
| 17 |
2 index 1 index sub 2 index lineto |
|
| 18 |
2 index 2 index 2 index sub lineto |
|
| 19 |
closepath pop pop pop} bind def |
|
| 20 |
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
|
|
| 21 |
setrgbcolor 1.1 div c fill |
|
| 22 |
} bind def |
|
| 23 |
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
|
|
| 24 |
setrgbcolor 1.1 div sq fill |
|
| 25 |
} bind def |
|
| 26 |
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
|
|
| 27 |
setrgbcolor 1.1 div di fill |
|
| 28 |
} bind def |
|
| 29 |
/arrl 1 def |
|
| 30 |
/arrw 0.3 def |
|
| 31 |
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
|
|
| 32 |
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
|
|
| 33 |
/w exch def /len exch def |
|
| 34 |
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto |
|
| 35 |
len w sub arrl sub dx dy lrl |
|
| 36 |
arrw dy dx neg lrl |
|
| 37 |
dx arrl w add mul dy w 2 div arrw add mul sub |
|
| 38 |
dy arrl w add mul dx w 2 div arrw add mul add rlineto |
|
| 39 |
dx arrl w add mul neg dy w 2 div arrw add mul sub |
|
| 40 |
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto |
|
| 41 |
arrw dy dx neg lrl |
|
| 42 |
len w sub arrl sub neg dx dy lrl |
|
| 43 |
closepath fill } bind def |
|
| 44 |
/cshow { 2 index 2 index moveto dup stringwidth pop
|
|
| 45 |
neg 2 div fosi .35 mul neg rmoveto show pop pop} def |
|
| 46 |
|
|
| 47 |
gsave |
|
| 48 |
90 rotate |
|
| 49 |
0 -842 translate |
|
| 50 |
71.0944 15 translate |
|
| 51 |
0.434694 dup scale |
|
| 52 |
90 rotate |
|
| 53 |
860.856 -588.349 translate |
|
| 54 |
%Edges: |
|
| 55 |
gsave |
|
| 56 |
574.035 177.301 622.149 225.748 670.264 274.195 0 0 0 2 lb |
|
| 57 |
694.579 115.483 682.421 194.839 670.264 274.195 0 0 0 2 lb |
|
| 58 |
280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 0 2 lb |
|
| 59 |
280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 0 2 lb |
|
| 60 |
212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 0 2 lb |
|
| 61 |
286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 0 2 lb |
|
| 62 |
286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 0 2 lb |
|
| 63 |
438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 0 2 lb |
|
| 64 |
438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 0 2 lb |
|
| 65 |
397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 0 2 lb |
|
| 66 |
366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 0 2 lb |
|
| 67 |
271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 0 2 lb |
|
| 68 |
271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 0 2 lb |
|
| 69 |
277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 0 2 lb |
|
| 70 |
-840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0 0 2 lb |
|
| 71 |
-579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0 2 lb |
|
| 72 |
-579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0 2 lb |
|
| 73 |
-767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0 2 lb |
|
| 74 |
906.312 201.403 946.592 42.798 986.873 -115.807 0 0 0 2 lb |
|
| 75 |
906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 0 2 lb |
|
| 76 |
986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 0 2 lb |
|
| 77 |
-470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0 0 0 2 lb |
|
| 78 |
422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 0 2 lb |
|
| 79 |
422.945 521.129 376.371 417.911 329.797 314.692 0 0 0 2 lb |
|
| 80 |
422.945 521.129 474.554 276.928 526.164 32.7279 0 0 0 2 lb |
|
| 81 |
-5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 0 2 lb |
|
| 82 |
329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 0 2 lb |
|
| 83 |
-67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 0 2 lb |
|
| 84 |
762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 0 2 lb |
|
| 85 |
762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 0 2 lb |
|
| 86 |
526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 0 2 lb |
|
| 87 |
730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 0 2 lb |
|
| 88 |
415.393 -289.516 173.71 -318.468 -67.9734 -347.42 0 0 0 2 lb |
|
| 89 |
-67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 0 2 lb |
|
| 90 |
-67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 0 2 lb |
|
| 91 |
-309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 0 2 lb |
|
| 92 |
-323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 0 2 lb |
|
| 93 |
-26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 0 2 lb |
|
| 94 |
-26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 0 2 lb |
|
| 95 |
-26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 0 2 lb |
|
| 96 |
-26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 0 2 lb |
|
| 97 |
116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 0 2 lb |
|
| 98 |
-262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 0 2 lb |
|
| 99 |
-262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 0 2 lb |
|
| 100 |
-13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 0 2 lb |
|
| 101 |
-180.397 245.045 -142.256 345.099 -132.697 451.748 0 0 0 2 lb |
|
| 102 |
-180.397 245.045 -170.838 351.694 -132.697 451.748 0 0 0 2 lb |
|
| 103 |
-416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 0 2 lb |
|
| 104 |
-416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 0 2 lb |
|
| 105 |
-132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 0 2 lb |
|
| 106 |
670.264 274.195 629.188 409.347 588.113 544.499 0 0 0 2 lb |
|
| 107 |
670.264 274.195 797.466 341.771 924.667 409.347 0 0 0 2 lb |
|
| 108 |
588.113 544.499 756.39 476.923 924.667 409.347 0 0 0 2 lb |
|
| 109 |
-689.204 -237.261 -614.799 -102.648 -567.302 43.6423 0 0 0 2 lb |
|
| 110 |
-689.204 -237.261 -641.707 -90.9706 -567.302 43.6423 0 0 0 2 lb |
|
| 111 |
grestore |
|
| 112 |
%Nodes: |
|
| 113 |
gsave |
|
| 114 |
-567.302 43.6423 20 0 0 0 nc |
|
| 115 |
-689.204 -237.261 20 0 0 0 nc |
|
| 116 |
924.667 409.347 20 1 0 0 nc |
|
| 117 |
588.113 544.499 20 1 0 0 nc |
|
| 118 |
670.264 274.195 20 1 0 0 nc |
|
| 119 |
-371.2 568.349 20 0 1 0 nc |
|
| 120 |
-132.697 451.748 20 0 1 0 nc |
|
| 121 |
-416.25 345.746 20 0 1 0 nc |
|
| 122 |
-180.397 245.045 20 0 1 0 nc |
|
| 123 |
-13.4452 133.743 20 0 1 0 nc |
|
| 124 |
-262.548 107.243 20 0 1 0 nc |
|
| 125 |
201.208 38.3422 20 0 1 0 nc |
|
| 126 |
116.407 -173.66 20 0 1 0 nc |
|
| 127 |
-26.6953 -19.9585 20 0 1 0 nc |
|
| 128 |
-539.894 -262.64 20 0 0 1 nc |
|
| 129 |
-323.543 -433.964 20 0 0 1 nc |
|
| 130 |
-309.657 -57.9033 20 0 0 1 nc |
|
| 131 |
-67.9734 -347.42 20 0 0 1 nc |
|
| 132 |
415.393 -289.516 20 0 0 1 nc |
|
| 133 |
730.084 -307.139 20 0 0 1 nc |
|
| 134 |
526.164 32.7279 20 0 0 1 nc |
|
| 135 |
762.812 -17.6227 20 0 0 1 nc |
|
| 136 |
-67.9734 319.727 20 0 0 1 nc |
|
| 137 |
329.797 314.692 20 0 0 1 nc |
|
| 138 |
-5.03507 561.41 20 0 0 1 nc |
|
| 139 |
422.945 521.129 20 0 0 1 nc |
|
| 140 |
-470.779 158.605 20 0 0 1 nc |
|
| 141 |
986.873 -115.807 20 0 0 1 nc |
|
| 142 |
906.312 201.403 20 0 0 1 nc |
|
| 143 |
-767.847 113.289 20 0 0 1 nc |
|
| 144 |
-579.033 445.603 20 0 0 1 nc |
|
| 145 |
-840.856 -246.718 20 0 0 1 nc |
|
| 146 |
206.221 -205.967 20 1 1 0 nc |
|
| 147 |
277.311 -252.33 20 1 1 0 nc |
|
| 148 |
271.13 -175.058 20 1 1 0 nc |
|
| 149 |
366.947 -110.15 20 1 1 0 nc |
|
| 150 |
397.855 -196.694 20 1 1 0 nc |
|
| 151 |
438.037 -88.514 20 1 1 0 nc |
|
| 152 |
286.584 -48.3327 20 1 1 0 nc |
|
| 153 |
212.403 -23.6057 20 1 1 0 nc |
|
| 154 |
280.402 10.3938 20 1 1 0 nc |
|
| 155 |
694.579 115.483 20 1 0 0 nc |
|
| 156 |
574.035 177.301 20 1 0 0 nc |
|
| 157 |
grestore |
|
| 158 |
grestore |
|
| 159 |
showpage |
| 1 |
%!PS-Adobe-2.0 EPSF-2.0 |
|
| 2 |
%%Creator: LEMON, graphToEps() |
|
| 3 |
%%CreationDate: Fri Nov 4 13:47:12 2005 |
|
| 4 |
%%BoundingBox: 0 0 842 596 |
|
| 5 |
%%EndComments |
|
| 6 |
/lb { setlinewidth setrgbcolor newpath moveto
|
|
| 7 |
4 2 roll 1 index 1 index curveto stroke } bind def |
|
| 8 |
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
|
|
| 9 |
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
|
|
| 10 |
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
|
|
| 11 |
2 index 1 index sub 2 index 2 index add lineto |
|
| 12 |
2 index 1 index sub 2 index 2 index sub lineto |
|
| 13 |
2 index 1 index add 2 index 2 index sub lineto |
|
| 14 |
closepath pop pop pop} bind def |
|
| 15 |
/di { newpath 2 index 1 index add 2 index moveto
|
|
| 16 |
2 index 2 index 2 index add lineto |
|
| 17 |
2 index 1 index sub 2 index lineto |
|
| 18 |
2 index 2 index 2 index sub lineto |
|
| 19 |
closepath pop pop pop} bind def |
|
| 20 |
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
|
|
| 21 |
setrgbcolor 1.1 div c fill |
|
| 22 |
} bind def |
|
| 23 |
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
|
|
| 24 |
setrgbcolor 1.1 div sq fill |
|
| 25 |
} bind def |
|
| 26 |
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
|
|
| 27 |
setrgbcolor 1.1 div di fill |
|
| 28 |
} bind def |
|
| 29 |
/arrl 1 def |
|
| 30 |
/arrw 0.3 def |
|
| 31 |
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
|
|
| 32 |
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
|
|
| 33 |
/w exch def /len exch def |
|
| 34 |
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto |
|
| 35 |
len w sub arrl sub dx dy lrl |
|
| 36 |
arrw dy dx neg lrl |
|
| 37 |
dx arrl w add mul dy w 2 div arrw add mul sub |
|
| 38 |
dy arrl w add mul dx w 2 div arrw add mul add rlineto |
|
| 39 |
dx arrl w add mul neg dy w 2 div arrw add mul sub |
|
| 40 |
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto |
|
| 41 |
arrw dy dx neg lrl |
|
| 42 |
len w sub arrl sub neg dx dy lrl |
|
| 43 |
closepath fill } bind def |
|
| 44 |
/cshow { 2 index 2 index moveto dup stringwidth pop
|
|
| 45 |
neg 2 div fosi .35 mul neg rmoveto show pop pop} def |
|
| 46 |
|
|
| 47 |
gsave |
|
| 48 |
90 rotate |
|
| 49 |
0 -842 translate |
|
| 50 |
71.0944 15 translate |
|
| 51 |
0.434694 dup scale |
|
| 52 |
90 rotate |
|
| 53 |
860.856 -588.349 translate |
|
| 54 |
%Edges: |
|
| 55 |
gsave |
|
| 56 |
574.035 177.301 622.149 225.748 670.264 274.195 1 0 0 2 lb |
|
| 57 |
694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 2 lb |
|
| 58 |
280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 1 2 lb |
|
| 59 |
280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 1 2 lb |
|
| 60 |
212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 1 2 lb |
|
| 61 |
286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 1 2 lb |
|
| 62 |
286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 1 2 lb |
|
| 63 |
438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 1 2 lb |
|
| 64 |
438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 1 2 lb |
|
| 65 |
397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 1 2 lb |
|
| 66 |
366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 1 2 lb |
|
| 67 |
271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 1 2 lb |
|
| 68 |
271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 1 2 lb |
|
| 69 |
277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 1 2 lb |
|
| 70 |
-840.856 -246.718 -804.351 -66.7145 -767.847 113.289 1 0 0 2 lb |
|
| 71 |
-579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 1 2 lb |
|
| 72 |
-579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 1 2 lb |
|
| 73 |
-767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 1 2 lb |
|
| 74 |
906.312 201.403 946.592 42.798 986.873 -115.807 0 0 1 2 lb |
|
| 75 |
906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 1 2 lb |
|
| 76 |
986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 1 2 lb |
|
| 77 |
-470.779 158.605 -390.218 50.3508 -309.657 -57.9033 1 0 0 2 lb |
|
| 78 |
422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 1 2 lb |
|
| 79 |
422.945 521.129 376.371 417.911 329.797 314.692 0 0 1 2 lb |
|
| 80 |
422.945 521.129 474.554 276.928 526.164 32.7279 0 0 1 2 lb |
|
| 81 |
-5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 1 2 lb |
|
| 82 |
329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 1 2 lb |
|
| 83 |
-67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 1 2 lb |
|
| 84 |
762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 1 2 lb |
|
| 85 |
762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 1 2 lb |
|
| 86 |
526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 1 2 lb |
|
| 87 |
730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 1 2 lb |
|
| 88 |
415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0 0 2 lb |
|
| 89 |
-67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 1 2 lb |
|
| 90 |
-67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 1 2 lb |
|
| 91 |
-309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 1 2 lb |
|
| 92 |
-323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 1 2 lb |
|
| 93 |
-26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 1 2 lb |
|
| 94 |
-26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 1 2 lb |
|
| 95 |
-26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 1 2 lb |
|
| 96 |
-26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 1 2 lb |
|
| 97 |
116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 1 2 lb |
|
| 98 |
-262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 1 2 lb |
|
| 99 |
-262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 1 2 lb |
|
| 100 |
-13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 1 2 lb |
|
| 101 |
-180.397 245.045 -142.256 345.099 -132.697 451.748 0 0 1 2 lb |
|
| 102 |
-180.397 245.045 -170.838 351.694 -132.697 451.748 0 0 1 2 lb |
|
| 103 |
-416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 1 2 lb |
|
| 104 |
-416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 1 2 lb |
|
| 105 |
-132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 1 2 lb |
|
| 106 |
670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 2 lb |
|
| 107 |
670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 2 lb |
|
| 108 |
588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 2 lb |
|
| 109 |
-689.204 -237.261 -614.799 -102.648 -567.302 43.6423 0 0 1 2 lb |
|
| 110 |
-689.204 -237.261 -641.707 -90.9706 -567.302 43.6423 0 0 1 2 lb |
|
| 111 |
grestore |
|
| 112 |
%Nodes: |
|
| 113 |
gsave |
|
| 114 |
-567.302 43.6423 20 0 0 0 nc |
|
| 115 |
-689.204 -237.261 20 0 0 0 nc |
|
| 116 |
924.667 409.347 20 0 0 1 nc |
|
| 117 |
588.113 544.499 20 0 0 1 nc |
|
| 118 |
670.264 274.195 20 0 0 1 nc |
|
| 119 |
-371.2 568.349 20 1 1 0 nc |
|
| 120 |
-132.697 451.748 20 1 1 0 nc |
|
| 121 |
-416.25 345.746 20 1 1 0 nc |
|
| 122 |
-180.397 245.045 20 1 1 0 nc |
|
| 123 |
-13.4452 133.743 20 1 1 0 nc |
|
| 124 |
-262.548 107.243 20 1 1 0 nc |
|
| 125 |
201.208 38.3422 20 1 1 0 nc |
|
| 126 |
116.407 -173.66 20 1 1 0 nc |
|
| 127 |
-26.6953 -19.9585 20 1 1 0 nc |
|
| 128 |
-539.894 -262.64 20 0 0.5 0 nc |
|
| 129 |
-323.543 -433.964 20 0 0.5 0 nc |
|
| 130 |
-309.657 -57.9033 20 0 0.5 0 nc |
|
| 131 |
-67.9734 -347.42 20 0 0.5 0 nc |
|
| 132 |
415.393 -289.516 20 0.5 0 0 nc |
|
| 133 |
730.084 -307.139 20 0.5 0 0 nc |
|
| 134 |
526.164 32.7279 20 0.5 0 0 nc |
|
| 135 |
762.812 -17.6227 20 0.5 0 0 nc |
|
| 136 |
-67.9734 319.727 20 0.5 0 0 nc |
|
| 137 |
329.797 314.692 20 0.5 0 0 nc |
|
| 138 |
-5.03507 561.41 20 0.5 0 0 nc |
|
| 139 |
422.945 521.129 20 0.5 0 0 nc |
|
| 140 |
-470.779 158.605 20 0 1 1 nc |
|
| 141 |
986.873 -115.807 20 0.5 0 0 nc |
|
| 142 |
906.312 201.403 20 0.5 0 0 nc |
|
| 143 |
-767.847 113.289 20 0 1 1 nc |
|
| 144 |
-579.033 445.603 20 0 1 1 nc |
|
| 145 |
-840.856 -246.718 20 1 0 1 nc |
|
| 146 |
206.221 -205.967 20 0 0 0.5 nc |
|
| 147 |
277.311 -252.33 20 0 0 0.5 nc |
|
| 148 |
271.13 -175.058 20 0 0 0.5 nc |
|
| 149 |
366.947 -110.15 20 0 0 0.5 nc |
|
| 150 |
397.855 -196.694 20 0 0 0.5 nc |
|
| 151 |
438.037 -88.514 20 0 0 0.5 nc |
|
| 152 |
286.584 -48.3327 20 0 0 0.5 nc |
|
| 153 |
212.403 -23.6057 20 0 0 0.5 nc |
|
| 154 |
280.402 10.3938 20 0 0 0.5 nc |
|
| 155 |
694.579 115.483 20 1 0 0 nc |
|
| 156 |
574.035 177.301 20 0 1 0 nc |
|
| 157 |
grestore |
|
| 158 |
grestore |
|
| 159 |
showpage |
| 1 |
%!PS-Adobe-2.0 EPSF-2.0 |
|
| 2 |
%%Creator: LEMON, graphToEps() |
|
| 3 |
%%CreationDate: Fri Nov 4 13:47:12 2005 |
|
| 4 |
%%BoundingBox: 0 0 842 596 |
|
| 5 |
%%EndComments |
|
| 6 |
/lb { setlinewidth setrgbcolor newpath moveto
|
|
| 7 |
4 2 roll 1 index 1 index curveto stroke } bind def |
|
| 8 |
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
|
|
| 9 |
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
|
|
| 10 |
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
|
|
| 11 |
2 index 1 index sub 2 index 2 index add lineto |
|
| 12 |
2 index 1 index sub 2 index 2 index sub lineto |
|
| 13 |
2 index 1 index add 2 index 2 index sub lineto |
|
| 14 |
closepath pop pop pop} bind def |
|
| 15 |
/di { newpath 2 index 1 index add 2 index moveto
|
|
| 16 |
2 index 2 index 2 index add lineto |
|
| 17 |
2 index 1 index sub 2 index lineto |
|
| 18 |
2 index 2 index 2 index sub lineto |
|
| 19 |
closepath pop pop pop} bind def |
|
| 20 |
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
|
|
| 21 |
setrgbcolor 1.1 div c fill |
|
| 22 |
} bind def |
|
| 23 |
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
|
|
| 24 |
setrgbcolor 1.1 div sq fill |
|
| 25 |
} bind def |
|
| 26 |
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
|
|
| 27 |
setrgbcolor 1.1 div di fill |
|
| 28 |
} bind def |
|
| 29 |
/arrl 1 def |
|
| 30 |
/arrw 0.3 def |
|
| 31 |
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
|
|
| 32 |
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
|
|
| 33 |
/w exch def /len exch def |
|
| 34 |
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto |
|
| 35 |
len w sub arrl sub dx dy lrl |
|
| 36 |
arrw dy dx neg lrl |
|
| 37 |
dx arrl w add mul dy w 2 div arrw add mul sub |
|
| 38 |
dy arrl w add mul dx w 2 div arrw add mul add rlineto |
|
| 39 |
dx arrl w add mul neg dy w 2 div arrw add mul sub |
|
| 40 |
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto |
|
| 41 |
arrw dy dx neg lrl |
|
| 42 |
len w sub arrl sub neg dx dy lrl |
|
| 43 |
closepath fill } bind def |
|
| 44 |
/cshow { 2 index 2 index moveto dup stringwidth pop
|
|
| 45 |
neg 2 div fosi .35 mul neg rmoveto show pop pop} def |
|
| 46 |
|
|
| 47 |
gsave |
|
| 48 |
90 rotate |
|
| 49 |
0 -842 translate |
|
| 50 |
71.0944 15 translate |
|
| 51 |
0.434694 dup scale |
|
| 52 |
90 rotate |
|
| 53 |
860.856 -588.349 translate |
|
| 54 |
%Edges: |
|
| 55 |
gsave |
|
| 56 |
574.035 177.301 622.149 225.748 670.264 274.195 0 1 0 5 lb |
|
| 57 |
694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 5 lb |
|
| 58 |
280.402 10.3938 246.402 -6.60595 212.403 -23.6057 1 1 0.5 5 lb |
|
| 59 |
280.402 10.3938 283.493 -18.9695 286.584 -48.3327 1 1 0.5 5 lb |
|
| 60 |
212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 1 1 0.5 5 lb |
|
| 61 |
286.584 -48.3327 326.765 -79.2414 366.947 -110.15 1 0.5 1 5 lb |
|
| 62 |
286.584 -48.3327 278.857 -111.695 271.13 -175.058 1 0.5 1 5 lb |
|
| 63 |
438.037 -88.514 417.946 -142.604 397.855 -196.694 0.5 0.5 1 5 lb |
|
| 64 |
438.037 -88.514 402.492 -99.332 366.947 -110.15 0.5 0.5 1 5 lb |
|
| 65 |
397.855 -196.694 382.401 -153.422 366.947 -110.15 0.5 0.5 1 5 lb |
|
| 66 |
366.947 -110.15 319.038 -142.604 271.13 -175.058 1 0.5 1 5 lb |
|
| 67 |
271.13 -175.058 274.221 -213.694 277.311 -252.33 0.5 1 1 5 lb |
|
| 68 |
271.13 -175.058 238.675 -190.512 206.221 -205.967 0.5 1 1 5 lb |
|
| 69 |
277.311 -252.33 241.766 -229.149 206.221 -205.967 0.5 1 1 5 lb |
|
| 70 |
-840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0.5 0 5 lb |
|
| 71 |
-579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0.5 5 lb |
|
| 72 |
-579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0.5 5 lb |
|
| 73 |
-767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0.5 5 lb |
|
| 74 |
906.312 201.403 946.592 42.798 986.873 -115.807 0 0.5 0.5 5 lb |
|
| 75 |
906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0.5 0.5 5 lb |
|
| 76 |
986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0.5 0.5 5 lb |
|
| 77 |
-470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0.5 0.5 0 5 lb |
|
| 78 |
422.945 521.129 208.955 541.269 -5.03507 561.41 0.5 0 0.5 5 lb |
|
| 79 |
422.945 521.129 376.371 417.911 329.797 314.692 0.5 0 0.5 5 lb |
|
| 80 |
422.945 521.129 474.554 276.928 526.164 32.7279 0.5 0 0.5 5 lb |
|
| 81 |
-5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0.5 0 0.5 5 lb |
|
| 82 |
329.797 314.692 130.912 317.209 -67.9734 319.727 0.5 0 0.5 5 lb |
|
| 83 |
-67.9734 319.727 229.095 176.227 526.164 32.7279 0.5 0 0.5 5 lb |
|
| 84 |
762.812 -17.6227 644.488 7.5526 526.164 32.7279 0.5 0.5 0.5 5 lb |
|
| 85 |
762.812 -17.6227 746.448 -162.381 730.084 -307.139 0.5 0.5 0.5 5 lb |
|
| 86 |
526.164 32.7279 470.779 -128.394 415.393 -289.516 0.5 0.5 0.5 5 lb |
|
| 87 |
730.084 -307.139 572.738 -298.327 415.393 -289.516 0.5 0.5 0.5 5 lb |
|
| 88 |
415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0.5 0.5 5 lb |
|
| 89 |
-67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0.5 1 0.5 5 lb |
|
| 90 |
-67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0.5 1 0.5 5 lb |
|
| 91 |
-309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0.5 1 0.5 5 lb |
|
| 92 |
-323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0.5 1 0.5 5 lb |
|
| 93 |
-26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 1 1 0 5 lb |
|
| 94 |
-26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 1 1 0 5 lb |
|
| 95 |
-26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 1 0 1 5 lb |
|
| 96 |
-26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 1 0 1 5 lb |
|
| 97 |
116.407 -173.66 158.808 -67.6589 201.208 38.3422 1 1 0 5 lb |
|
| 98 |
-262.548 107.243 -137.997 120.493 -13.4452 133.743 1 0 1 5 lb |
|
| 99 |
-262.548 107.243 -221.472 176.144 -180.397 245.045 1 0 1 5 lb |
|
| 100 |
-13.4452 133.743 -96.9211 189.394 -180.397 245.045 1 0 1 5 lb |
|
| 101 |
-180.397 245.045 -140.307 344.649 -132.697 451.748 0 1 1 5 lb |
|
| 102 |
-180.397 245.045 -172.787 352.144 -132.697 451.748 0 1 1 5 lb |
|
| 103 |
-416.25 345.746 -274.474 398.747 -132.697 451.748 0.5 0 0 5 lb |
|
| 104 |
-416.25 345.746 -393.725 457.048 -371.2 568.349 0.5 0 0 5 lb |
|
| 105 |
-132.697 451.748 -251.948 510.048 -371.2 568.349 0.5 0 0 5 lb |
|
| 106 |
670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 5 lb |
|
| 107 |
670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 5 lb |
|
| 108 |
588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 5 lb |
|
| 109 |
-689.204 -237.261 -612.964 -103.444 -567.302 43.6423 0 0 0 5 lb |
|
| 110 |
-689.204 -237.261 -643.542 -90.1744 -567.302 43.6423 0 0 0 5 lb |
|
| 111 |
grestore |
|
| 112 |
%Nodes: |
|
| 113 |
gsave |
|
| 114 |
-567.302 43.6423 20 0 0 1 nc |
|
| 115 |
-689.204 -237.261 20 0 0 1 nc |
|
| 116 |
924.667 409.347 20 0 0 1 nc |
|
| 117 |
588.113 544.499 20 0 0 1 nc |
|
| 118 |
670.264 274.195 20 1 0 0 nc |
|
| 119 |
-371.2 568.349 20 0 0 1 nc |
|
| 120 |
-132.697 451.748 20 1 0 0 nc |
|
| 121 |
-416.25 345.746 20 0 0 1 nc |
|
| 122 |
-180.397 245.045 20 1 0 0 nc |
|
| 123 |
-13.4452 133.743 20 0 0 1 nc |
|
| 124 |
-262.548 107.243 20 0 0 1 nc |
|
| 125 |
201.208 38.3422 20 0 0 1 nc |
|
| 126 |
116.407 -173.66 20 0 0 1 nc |
|
| 127 |
-26.6953 -19.9585 20 1 0 0 nc |
|
| 128 |
-539.894 -262.64 20 0 0 1 nc |
|
| 129 |
-323.543 -433.964 20 0 0 1 nc |
|
| 130 |
-309.657 -57.9033 20 1 0 0 nc |
|
| 131 |
-67.9734 -347.42 20 1 0 0 nc |
|
| 132 |
415.393 -289.516 20 1 0 0 nc |
|
| 133 |
730.084 -307.139 20 0 0 1 nc |
|
| 134 |
526.164 32.7279 20 1 0 0 nc |
|
| 135 |
762.812 -17.6227 20 1 0 0 nc |
|
| 136 |
-67.9734 319.727 20 0 0 1 nc |
|
| 137 |
329.797 314.692 20 0 0 1 nc |
|
| 138 |
-5.03507 561.41 20 0 0 1 nc |
|
| 139 |
422.945 521.129 20 0 0 1 nc |
|
| 140 |
-470.779 158.605 20 1 0 0 nc |
|
| 141 |
986.873 -115.807 20 0 0 1 nc |
|
| 142 |
906.312 201.403 20 0 0 1 nc |
|
| 143 |
-767.847 113.289 20 1 0 0 nc |
|
| 144 |
-579.033 445.603 20 0 0 1 nc |
|
| 145 |
-840.856 -246.718 20 0 0 1 nc |
|
| 146 |
206.221 -205.967 20 0 0 1 nc |
|
| 147 |
277.311 -252.33 20 0 0 1 nc |
|
| 148 |
271.13 -175.058 20 1 0 0 nc |
|
| 149 |
366.947 -110.15 20 1 0 0 nc |
|
| 150 |
397.855 -196.694 20 0 0 1 nc |
|
| 151 |
438.037 -88.514 20 0 0 1 nc |
|
| 152 |
286.584 -48.3327 20 1 0 0 nc |
|
| 153 |
212.403 -23.6057 20 0 0 1 nc |
|
| 154 |
280.402 10.3938 20 0 0 1 nc |
|
| 155 |
694.579 115.483 20 0 0 1 nc |
|
| 156 |
574.035 177.301 20 0 0 1 nc |
|
| 157 |
grestore |
|
| 158 |
grestore |
|
| 159 |
showpage |
| 1 |
%!PS-Adobe-2.0 EPSF-2.0 |
|
| 2 |
%%Creator: LEMON, graphToEps() |
|
| 3 |
%%CreationDate: Fri Nov 4 13:47:12 2005 |
|
| 4 |
%%BoundingBox: 0 0 842 596 |
|
| 5 |
%%EndComments |
|
| 6 |
/lb { setlinewidth setrgbcolor newpath moveto
|
|
| 7 |
4 2 roll 1 index 1 index curveto stroke } bind def |
|
| 8 |
/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
|
|
| 9 |
/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
|
|
| 10 |
/sq { newpath 2 index 1 index add 2 index 2 index add moveto
|
|
| 11 |
2 index 1 index sub 2 index 2 index add lineto |
|
| 12 |
2 index 1 index sub 2 index 2 index sub lineto |
|
| 13 |
2 index 1 index add 2 index 2 index sub lineto |
|
| 14 |
closepath pop pop pop} bind def |
|
| 15 |
/di { newpath 2 index 1 index add 2 index moveto
|
|
| 16 |
2 index 2 index 2 index add lineto |
|
| 17 |
2 index 1 index sub 2 index lineto |
|
| 18 |
2 index 2 index 2 index sub lineto |
|
| 19 |
closepath pop pop pop} bind def |
|
| 20 |
/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
|
|
| 21 |
setrgbcolor 1.1 div c fill |
|
| 22 |
} bind def |
|
| 23 |
/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
|
|
| 24 |
setrgbcolor 1.1 div sq fill |
|
| 25 |
} bind def |
|
| 26 |
/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
|
|
| 27 |
setrgbcolor 1.1 div di fill |
|
| 28 |
} bind def |
|
| 29 |
/arrl 10 def |
|
| 30 |
/arrw 3 def |
|
| 31 |
/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
|
|
| 32 |
/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
|
|
| 33 |
/w exch def /len exch def |
|
| 34 |
newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto |
|
| 35 |
len w sub arrl sub dx dy lrl |
|
| 36 |
arrw dy dx neg lrl |
|
| 37 |
dx arrl w add mul dy w 2 div arrw add mul sub |
|
| 38 |
dy arrl w add mul dx w 2 div arrw add mul add rlineto |
|
| 39 |
dx arrl w add mul neg dy w 2 div arrw add mul sub |
|
| 40 |
dy arrl w add mul neg dx w 2 div arrw add mul add rlineto |
|
| 41 |
arrw dy dx neg lrl |
|
| 42 |
len w sub arrl sub neg dx dy lrl |
|
| 43 |
closepath fill } bind def |
|
| 44 |
/cshow { 2 index 2 index moveto dup stringwidth pop
|
|
| 45 |
neg 2 div fosi .35 mul neg rmoveto show pop pop} def |
|
| 46 |
|
|
| 47 |
gsave |
|
| 48 |
90 rotate |
|
| 49 |
0 -842 translate |
|
| 50 |
77.1122 15 translate |
|
| 51 |
0.585745 dup scale |
|
| 52 |
90 rotate |
|
| 53 |
695.963 -397.916 translate |
|
| 54 |
%Edges: |
|
| 55 |
gsave |
|
| 56 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 57 |
218.178 27.2723 moveto |
|
| 58 |
192.373 -40.1551 188.622 -49.9556 169.228 -100.631 curveto stroke |
|
| 59 |
newpath 164.939 -111.838 moveto 165.492 -99.2013 lineto 172.964 -102.061 lineto closepath fill |
|
| 60 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 61 |
44.8044 15.5841 moveto |
|
| 62 |
119.293 20.6059 129.775 21.3125 186.25 25.1199 curveto stroke |
|
| 63 |
newpath 198.223 25.927 moveto 186.519 21.1289 lineto 185.981 29.1108 lineto closepath fill |
|
| 64 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 65 |
218.178 27.2723 moveto |
|
| 66 |
285.395 -87.4449 290.763 -96.6058 348.102 -194.464 curveto stroke |
|
| 67 |
newpath 354.169 -204.818 moveto 344.651 -196.487 lineto 351.554 -192.442 lineto closepath fill |
|
| 68 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 69 |
157.79 -130.517 moveto |
|
| 70 |
108.71 -67.0521 102.27 -58.7243 64.3804 -9.72954 curveto stroke |
|
| 71 |
newpath 57.0394 -0.236898 moveto 67.5446 -7.28254 lineto 61.2162 -12.1765 lineto closepath fill |
|
| 72 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 73 |
-105.193 -261.035 moveto |
|
| 74 |
-35.6576 -132.801 -30.5923 -123.459 29.5506 -12.5464 curveto stroke |
|
| 75 |
newpath 35.2708 -1.99743 moveto 33.0669 -14.4531 lineto 26.0343 -10.6397 lineto closepath fill |
|
| 76 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 77 |
-465.576 -42.8564 moveto |
|
| 78 |
-559.078 -25.5413 -569.47 -23.6169 -644.498 -9.72286 curveto stroke |
|
| 79 |
newpath -656.297 -7.5378 moveto -643.77 -5.78973 lineto -645.226 -13.656 lineto closepath fill |
|
| 80 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 81 |
-574.666 -153.893 moveto |
|
| 82 |
-528.842 -107.252 -521.515 -99.794 -488.002 -65.683 curveto stroke |
|
| 83 |
newpath -479.592 -57.123 moveto -485.149 -68.4863 lineto -490.856 -62.8797 lineto closepath fill |
|
| 84 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 85 |
-490.901 120.777 moveto |
|
| 86 |
-480.122 51.1328 -478.519 40.7713 -470.47 -11.2329 curveto stroke |
|
| 87 |
newpath -468.635 -23.0917 moveto -474.423 -11.8447 lineto -466.517 -10.6212 lineto closepath fill |
|
| 88 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 89 |
-675.963 -3.89604 moveto |
|
| 90 |
-632.116 -68.8235 -626.228 -77.5422 -592.575 -127.374 curveto stroke |
|
| 91 |
newpath -585.859 -137.319 moveto -595.89 -129.612 lineto -589.26 -125.135 lineto closepath fill |
|
| 92 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 93 |
-490.901 120.777 moveto |
|
| 94 |
-435.445 215.844 -430.107 224.995 -384.3 303.522 curveto stroke |
|
| 95 |
newpath -378.253 313.887 moveto -380.845 301.507 lineto -387.755 305.537 lineto closepath fill |
|
| 96 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 97 |
-266.879 114.933 moveto |
|
| 98 |
-367.067 117.547 -377.642 117.822 -458.912 119.943 curveto stroke |
|
| 99 |
newpath -470.908 120.255 moveto -458.807 123.941 lineto -459.016 115.944 lineto closepath fill |
|
| 100 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 101 |
-368.176 331.163 moveto |
|
| 102 |
-322.511 233.685 -318.018 224.095 -280.454 143.911 curveto stroke |
|
| 103 |
newpath -275.364 133.044 moveto -284.076 142.214 lineto -276.832 145.608 lineto closepath fill |
|
| 104 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 105 |
-266.879 114.933 moveto |
|
| 106 |
-224.004 235.52 -220.448 245.52 -184.094 347.765 curveto stroke |
|
| 107 |
newpath -180.074 359.072 moveto -180.325 346.425 lineto -187.863 349.105 lineto closepath fill |
|
| 108 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 109 |
-251.294 -335.059 moveto |
|
| 110 |
-189.25 -303.624 -179.902 -298.887 -133.738 -275.498 curveto stroke |
|
| 111 |
newpath -123.034 -270.074 moveto -131.93 -279.066 lineto -135.546 -271.93 lineto closepath fill |
|
| 112 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 113 |
-389.604 -136.361 moveto |
|
| 114 |
-327.15 -226.083 -321.098 -234.777 -269.576 -308.795 curveto stroke |
|
| 115 |
newpath -262.72 -318.644 moveto -272.859 -311.081 lineto -266.293 -306.51 lineto closepath fill |
|
| 116 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 117 |
5.84406 175.322 moveto |
|
| 118 |
-76.0754 267.926 -83.1051 275.873 -152.172 353.948 curveto stroke |
|
| 119 |
newpath -160.122 362.936 moveto -149.176 356.598 lineto -155.168 351.298 lineto closepath fill |
|
| 120 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 121 |
169.478 311.683 moveto |
|
| 122 |
96.8003 251.119 88.6819 244.353 30.4273 195.808 curveto stroke |
|
| 123 |
newpath 21.2086 188.126 moveto 27.8666 198.881 lineto 32.988 192.735 lineto closepath fill |
|
| 124 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 125 |
342.851 111.037 moveto |
|
| 126 |
263.766 202.563 256.831 210.589 190.4 287.47 curveto stroke |
|
| 127 |
newpath 182.554 296.55 moveto 193.427 290.085 lineto 187.373 284.855 lineto closepath fill |
|
| 128 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 129 |
5.84406 175.322 moveto |
|
| 130 |
163.16 145.314 173.605 143.321 311.418 117.033 curveto stroke |
|
| 131 |
newpath 323.205 114.784 moveto 310.668 113.104 lineto 312.167 120.962 lineto closepath fill |
|
| 132 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 133 |
342.851 111.037 moveto |
|
| 134 |
497.255 2.58683 505.964 -3.53033 643.932 -100.436 curveto stroke |
|
| 135 |
newpath 653.752 -107.334 moveto 641.633 -103.71 lineto 646.231 -97.163 lineto closepath fill |
|
| 136 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 137 |
364.28 -222.074 moveto |
|
| 138 |
354.298 -66.9063 353.616 -56.2971 344.905 79.1029 curveto stroke |
|
| 139 |
newpath 344.135 91.0781 moveto 348.897 79.3597 lineto 340.914 78.8461 lineto closepath fill |
|
| 140 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 141 |
670.118 -118.829 moveto |
|
| 142 |
528.037 -166.793 517.967 -170.192 394.599 -211.839 curveto stroke |
|
| 143 |
newpath 383.229 -215.677 moveto 393.32 -208.049 lineto 395.878 -215.629 lineto closepath fill |
|
| 144 |
2 setlinewidth 1 0 0 setrgbcolor newpath |
|
| 145 |
-105.193 -261.035 moveto |
|
| 146 |
118.401 -242.479 129.015 -241.598 332.39 -224.721 curveto stroke |
|
| 147 |
newpath 344.348 -223.728 moveto 332.72 -228.707 lineto 332.059 -220.734 lineto closepath fill |
|
| 148 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 149 |
-105.193 -261.035 moveto |
|
| 150 |
-160.867 -161.176 -166.028 -151.918 -212.336 -68.858 curveto stroke |
|
| 151 |
newpath -218.179 -58.3769 moveto -208.842 -66.9102 lineto -215.829 -70.8058 lineto closepath fill |
|
| 152 |
2 setlinewidth 0 0 1 setrgbcolor newpath |
|
| 153 |
-227.918 -40.9084 moveto |
|
| 154 |
-298.35 -82.4884 -307.42 -87.8432 -362.048 -120.093 curveto stroke |
|
| 155 |
newpath -372.381 -126.193 moveto -364.081 -116.648 lineto -360.014 -123.537 lineto closepath fill |
|
| 156 |
grestore |
|
| 157 |
%Nodes: |
|
| 158 |
gsave |
|
| 159 |
-389.604 -136.361 20 0 1 0 nc |
|
| 160 |
-227.918 -40.9084 20 0 1 0 nc |
|
| 161 |
-105.193 -261.035 20 0 1 0 nc |
|
| 162 |
364.28 -222.074 20 1 1 0 nc |
|
| 163 |
670.118 -118.829 20 1 1 0 nc |
|
| 164 |
342.851 111.037 20 1 1 0 nc |
|
| 165 |
5.84406 175.322 20 1 1 0 nc |
|
| 166 |
169.478 311.683 20 1 1 0 nc |
|
| 167 |
-173.374 377.916 20 1 0 1 nc |
|
| 168 |
-251.294 -335.059 20 0 1 0 nc |
|
| 169 |
-266.879 114.933 20 0 0 0 nc |
|
| 170 |
-368.176 331.163 20 0 0 0 nc |
|
| 171 |
-490.901 120.777 20 0 0 0 nc |
|
| 172 |
-574.666 -153.893 20 1 0 0 nc |
|
| 173 |
-675.963 -3.89604 20 1 0 0 nc |
|
| 174 |
-465.576 -42.8564 20 1 0 0 nc |
|
| 175 |
44.8044 15.5841 20 0 0 1 nc |
|
| 176 |
157.79 -130.517 20 0 0 1 nc |
|
| 177 |
218.178 27.2723 20 0 0 1 nc |
|
| 178 |
grestore |
|
| 179 |
grestore |
|
| 180 |
showpage |
| 1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*- |
|
| 2 |
* |
|
| 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
|
| 4 |
* |
|
| 5 |
* Copyright (C) 2003-2009 |
|
| 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
|
| 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
|
| 8 |
* |
|
| 9 |
* Permission to use, modify and distribute this software is granted |
|
| 10 |
* provided that this copyright notice appears in all copies. For |
|
| 11 |
* precise terms see the accompanying LICENSE file. |
|
| 12 |
* |
|
| 13 |
* This software is provided "AS IS" with no warranty of any kind, |
|
| 14 |
* express or implied, and with no claim as to its suitability for any |
|
| 15 |
* purpose. |
|
| 16 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
namespace lemon {
|
|
| 20 |
|
|
| 21 |
/** |
|
| 22 |
\page min_cost_flow Minimum Cost Flow Problem |
|
| 23 |
|
|
| 24 |
\section mcf_def Definition (GEQ form) |
|
| 25 |
|
|
| 26 |
The \e minimum \e cost \e flow \e problem is to find a feasible flow of |
|
| 27 |
minimum total cost from a set of supply nodes to a set of demand nodes |
|
| 28 |
in a network with capacity constraints (lower and upper bounds) |
|
| 29 |
and arc costs \ref amo93networkflows. |
|
| 30 |
|
|
| 31 |
Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower: A\rightarrow\mathbf{R}\f$,
|
|
| 32 |
\f$upper: A\rightarrow\mathbf{R}\cup\{+\infty\}\f$ denote the lower and
|
|
| 33 |
upper bounds for the flow values on the arcs, for which |
|
| 34 |
\f$lower(uv) \leq upper(uv)\f$ must hold for all \f$uv\in A\f$, |
|
| 35 |
\f$cost: A\rightarrow\mathbf{R}\f$ denotes the cost per unit flow
|
|
| 36 |
on the arcs and \f$sup: V\rightarrow\mathbf{R}\f$ denotes the
|
|
| 37 |
signed supply values of the nodes. |
|
| 38 |
If \f$sup(u)>0\f$, then \f$u\f$ is a supply node with \f$sup(u)\f$ |
|
| 39 |
supply, if \f$sup(u)<0\f$, then \f$u\f$ is a demand node with |
|
| 40 |
\f$-sup(u)\f$ demand. |
|
| 41 |
A minimum cost flow is an \f$f: A\rightarrow\mathbf{R}\f$ solution
|
|
| 42 |
of the following optimization problem. |
|
| 43 |
|
|
| 44 |
\f[ \min\sum_{uv\in A} f(uv) \cdot cost(uv) \f]
|
|
| 45 |
\f[ \sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \geq
|
|
| 46 |
sup(u) \quad \forall u\in V \f] |
|
| 47 |
\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f] |
|
| 48 |
|
|
| 49 |
The sum of the supply values, i.e. \f$\sum_{u\in V} sup(u)\f$ must be
|
|
| 50 |
zero or negative in order to have a feasible solution (since the sum |
|
| 51 |
of the expressions on the left-hand side of the inequalities is zero). |
|
| 52 |
It means that the total demand must be greater or equal to the total |
|
| 53 |
supply and all the supplies have to be carried out from the supply nodes, |
|
| 54 |
but there could be demands that are not satisfied. |
|
| 55 |
If \f$\sum_{u\in V} sup(u)\f$ is zero, then all the supply/demand
|
|
| 56 |
constraints have to be satisfied with equality, i.e. all demands |
|
| 57 |
have to be satisfied and all supplies have to be used. |
|
| 58 |
|
|
| 59 |
|
|
| 60 |
\section mcf_algs Algorithms |
|
| 61 |
|
|
| 62 |
LEMON contains several algorithms for solving this problem, for more |
|
| 63 |
information see \ref min_cost_flow_algs "Minimum Cost Flow Algorithms". |
|
| 64 |
|
|
| 65 |
A feasible solution for this problem can be found using \ref Circulation. |
|
| 66 |
|
|
| 67 |
|
|
| 68 |
\section mcf_dual Dual Solution |
|
| 69 |
|
|
| 70 |
The dual solution of the minimum cost flow problem is represented by |
|
| 71 |
node potentials \f$\pi: V\rightarrow\mathbf{R}\f$.
|
|
| 72 |
An \f$f: A\rightarrow\mathbf{R}\f$ primal feasible solution is optimal
|
|
| 73 |
if and only if for some \f$\pi: V\rightarrow\mathbf{R}\f$ node potentials
|
|
| 74 |
the following \e complementary \e slackness optimality conditions hold. |
|
| 75 |
|
|
| 76 |
- For all \f$uv\in A\f$ arcs: |
|
| 77 |
- if \f$cost^\pi(uv)>0\f$, then \f$f(uv)=lower(uv)\f$; |
|
| 78 |
- if \f$lower(uv)<f(uv)<upper(uv)\f$, then \f$cost^\pi(uv)=0\f$; |
|
| 79 |
- if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$. |
|
| 80 |
- For all \f$u\in V\f$ nodes: |
|
| 81 |
- \f$\pi(u)<=0\f$; |
|
| 82 |
- if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
|
|
| 83 |
then \f$\pi(u)=0\f$. |
|
| 84 |
|
|
| 85 |
Here \f$cost^\pi(uv)\f$ denotes the \e reduced \e cost of the arc |
|
| 86 |
\f$uv\in A\f$ with respect to the potential function \f$\pi\f$, i.e. |
|
| 87 |
\f[ cost^\pi(uv) = cost(uv) + \pi(u) - \pi(v).\f] |
|
| 88 |
|
|
| 89 |
All algorithms provide dual solution (node potentials), as well, |
|
| 90 |
if an optimal flow is found. |
|
| 91 |
|
|
| 92 |
|
|
| 93 |
\section mcf_eq Equality Form |
|
| 94 |
|
|
| 95 |
The above \ref mcf_def "definition" is actually more general than the |
|
| 96 |
usual formulation of the minimum cost flow problem, in which strict |
|
| 97 |
equalities are required in the supply/demand contraints. |
|
| 98 |
|
|
| 99 |
\f[ \min\sum_{uv\in A} f(uv) \cdot cost(uv) \f]
|
|
| 100 |
\f[ \sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) =
|
|
| 101 |
sup(u) \quad \forall u\in V \f] |
|
| 102 |
\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f] |
|
| 103 |
|
|
| 104 |
However if the sum of the supply values is zero, then these two problems |
|
| 105 |
are equivalent. |
|
| 106 |
The \ref min_cost_flow_algs "algorithms" in LEMON support the general |
|
| 107 |
form, so if you need the equality form, you have to ensure this additional |
|
| 108 |
contraint manually. |
|
| 109 |
|
|
| 110 |
|
|
| 111 |
\section mcf_leq Opposite Inequalites (LEQ Form) |
|
| 112 |
|
|
| 113 |
Another possible definition of the minimum cost flow problem is |
|
| 114 |
when there are <em>"less or equal"</em> (LEQ) supply/demand constraints, |
|
| 115 |
instead of the <em>"greater or equal"</em> (GEQ) constraints. |
|
| 116 |
|
|
| 117 |
\f[ \min\sum_{uv\in A} f(uv) \cdot cost(uv) \f]
|
|
| 118 |
\f[ \sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \leq
|
|
| 119 |
sup(u) \quad \forall u\in V \f] |
|
| 120 |
\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f] |
|
| 121 |
|
|
| 122 |
It means that the total demand must be less or equal to the |
|
| 123 |
total supply (i.e. \f$\sum_{u\in V} sup(u)\f$ must be zero or
|
|
| 124 |
positive) and all the demands have to be satisfied, but there |
|
| 125 |
could be supplies that are not carried out from the supply |
|
| 126 |
nodes. |
|
| 127 |
The equality form is also a special case of this form, of course. |
|
| 128 |
|
|
| 129 |
You could easily transform this case to the \ref mcf_def "GEQ form" |
|
| 130 |
of the problem by reversing the direction of the arcs and taking the |
|
| 131 |
negative of the supply values (e.g. using \ref ReverseDigraph and |
|
| 132 |
\ref NegMap adaptors). |
|
| 133 |
However \ref NetworkSimplex algorithm also supports this form directly |
|
| 134 |
for the sake of convenience. |
|
| 135 |
|
|
| 136 |
Note that the optimality conditions for this supply constraint type are |
|
| 137 |
slightly differ from the conditions that are discussed for the GEQ form, |
|
| 138 |
namely the potentials have to be non-negative instead of non-positive. |
|
| 139 |
An \f$f: A\rightarrow\mathbf{R}\f$ feasible solution of this problem
|
|
| 140 |
is optimal if and only if for some \f$\pi: V\rightarrow\mathbf{R}\f$
|
|
| 141 |
node potentials the following conditions hold. |
|
| 142 |
|
|
| 143 |
- For all \f$uv\in A\f$ arcs: |
|
| 144 |
- if \f$cost^\pi(uv)>0\f$, then \f$f(uv)=lower(uv)\f$; |
|
| 145 |
- if \f$lower(uv)<f(uv)<upper(uv)\f$, then \f$cost^\pi(uv)=0\f$; |
|
| 146 |
- if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$. |
|
| 147 |
- For all \f$u\in V\f$ nodes: |
|
| 148 |
- \f$\pi(u)>=0\f$; |
|
| 149 |
- if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
|
|
| 150 |
then \f$\pi(u)=0\f$. |
|
| 151 |
|
|
| 152 |
*/ |
|
| 153 |
} |
| 1 |
%%%%% Defining LEMON %%%%% |
|
| 2 |
|
|
| 3 |
@misc{lemon,
|
|
| 4 |
key = {LEMON},
|
|
| 5 |
title = {{LEMON} -- {L}ibrary for {E}fficient {M}odeling and
|
|
| 6 |
{O}ptimization in {N}etworks},
|
|
| 7 |
howpublished = {\url{http://lemon.cs.elte.hu/}},
|
|
| 8 |
year = 2009 |
|
| 9 |
} |
|
| 10 |
|
|
| 11 |
@misc{egres,
|
|
| 12 |
key = {EGRES},
|
|
| 13 |
title = {{EGRES} -- {E}gerv{\'a}ry {R}esearch {G}roup on
|
|
| 14 |
{C}ombinatorial {O}ptimization},
|
|
| 15 |
url = {http://www.cs.elte.hu/egres/}
|
|
| 16 |
} |
|
| 17 |
|
|
| 18 |
@misc{coinor,
|
|
| 19 |
key = {COIN-OR},
|
|
| 20 |
title = {{COIN-OR} -- {C}omputational {I}nfrastructure for
|
|
| 21 |
{O}perations {R}esearch},
|
|
| 22 |
url = {http://www.coin-or.org/}
|
|
| 23 |
} |
|
| 24 |
|
|
| 25 |
|
|
| 26 |
%%%%% Other libraries %%%%%% |
|
| 27 |
|
|
| 28 |
@misc{boost,
|
|
| 29 |
key = {Boost},
|
|
| 30 |
title = {{B}oost {C++} {L}ibraries},
|
|
| 31 |
url = {http://www.boost.org/}
|
|
| 32 |
} |
|
| 33 |
|
|
| 34 |
@book{bglbook,
|
|
| 35 |
author = {Jeremy G. Siek and Lee-Quan Lee and Andrew
|
|
| 36 |
Lumsdaine}, |
|
| 37 |
title = {The Boost Graph Library: User Guide and Reference
|
|
| 38 |
Manual}, |
|
| 39 |
publisher = {Addison-Wesley},
|
|
| 40 |
year = 2002 |
|
| 41 |
} |
|
| 42 |
|
|
| 43 |
@misc{leda,
|
|
| 44 |
key = {LEDA},
|
|
| 45 |
title = {{LEDA} -- {L}ibrary of {E}fficient {D}ata {T}ypes and
|
|
| 46 |
{A}lgorithms},
|
|
| 47 |
url = {http://www.algorithmic-solutions.com/}
|
|
| 48 |
} |
|
| 49 |
|
|
| 50 |
@book{ledabook,
|
|
| 51 |
author = {Kurt Mehlhorn and Stefan N{\"a}her},
|
|
| 52 |
title = {{LEDA}: {A} platform for combinatorial and geometric
|
|
| 53 |
computing}, |
|
| 54 |
isbn = {0-521-56329-1},
|
|
| 55 |
publisher = {Cambridge University Press},
|
|
| 56 |
address = {New York, NY, USA},
|
|
| 57 |
year = 1999 |
|
| 58 |
} |
|
| 59 |
|
|
| 60 |
|
|
| 61 |
%%%%% Tools that LEMON depends on %%%%% |
|
| 62 |
|
|
| 63 |
@misc{cmake,
|
|
| 64 |
key = {CMake},
|
|
| 65 |
title = {{CMake} -- {C}ross {P}latform {M}ake},
|
|
| 66 |
url = {http://www.cmake.org/}
|
|
| 67 |
} |
|
| 68 |
|
|
| 69 |
@misc{doxygen,
|
|
| 70 |
key = {Doxygen},
|
|
| 71 |
title = {{Doxygen} -- {S}ource code documentation generator
|
|
| 72 |
tool}, |
|
| 73 |
url = {http://www.doxygen.org/}
|
|
| 74 |
} |
|
| 75 |
|
|
| 76 |
|
|
| 77 |
%%%%% LP/MIP libraries %%%%% |
|
| 78 |
|
|
| 79 |
@misc{glpk,
|
|
| 80 |
key = {GLPK},
|
|
| 81 |
title = {{GLPK} -- {GNU} {L}inear {P}rogramming {K}it},
|
|
| 82 |
url = {http://www.gnu.org/software/glpk/}
|
|
| 83 |
} |
|
| 84 |
|
|
| 85 |
@misc{clp,
|
|
| 86 |
key = {Clp},
|
|
| 87 |
title = {{Clp} -- {Coin-Or} {L}inear {P}rogramming},
|
|
| 88 |
url = {http://projects.coin-or.org/Clp/}
|
|
| 89 |
} |
|
| 90 |
|
|
| 91 |
@misc{cbc,
|
|
| 92 |
key = {Cbc},
|
|
| 93 |
title = {{Cbc} -- {Coin-Or} {B}ranch and {C}ut},
|
|
| 94 |
url = {http://projects.coin-or.org/Cbc/}
|
|
| 95 |
} |
|
| 96 |
|
|
| 97 |
@misc{cplex,
|
|
| 98 |
key = {CPLEX},
|
|
| 99 |
title = {{ILOG} {CPLEX}},
|
|
| 100 |
url = {http://www.ilog.com/}
|
|
| 101 |
} |
|
| 102 |
|
|
| 103 |
@misc{soplex,
|
|
| 104 |
key = {SoPlex},
|
|
| 105 |
title = {{SoPlex} -- {T}he {S}equential {O}bject-{O}riented
|
|
| 106 |
{S}implex},
|
|
| 107 |
url = {http://soplex.zib.de/}
|
|
| 108 |
} |
|
| 109 |
|
|
| 110 |
|
|
| 111 |
%%%%% General books %%%%% |
|
| 112 |
|
|
| 113 |
@book{amo93networkflows,
|
|
| 114 |
author = {Ravindra K. Ahuja and Thomas L. Magnanti and James
|
|
| 115 |
B. Orlin}, |
|
| 116 |
title = {Network Flows: Theory, Algorithms, and Applications},
|
|
| 117 |
publisher = {Prentice-Hall, Inc.},
|
|
| 118 |
year = 1993, |
|
| 119 |
month = feb, |
|
| 120 |
isbn = {978-0136175490}
|
|
| 121 |
} |
|
| 122 |
|
|
| 123 |
@book{schrijver03combinatorial,
|
|
| 124 |
author = {Alexander Schrijver},
|
|
| 125 |
title = {Combinatorial Optimization: Polyhedra and Efficiency},
|
|
| 126 |
publisher = {Springer-Verlag},
|
|
| 127 |
year = 2003, |
|
| 128 |
isbn = {978-3540443896}
|
|
| 129 |
} |
|
| 130 |
|
|
| 131 |
@book{clrs01algorithms,
|
|
| 132 |
author = {Thomas H. Cormen and Charles E. Leiserson and Ronald
|
|
| 133 |
L. Rivest and Clifford Stein}, |
|
| 134 |
title = {Introduction to Algorithms},
|
|
| 135 |
publisher = {The MIT Press},
|
|
| 136 |
year = 2001, |
|
| 137 |
edition = {2nd}
|
|
| 138 |
} |
|
| 139 |
|
|
| 140 |
@book{stroustrup00cpp,
|
|
| 141 |
author = {Bjarne Stroustrup},
|
|
| 142 |
title = {The C++ Programming Language},
|
|
| 143 |
edition = {3rd},
|
|
| 144 |
publisher = {Addison-Wesley Professional},
|
|
| 145 |
isbn = 0201700735, |
|
| 146 |
month = {February},
|
|
| 147 |
year = 2000 |
|
| 148 |
} |
|
| 149 |
|
|
| 150 |
|
|
| 151 |
%%%%% Maximum flow algorithms %%%%% |
|
| 152 |
|
|
| 153 |
@article{edmondskarp72theoretical,
|
|
| 154 |
author = {Jack Edmonds and Richard M. Karp},
|
|
| 155 |
title = {Theoretical improvements in algorithmic efficiency
|
|
| 156 |
for network flow problems}, |
|
| 157 |
journal = {Journal of the ACM},
|
|
| 158 |
year = 1972, |
|
| 159 |
volume = 19, |
|
| 160 |
number = 2, |
|
| 161 |
pages = {248-264}
|
|
| 162 |
} |
|
| 163 |
|
|
| 164 |
@article{goldberg88newapproach,
|
|
| 165 |
author = {Andrew V. Goldberg and Robert E. Tarjan},
|
|
| 166 |
title = {A new approach to the maximum flow problem},
|
|
| 167 |
journal = {Journal of the ACM},
|
|
| 168 |
year = 1988, |
|
| 169 |
volume = 35, |
|
| 170 |
number = 4, |
|
| 171 |
pages = {921-940}
|
|
| 172 |
} |
|
| 173 |
|
|
| 174 |
@article{dinic70algorithm,
|
|
| 175 |
author = {E. A. Dinic},
|
|
| 176 |
title = {Algorithm for solution of a problem of maximum flow
|
|
| 177 |
in a network with power estimation}, |
|
| 178 |
journal = {Soviet Math. Doklady},
|
|
| 179 |
year = 1970, |
|
| 180 |
volume = 11, |
|
| 181 |
pages = {1277-1280}
|
|
| 182 |
} |
|
| 183 |
|
|
| 184 |
@article{goldberg08partial,
|
|
| 185 |
author = {Andrew V. Goldberg},
|
|
| 186 |
title = {The Partial Augment-Relabel Algorithm for the
|
|
| 187 |
Maximum Flow Problem}, |
|
| 188 |
journal = {16th Annual European Symposium on Algorithms},
|
|
| 189 |
year = 2008, |
|
| 190 |
pages = {466-477}
|
|
| 191 |
} |
|
| 192 |
|
|
| 193 |
@article{sleator83dynamic,
|
|
| 194 |
author = {Daniel D. Sleator and Robert E. Tarjan},
|
|
| 195 |
title = {A data structure for dynamic trees},
|
|
| 196 |
journal = {Journal of Computer and System Sciences},
|
|
| 197 |
year = 1983, |
|
| 198 |
volume = 26, |
|
| 199 |
number = 3, |
|
| 200 |
pages = {362-391}
|
|
| 201 |
} |
|
| 202 |
|
|
| 203 |
|
|
| 204 |
%%%%% Minimum mean cycle algorithms %%%%% |
|
| 205 |
|
|
| 206 |
@article{karp78characterization,
|
|
| 207 |
author = {Richard M. Karp},
|
|
| 208 |
title = {A characterization of the minimum cycle mean in a
|
|
| 209 |
digraph}, |
|
| 210 |
journal = {Discrete Math.},
|
|
| 211 |
year = 1978, |
|
| 212 |
volume = 23, |
|
| 213 |
pages = {309-311}
|
|
| 214 |
} |
|
| 215 |
|
|
| 216 |
@article{dasdan98minmeancycle,
|
|
| 217 |
author = {Ali Dasdan and Rajesh K. Gupta},
|
|
| 218 |
title = {Faster Maximum and Minimum Mean Cycle Alogrithms for
|
|
| 219 |
System Performance Analysis}, |
|
| 220 |
journal = {IEEE Transactions on Computer-Aided Design of
|
|
| 221 |
Integrated Circuits and Systems}, |
|
| 222 |
year = 1998, |
|
| 223 |
volume = 17, |
|
| 224 |
number = 10, |
|
| 225 |
pages = {889-899}
|
|
| 226 |
} |
|
| 227 |
|
|
| 228 |
|
|
| 229 |
%%%%% Minimum cost flow algorithms %%%%% |
|
| 230 |
|
|
| 231 |
@article{klein67primal,
|
|
| 232 |
author = {Morton Klein},
|
|
| 233 |
title = {A primal method for minimal cost flows with
|
|
| 234 |
applications to the assignment and transportation |
|
| 235 |
problems}, |
|
| 236 |
journal = {Management Science},
|
|
| 237 |
year = 1967, |
|
| 238 |
volume = 14, |
|
| 239 |
pages = {205-220}
|
|
| 240 |
} |
|
| 241 |
|
|
| 242 |
@article{goldberg89cyclecanceling,
|
|
| 243 |
author = {Andrew V. Goldberg and Robert E. Tarjan},
|
|
| 244 |
title = {Finding minimum-cost circulations by canceling
|
|
| 245 |
negative cycles}, |
|
| 246 |
journal = {Journal of the ACM},
|
|
| 247 |
year = 1989, |
|
| 248 |
volume = 36, |
|
| 249 |
number = 4, |
|
| 250 |
pages = {873-886}
|
|
| 251 |
} |
|
| 252 |
|
|
| 253 |
@article{goldberg90approximation,
|
|
| 254 |
author = {Andrew V. Goldberg and Robert E. Tarjan},
|
|
| 255 |
title = {Finding Minimum-Cost Circulations by Successive
|
|
| 256 |
Approximation}, |
|
| 257 |
journal = {Mathematics of Operations Research},
|
|
| 258 |
year = 1990, |
|
| 259 |
volume = 15, |
|
| 260 |
number = 3, |
|
| 261 |
pages = {430-466}
|
|
| 262 |
} |
|
| 263 |
|
|
| 264 |
@article{goldberg97efficient,
|
|
| 265 |
author = {Andrew V. Goldberg},
|
|
| 266 |
title = {An Efficient Implementation of a Scaling
|
|
| 267 |
Minimum-Cost Flow Algorithm}, |
|
| 268 |
journal = {Journal of Algorithms},
|
|
| 269 |
year = 1997, |
|
| 270 |
volume = 22, |
|
| 271 |
number = 1, |
|
| 272 |
pages = {1-29}
|
|
| 273 |
} |
|
| 274 |
|
|
| 275 |
@article{bunnagel98efficient,
|
|
| 276 |
author = {Ursula B{\"u}nnagel and Bernhard Korte and Jens
|
|
| 277 |
Vygen}, |
|
| 278 |
title = {Efficient implementation of the {G}oldberg-{T}arjan
|
|
| 279 |
minimum-cost flow algorithm}, |
|
| 280 |
journal = {Optimization Methods and Software},
|
|
| 281 |
year = 1998, |
|
| 282 |
volume = 10, |
|
| 283 |
pages = {157-174}
|
|
| 284 |
} |
|
| 285 |
|
|
| 286 |
@book{dantzig63linearprog,
|
|
| 287 |
author = {George B. Dantzig},
|
|
| 288 |
title = {Linear Programming and Extensions},
|
|
| 289 |
publisher = {Princeton University Press},
|
|
| 290 |
year = 1963 |
|
| 291 |
} |
|
| 292 |
|
|
| 293 |
@mastersthesis{kellyoneill91netsimplex,
|
|
| 294 |
author = {Damian J. Kelly and Garrett M. O'Neill},
|
|
| 295 |
title = {The Minimum Cost Flow Problem and The Network
|
|
| 296 |
Simplex Method}, |
|
| 297 |
school = {University College},
|
|
| 298 |
address = {Dublin, Ireland},
|
|
| 299 |
year = 1991, |
|
| 300 |
month = sep, |
|
| 301 |
} |
| 1 |
/* -*- C++ -*- |
|
| 2 |
* |
|
| 3 |
* This file is a part of LEMON, a generic C++ optimization library |
|
| 4 |
* |
|
| 5 |
* Copyright (C) 2003-2008 |
|
| 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
|
| 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
|
| 8 |
* |
|
| 9 |
* Permission to use, modify and distribute this software is granted |
|
| 10 |
* provided that this copyright notice appears in all copies. For |
|
| 11 |
* precise terms see the accompanying LICENSE file. |
|
| 12 |
* |
|
| 13 |
* This software is provided "AS IS" with no warranty of any kind, |
|
| 14 |
* express or implied, and with no claim as to its suitability for any |
|
| 15 |
* purpose. |
|
| 16 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
#ifndef LEMON_BELLMAN_FORD_H |
|
| 20 |
#define LEMON_BELLMAN_FORD_H |
|
| 21 |
|
|
| 22 |
/// \ingroup shortest_path |
|
| 23 |
/// \file |
|
| 24 |
/// \brief Bellman-Ford algorithm. |
|
| 25 |
|
|
| 26 |
#include <lemon/list_graph.h> |
|
| 27 |
#include <lemon/bits/path_dump.h> |
|
| 28 |
#include <lemon/core.h> |
|
| 29 |
#include <lemon/error.h> |
|
| 30 |
#include <lemon/maps.h> |
|
| 31 |
#include <lemon/path.h> |
|
| 32 |
|
|
| 33 |
#include <limits> |
|
| 34 |
|
|
| 35 |
namespace lemon {
|
|
| 36 |
|
|
| 37 |
/// \brief Default OperationTraits for the BellmanFord algorithm class. |
|
| 38 |
/// |
|
| 39 |
/// This operation traits class defines all computational operations |
|
| 40 |
/// and constants that are used in the Bellman-Ford algorithm. |
|
| 41 |
/// The default implementation is based on the \c numeric_limits class. |
|
| 42 |
/// If the numeric type does not have infinity value, then the maximum |
|
| 43 |
/// value is used as extremal infinity value. |
|
| 44 |
template < |
|
| 45 |
typename V, |
|
| 46 |
bool has_inf = std::numeric_limits<V>::has_infinity> |
|
| 47 |
struct BellmanFordDefaultOperationTraits {
|
|
| 48 |
/// \e |
|
| 49 |
typedef V Value; |
|
| 50 |
/// \brief Gives back the zero value of the type. |
|
| 51 |
static Value zero() {
|
|
| 52 |
return static_cast<Value>(0); |
|
| 53 |
} |
|
| 54 |
/// \brief Gives back the positive infinity value of the type. |
|
| 55 |
static Value infinity() {
|
|
| 56 |
return std::numeric_limits<Value>::infinity(); |
|
| 57 |
} |
|
| 58 |
/// \brief Gives back the sum of the given two elements. |
|
| 59 |
static Value plus(const Value& left, const Value& right) {
|
|
| 60 |
return left + right; |
|
| 61 |
} |
|
| 62 |
/// \brief Gives back \c true only if the first value is less than |
|
| 63 |
/// the second. |
|
| 64 |
static bool less(const Value& left, const Value& right) {
|
|
| 65 |
return left < right; |
|
| 66 |
} |
|
| 67 |
}; |
|
| 68 |
|
|
| 69 |
template <typename V> |
|
| 70 |
struct BellmanFordDefaultOperationTraits<V, false> {
|
|
| 71 |
typedef V Value; |
|
| 72 |
static Value zero() {
|
|
| 73 |
return static_cast<Value>(0); |
|
| 74 |
} |
|
| 75 |
static Value infinity() {
|
|
| 76 |
return std::numeric_limits<Value>::max(); |
|
| 77 |
} |
|
| 78 |
static Value plus(const Value& left, const Value& right) {
|
|
| 79 |
if (left == infinity() || right == infinity()) return infinity(); |
|
| 80 |
return left + right; |
|
| 81 |
} |
|
| 82 |
static bool less(const Value& left, const Value& right) {
|
|
| 83 |
return left < right; |
|
| 84 |
} |
|
| 85 |
}; |
|
| 86 |
|
|
| 87 |
/// \brief Default traits class of BellmanFord class. |
|
| 88 |
/// |
|
| 89 |
/// Default traits class of BellmanFord class. |
|
| 90 |
/// \param GR The type of the digraph. |
|
| 91 |
/// \param LEN The type of the length map. |
|
| 92 |
template<typename GR, typename LEN> |
|
| 93 |
struct BellmanFordDefaultTraits {
|
|
| 94 |
/// The type of the digraph the algorithm runs on. |
|
| 95 |
typedef GR Digraph; |
|
| 96 |
|
|
| 97 |
/// \brief The type of the map that stores the arc lengths. |
|
| 98 |
/// |
|
| 99 |
/// The type of the map that stores the arc lengths. |
|
| 100 |
/// It must conform to the \ref concepts::ReadMap "ReadMap" concept. |
|
| 101 |
typedef LEN LengthMap; |
|
| 102 |
|
|
| 103 |
/// The type of the arc lengths. |
|
| 104 |
typedef typename LEN::Value Value; |
|
| 105 |
|
|
| 106 |
/// \brief Operation traits for Bellman-Ford algorithm. |
|
| 107 |
/// |
|
| 108 |
/// It defines the used operations and the infinity value for the |
|
| 109 |
/// given \c Value type. |
|
| 110 |
/// \see BellmanFordDefaultOperationTraits |
|
| 111 |
typedef BellmanFordDefaultOperationTraits<Value> OperationTraits; |
|
| 112 |
|
|
| 113 |
/// \brief The type of the map that stores the last arcs of the |
|
| 114 |
/// shortest paths. |
|
| 115 |
/// |
|
| 116 |
/// The type of the map that stores the last |
|
| 117 |
/// arcs of the shortest paths. |
|
| 118 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 119 |
typedef typename GR::template NodeMap<typename GR::Arc> PredMap; |
|
| 120 |
|
|
| 121 |
/// \brief Instantiates a \c PredMap. |
|
| 122 |
/// |
|
| 123 |
/// This function instantiates a \ref PredMap. |
|
| 124 |
/// \param g is the digraph to which we would like to define the |
|
| 125 |
/// \ref PredMap. |
|
| 126 |
static PredMap *createPredMap(const GR& g) {
|
|
| 127 |
return new PredMap(g); |
|
| 128 |
} |
|
| 129 |
|
|
| 130 |
/// \brief The type of the map that stores the distances of the nodes. |
|
| 131 |
/// |
|
| 132 |
/// The type of the map that stores the distances of the nodes. |
|
| 133 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 134 |
typedef typename GR::template NodeMap<typename LEN::Value> DistMap; |
|
| 135 |
|
|
| 136 |
/// \brief Instantiates a \c DistMap. |
|
| 137 |
/// |
|
| 138 |
/// This function instantiates a \ref DistMap. |
|
| 139 |
/// \param g is the digraph to which we would like to define the |
|
| 140 |
/// \ref DistMap. |
|
| 141 |
static DistMap *createDistMap(const GR& g) {
|
|
| 142 |
return new DistMap(g); |
|
| 143 |
} |
|
| 144 |
|
|
| 145 |
}; |
|
| 146 |
|
|
| 147 |
/// \brief %BellmanFord algorithm class. |
|
| 148 |
/// |
|
| 149 |
/// \ingroup shortest_path |
|
| 150 |
/// This class provides an efficient implementation of the Bellman-Ford |
|
| 151 |
/// algorithm. The maximum time complexity of the algorithm is |
|
| 152 |
/// <tt>O(ne)</tt>. |
|
| 153 |
/// |
|
| 154 |
/// The Bellman-Ford algorithm solves the single-source shortest path |
|
| 155 |
/// problem when the arcs can have negative lengths, but the digraph |
|
| 156 |
/// should not contain directed cycles with negative total length. |
|
| 157 |
/// If all arc costs are non-negative, consider to use the Dijkstra |
|
| 158 |
/// algorithm instead, since it is more efficient. |
|
| 159 |
/// |
|
| 160 |
/// The arc lengths are passed to the algorithm using a |
|
| 161 |
/// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any |
|
| 162 |
/// kind of length. The type of the length values is determined by the |
|
| 163 |
/// \ref concepts::ReadMap::Value "Value" type of the length map. |
|
| 164 |
/// |
|
| 165 |
/// There is also a \ref bellmanFord() "function-type interface" for the |
|
| 166 |
/// Bellman-Ford algorithm, which is convenient in the simplier cases and |
|
| 167 |
/// it can be used easier. |
|
| 168 |
/// |
|
| 169 |
/// \tparam GR The type of the digraph the algorithm runs on. |
|
| 170 |
/// The default type is \ref ListDigraph. |
|
| 171 |
/// \tparam LEN A \ref concepts::ReadMap "readable" arc map that specifies |
|
| 172 |
/// the lengths of the arcs. The default map type is |
|
| 173 |
/// \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". |
|
| 174 |
#ifdef DOXYGEN |
|
| 175 |
template <typename GR, typename LEN, typename TR> |
|
| 176 |
#else |
|
| 177 |
template <typename GR=ListDigraph, |
|
| 178 |
typename LEN=typename GR::template ArcMap<int>, |
|
| 179 |
typename TR=BellmanFordDefaultTraits<GR,LEN> > |
|
| 180 |
#endif |
|
| 181 |
class BellmanFord {
|
|
| 182 |
public: |
|
| 183 |
|
|
| 184 |
///The type of the underlying digraph. |
|
| 185 |
typedef typename TR::Digraph Digraph; |
|
| 186 |
|
|
| 187 |
/// \brief The type of the arc lengths. |
|
| 188 |
typedef typename TR::LengthMap::Value Value; |
|
| 189 |
/// \brief The type of the map that stores the arc lengths. |
|
| 190 |
typedef typename TR::LengthMap LengthMap; |
|
| 191 |
/// \brief The type of the map that stores the last |
|
| 192 |
/// arcs of the shortest paths. |
|
| 193 |
typedef typename TR::PredMap PredMap; |
|
| 194 |
/// \brief The type of the map that stores the distances of the nodes. |
|
| 195 |
typedef typename TR::DistMap DistMap; |
|
| 196 |
/// The type of the paths. |
|
| 197 |
typedef PredMapPath<Digraph, PredMap> Path; |
|
| 198 |
///\brief The \ref BellmanFordDefaultOperationTraits |
|
| 199 |
/// "operation traits class" of the algorithm. |
|
| 200 |
typedef typename TR::OperationTraits OperationTraits; |
|
| 201 |
|
|
| 202 |
///The \ref BellmanFordDefaultTraits "traits class" of the algorithm. |
|
| 203 |
typedef TR Traits; |
|
| 204 |
|
|
| 205 |
private: |
|
| 206 |
|
|
| 207 |
typedef typename Digraph::Node Node; |
|
| 208 |
typedef typename Digraph::NodeIt NodeIt; |
|
| 209 |
typedef typename Digraph::Arc Arc; |
|
| 210 |
typedef typename Digraph::OutArcIt OutArcIt; |
|
| 211 |
|
|
| 212 |
// Pointer to the underlying digraph. |
|
| 213 |
const Digraph *_gr; |
|
| 214 |
// Pointer to the length map |
|
| 215 |
const LengthMap *_length; |
|
| 216 |
// Pointer to the map of predecessors arcs. |
|
| 217 |
PredMap *_pred; |
|
| 218 |
// Indicates if _pred is locally allocated (true) or not. |
|
| 219 |
bool _local_pred; |
|
| 220 |
// Pointer to the map of distances. |
|
| 221 |
DistMap *_dist; |
|
| 222 |
// Indicates if _dist is locally allocated (true) or not. |
|
| 223 |
bool _local_dist; |
|
| 224 |
|
|
| 225 |
typedef typename Digraph::template NodeMap<bool> MaskMap; |
|
| 226 |
MaskMap *_mask; |
|
| 227 |
|
|
| 228 |
std::vector<Node> _process; |
|
| 229 |
|
|
| 230 |
// Creates the maps if necessary. |
|
| 231 |
void create_maps() {
|
|
| 232 |
if(!_pred) {
|
|
| 233 |
_local_pred = true; |
|
| 234 |
_pred = Traits::createPredMap(*_gr); |
|
| 235 |
} |
|
| 236 |
if(!_dist) {
|
|
| 237 |
_local_dist = true; |
|
| 238 |
_dist = Traits::createDistMap(*_gr); |
|
| 239 |
} |
|
| 240 |
_mask = new MaskMap(*_gr, false); |
|
| 241 |
} |
|
| 242 |
|
|
| 243 |
public : |
|
| 244 |
|
|
| 245 |
typedef BellmanFord Create; |
|
| 246 |
|
|
| 247 |
/// \name Named Template Parameters |
|
| 248 |
|
|
| 249 |
///@{
|
|
| 250 |
|
|
| 251 |
template <class T> |
|
| 252 |
struct SetPredMapTraits : public Traits {
|
|
| 253 |
typedef T PredMap; |
|
| 254 |
static PredMap *createPredMap(const Digraph&) {
|
|
| 255 |
LEMON_ASSERT(false, "PredMap is not initialized"); |
|
| 256 |
return 0; // ignore warnings |
|
| 257 |
} |
|
| 258 |
}; |
|
| 259 |
|
|
| 260 |
/// \brief \ref named-templ-param "Named parameter" for setting |
|
| 261 |
/// \c PredMap type. |
|
| 262 |
/// |
|
| 263 |
/// \ref named-templ-param "Named parameter" for setting |
|
| 264 |
/// \c PredMap type. |
|
| 265 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 266 |
template <class T> |
|
| 267 |
struct SetPredMap |
|
| 268 |
: public BellmanFord< Digraph, LengthMap, SetPredMapTraits<T> > {
|
|
| 269 |
typedef BellmanFord< Digraph, LengthMap, SetPredMapTraits<T> > Create; |
|
| 270 |
}; |
|
| 271 |
|
|
| 272 |
template <class T> |
|
| 273 |
struct SetDistMapTraits : public Traits {
|
|
| 274 |
typedef T DistMap; |
|
| 275 |
static DistMap *createDistMap(const Digraph&) {
|
|
| 276 |
LEMON_ASSERT(false, "DistMap is not initialized"); |
|
| 277 |
return 0; // ignore warnings |
|
| 278 |
} |
|
| 279 |
}; |
|
| 280 |
|
|
| 281 |
/// \brief \ref named-templ-param "Named parameter" for setting |
|
| 282 |
/// \c DistMap type. |
|
| 283 |
/// |
|
| 284 |
/// \ref named-templ-param "Named parameter" for setting |
|
| 285 |
/// \c DistMap type. |
|
| 286 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 287 |
template <class T> |
|
| 288 |
struct SetDistMap |
|
| 289 |
: public BellmanFord< Digraph, LengthMap, SetDistMapTraits<T> > {
|
|
| 290 |
typedef BellmanFord< Digraph, LengthMap, SetDistMapTraits<T> > Create; |
|
| 291 |
}; |
|
| 292 |
|
|
| 293 |
template <class T> |
|
| 294 |
struct SetOperationTraitsTraits : public Traits {
|
|
| 295 |
typedef T OperationTraits; |
|
| 296 |
}; |
|
| 297 |
|
|
| 298 |
/// \brief \ref named-templ-param "Named parameter" for setting |
|
| 299 |
/// \c OperationTraits type. |
|
| 300 |
/// |
|
| 301 |
/// \ref named-templ-param "Named parameter" for setting |
|
| 302 |
/// \c OperationTraits type. |
|
| 303 |
/// For more information see \ref BellmanFordDefaultOperationTraits. |
|
| 304 |
template <class T> |
|
| 305 |
struct SetOperationTraits |
|
| 306 |
: public BellmanFord< Digraph, LengthMap, SetOperationTraitsTraits<T> > {
|
|
| 307 |
typedef BellmanFord< Digraph, LengthMap, SetOperationTraitsTraits<T> > |
|
| 308 |
Create; |
|
| 309 |
}; |
|
| 310 |
|
|
| 311 |
///@} |
|
| 312 |
|
|
| 313 |
protected: |
|
| 314 |
|
|
| 315 |
BellmanFord() {}
|
|
| 316 |
|
|
| 317 |
public: |
|
| 318 |
|
|
| 319 |
/// \brief Constructor. |
|
| 320 |
/// |
|
| 321 |
/// Constructor. |
|
| 322 |
/// \param g The digraph the algorithm runs on. |
|
| 323 |
/// \param length The length map used by the algorithm. |
|
| 324 |
BellmanFord(const Digraph& g, const LengthMap& length) : |
|
| 325 |
_gr(&g), _length(&length), |
|
| 326 |
_pred(0), _local_pred(false), |
|
| 327 |
_dist(0), _local_dist(false), _mask(0) {}
|
|
| 328 |
|
|
| 329 |
///Destructor. |
|
| 330 |
~BellmanFord() {
|
|
| 331 |
if(_local_pred) delete _pred; |
|
| 332 |
if(_local_dist) delete _dist; |
|
| 333 |
if(_mask) delete _mask; |
|
| 334 |
} |
|
| 335 |
|
|
| 336 |
/// \brief Sets the length map. |
|
| 337 |
/// |
|
| 338 |
/// Sets the length map. |
|
| 339 |
/// \return <tt>(*this)</tt> |
|
| 340 |
BellmanFord &lengthMap(const LengthMap &map) {
|
|
| 341 |
_length = ↦ |
|
| 342 |
return *this; |
|
| 343 |
} |
|
| 344 |
|
|
| 345 |
/// \brief Sets the map that stores the predecessor arcs. |
|
| 346 |
/// |
|
| 347 |
/// Sets the map that stores the predecessor arcs. |
|
| 348 |
/// If you don't use this function before calling \ref run() |
|
| 349 |
/// or \ref init(), an instance will be allocated automatically. |
|
| 350 |
/// The destructor deallocates this automatically allocated map, |
|
| 351 |
/// of course. |
|
| 352 |
/// \return <tt>(*this)</tt> |
|
| 353 |
BellmanFord &predMap(PredMap &map) {
|
|
| 354 |
if(_local_pred) {
|
|
| 355 |
delete _pred; |
|
| 356 |
_local_pred=false; |
|
| 357 |
} |
|
| 358 |
_pred = ↦ |
|
| 359 |
return *this; |
|
| 360 |
} |
|
| 361 |
|
|
| 362 |
/// \brief Sets the map that stores the distances of the nodes. |
|
| 363 |
/// |
|
| 364 |
/// Sets the map that stores the distances of the nodes calculated |
|
| 365 |
/// by the algorithm. |
|
| 366 |
/// If you don't use this function before calling \ref run() |
|
| 367 |
/// or \ref init(), an instance will be allocated automatically. |
|
| 368 |
/// The destructor deallocates this automatically allocated map, |
|
| 369 |
/// of course. |
|
| 370 |
/// \return <tt>(*this)</tt> |
|
| 371 |
BellmanFord &distMap(DistMap &map) {
|
|
| 372 |
if(_local_dist) {
|
|
| 373 |
delete _dist; |
|
| 374 |
_local_dist=false; |
|
| 375 |
} |
|
| 376 |
_dist = ↦ |
|
| 377 |
return *this; |
|
| 378 |
} |
|
| 379 |
|
|
| 380 |
/// \name Execution Control |
|
| 381 |
/// The simplest way to execute the Bellman-Ford algorithm is to use |
|
| 382 |
/// one of the member functions called \ref run().\n |
|
| 383 |
/// If you need better control on the execution, you have to call |
|
| 384 |
/// \ref init() first, then you can add several source nodes |
|
| 385 |
/// with \ref addSource(). Finally the actual path computation can be |
|
| 386 |
/// performed with \ref start(), \ref checkedStart() or |
|
| 387 |
/// \ref limitedStart(). |
|
| 388 |
|
|
| 389 |
///@{
|
|
| 390 |
|
|
| 391 |
/// \brief Initializes the internal data structures. |
|
| 392 |
/// |
|
| 393 |
/// Initializes the internal data structures. The optional parameter |
|
| 394 |
/// is the initial distance of each node. |
|
| 395 |
void init(const Value value = OperationTraits::infinity()) {
|
|
| 396 |
create_maps(); |
|
| 397 |
for (NodeIt it(*_gr); it != INVALID; ++it) {
|
|
| 398 |
_pred->set(it, INVALID); |
|
| 399 |
_dist->set(it, value); |
|
| 400 |
} |
|
| 401 |
_process.clear(); |
|
| 402 |
if (OperationTraits::less(value, OperationTraits::infinity())) {
|
|
| 403 |
for (NodeIt it(*_gr); it != INVALID; ++it) {
|
|
| 404 |
_process.push_back(it); |
|
| 405 |
_mask->set(it, true); |
|
| 406 |
} |
|
| 407 |
} |
|
| 408 |
} |
|
| 409 |
|
|
| 410 |
/// \brief Adds a new source node. |
|
| 411 |
/// |
|
| 412 |
/// This function adds a new source node. The optional second parameter |
|
| 413 |
/// is the initial distance of the node. |
|
| 414 |
void addSource(Node source, Value dst = OperationTraits::zero()) {
|
|
| 415 |
_dist->set(source, dst); |
|
| 416 |
if (!(*_mask)[source]) {
|
|
| 417 |
_process.push_back(source); |
|
| 418 |
_mask->set(source, true); |
|
| 419 |
} |
|
| 420 |
} |
|
| 421 |
|
|
| 422 |
/// \brief Executes one round from the Bellman-Ford algorithm. |
|
| 423 |
/// |
|
| 424 |
/// If the algoritm calculated the distances in the previous round |
|
| 425 |
/// exactly for the paths of at most \c k arcs, then this function |
|
| 426 |
/// will calculate the distances exactly for the paths of at most |
|
| 427 |
/// <tt>k+1</tt> arcs. Performing \c k iterations using this function |
|
| 428 |
/// calculates the shortest path distances exactly for the paths |
|
| 429 |
/// consisting of at most \c k arcs. |
|
| 430 |
/// |
|
| 431 |
/// \warning The paths with limited arc number cannot be retrieved |
|
| 432 |
/// easily with \ref path() or \ref predArc() functions. If you also |
|
| 433 |
/// need the shortest paths and not only the distances, you should |
|
| 434 |
/// store the \ref predMap() "predecessor map" after each iteration |
|
| 435 |
/// and build the path manually. |
|
| 436 |
/// |
|
| 437 |
/// \return \c true when the algorithm have not found more shorter |
|
| 438 |
/// paths. |
|
| 439 |
/// |
|
| 440 |
/// \see ActiveIt |
|
| 441 |
bool processNextRound() {
|
|
| 442 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 443 |
_mask->set(_process[i], false); |
|
| 444 |
} |
|
| 445 |
std::vector<Node> nextProcess; |
|
| 446 |
std::vector<Value> values(_process.size()); |
|
| 447 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 448 |
values[i] = (*_dist)[_process[i]]; |
|
| 449 |
} |
|
| 450 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 451 |
for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
|
|
| 452 |
Node target = _gr->target(it); |
|
| 453 |
Value relaxed = OperationTraits::plus(values[i], (*_length)[it]); |
|
| 454 |
if (OperationTraits::less(relaxed, (*_dist)[target])) {
|
|
| 455 |
_pred->set(target, it); |
|
| 456 |
_dist->set(target, relaxed); |
|
| 457 |
if (!(*_mask)[target]) {
|
|
| 458 |
_mask->set(target, true); |
|
| 459 |
nextProcess.push_back(target); |
|
| 460 |
} |
|
| 461 |
} |
|
| 462 |
} |
|
| 463 |
} |
|
| 464 |
_process.swap(nextProcess); |
|
| 465 |
return _process.empty(); |
|
| 466 |
} |
|
| 467 |
|
|
| 468 |
/// \brief Executes one weak round from the Bellman-Ford algorithm. |
|
| 469 |
/// |
|
| 470 |
/// If the algorithm calculated the distances in the previous round |
|
| 471 |
/// at least for the paths of at most \c k arcs, then this function |
|
| 472 |
/// will calculate the distances at least for the paths of at most |
|
| 473 |
/// <tt>k+1</tt> arcs. |
|
| 474 |
/// This function does not make it possible to calculate the shortest |
|
| 475 |
/// path distances exactly for paths consisting of at most \c k arcs, |
|
| 476 |
/// this is why it is called weak round. |
|
| 477 |
/// |
|
| 478 |
/// \return \c true when the algorithm have not found more shorter |
|
| 479 |
/// paths. |
|
| 480 |
/// |
|
| 481 |
/// \see ActiveIt |
|
| 482 |
bool processNextWeakRound() {
|
|
| 483 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 484 |
_mask->set(_process[i], false); |
|
| 485 |
} |
|
| 486 |
std::vector<Node> nextProcess; |
|
| 487 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 488 |
for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
|
|
| 489 |
Node target = _gr->target(it); |
|
| 490 |
Value relaxed = |
|
| 491 |
OperationTraits::plus((*_dist)[_process[i]], (*_length)[it]); |
|
| 492 |
if (OperationTraits::less(relaxed, (*_dist)[target])) {
|
|
| 493 |
_pred->set(target, it); |
|
| 494 |
_dist->set(target, relaxed); |
|
| 495 |
if (!(*_mask)[target]) {
|
|
| 496 |
_mask->set(target, true); |
|
| 497 |
nextProcess.push_back(target); |
|
| 498 |
} |
|
| 499 |
} |
|
| 500 |
} |
|
| 501 |
} |
|
| 502 |
_process.swap(nextProcess); |
|
| 503 |
return _process.empty(); |
|
| 504 |
} |
|
| 505 |
|
|
| 506 |
/// \brief Executes the algorithm. |
|
| 507 |
/// |
|
| 508 |
/// Executes the algorithm. |
|
| 509 |
/// |
|
| 510 |
/// This method runs the Bellman-Ford algorithm from the root node(s) |
|
| 511 |
/// in order to compute the shortest path to each node. |
|
| 512 |
/// |
|
| 513 |
/// The algorithm computes |
|
| 514 |
/// - the shortest path tree (forest), |
|
| 515 |
/// - the distance of each node from the root(s). |
|
| 516 |
/// |
|
| 517 |
/// \pre init() must be called and at least one root node should be |
|
| 518 |
/// added with addSource() before using this function. |
|
| 519 |
void start() {
|
|
| 520 |
int num = countNodes(*_gr) - 1; |
|
| 521 |
for (int i = 0; i < num; ++i) {
|
|
| 522 |
if (processNextWeakRound()) break; |
|
| 523 |
} |
|
| 524 |
} |
|
| 525 |
|
|
| 526 |
/// \brief Executes the algorithm and checks the negative cycles. |
|
| 527 |
/// |
|
| 528 |
/// Executes the algorithm and checks the negative cycles. |
|
| 529 |
/// |
|
| 530 |
/// This method runs the Bellman-Ford algorithm from the root node(s) |
|
| 531 |
/// in order to compute the shortest path to each node and also checks |
|
| 532 |
/// if the digraph contains cycles with negative total length. |
|
| 533 |
/// |
|
| 534 |
/// The algorithm computes |
|
| 535 |
/// - the shortest path tree (forest), |
|
| 536 |
/// - the distance of each node from the root(s). |
|
| 537 |
/// |
|
| 538 |
/// \return \c false if there is a negative cycle in the digraph. |
|
| 539 |
/// |
|
| 540 |
/// \pre init() must be called and at least one root node should be |
|
| 541 |
/// added with addSource() before using this function. |
|
| 542 |
bool checkedStart() {
|
|
| 543 |
int num = countNodes(*_gr); |
|
| 544 |
for (int i = 0; i < num; ++i) {
|
|
| 545 |
if (processNextWeakRound()) return true; |
|
| 546 |
} |
|
| 547 |
return _process.empty(); |
|
| 548 |
} |
|
| 549 |
|
|
| 550 |
/// \brief Executes the algorithm with arc number limit. |
|
| 551 |
/// |
|
| 552 |
/// Executes the algorithm with arc number limit. |
|
| 553 |
/// |
|
| 554 |
/// This method runs the Bellman-Ford algorithm from the root node(s) |
|
| 555 |
/// in order to compute the shortest path distance for each node |
|
| 556 |
/// using only the paths consisting of at most \c num arcs. |
|
| 557 |
/// |
|
| 558 |
/// The algorithm computes |
|
| 559 |
/// - the limited distance of each node from the root(s), |
|
| 560 |
/// - the predecessor arc for each node. |
|
| 561 |
/// |
|
| 562 |
/// \warning The paths with limited arc number cannot be retrieved |
|
| 563 |
/// easily with \ref path() or \ref predArc() functions. If you also |
|
| 564 |
/// need the shortest paths and not only the distances, you should |
|
| 565 |
/// store the \ref predMap() "predecessor map" after each iteration |
|
| 566 |
/// and build the path manually. |
|
| 567 |
/// |
|
| 568 |
/// \pre init() must be called and at least one root node should be |
|
| 569 |
/// added with addSource() before using this function. |
|
| 570 |
void limitedStart(int num) {
|
|
| 571 |
for (int i = 0; i < num; ++i) {
|
|
| 572 |
if (processNextRound()) break; |
|
| 573 |
} |
|
| 574 |
} |
|
| 575 |
|
|
| 576 |
/// \brief Runs the algorithm from the given root node. |
|
| 577 |
/// |
|
| 578 |
/// This method runs the Bellman-Ford algorithm from the given root |
|
| 579 |
/// node \c s in order to compute the shortest path to each node. |
|
| 580 |
/// |
|
| 581 |
/// The algorithm computes |
|
| 582 |
/// - the shortest path tree (forest), |
|
| 583 |
/// - the distance of each node from the root(s). |
|
| 584 |
/// |
|
| 585 |
/// \note bf.run(s) is just a shortcut of the following code. |
|
| 586 |
/// \code |
|
| 587 |
/// bf.init(); |
|
| 588 |
/// bf.addSource(s); |
|
| 589 |
/// bf.start(); |
|
| 590 |
/// \endcode |
|
| 591 |
void run(Node s) {
|
|
| 592 |
init(); |
|
| 593 |
addSource(s); |
|
| 594 |
start(); |
|
| 595 |
} |
|
| 596 |
|
|
| 597 |
/// \brief Runs the algorithm from the given root node with arc |
|
| 598 |
/// number limit. |
|
| 599 |
/// |
|
| 600 |
/// This method runs the Bellman-Ford algorithm from the given root |
|
| 601 |
/// node \c s in order to compute the shortest path distance for each |
|
| 602 |
/// node using only the paths consisting of at most \c num arcs. |
|
| 603 |
/// |
|
| 604 |
/// The algorithm computes |
|
| 605 |
/// - the limited distance of each node from the root(s), |
|
| 606 |
/// - the predecessor arc for each node. |
|
| 607 |
/// |
|
| 608 |
/// \warning The paths with limited arc number cannot be retrieved |
|
| 609 |
/// easily with \ref path() or \ref predArc() functions. If you also |
|
| 610 |
/// need the shortest paths and not only the distances, you should |
|
| 611 |
/// store the \ref predMap() "predecessor map" after each iteration |
|
| 612 |
/// and build the path manually. |
|
| 613 |
/// |
|
| 614 |
/// \note bf.run(s, num) is just a shortcut of the following code. |
|
| 615 |
/// \code |
|
| 616 |
/// bf.init(); |
|
| 617 |
/// bf.addSource(s); |
|
| 618 |
/// bf.limitedStart(num); |
|
| 619 |
/// \endcode |
|
| 620 |
void run(Node s, int num) {
|
|
| 621 |
init(); |
|
| 622 |
addSource(s); |
|
| 623 |
limitedStart(num); |
|
| 624 |
} |
|
| 625 |
|
|
| 626 |
///@} |
|
| 627 |
|
|
| 628 |
/// \brief LEMON iterator for getting the active nodes. |
|
| 629 |
/// |
|
| 630 |
/// This class provides a common style LEMON iterator that traverses |
|
| 631 |
/// the active nodes of the Bellman-Ford algorithm after the last |
|
| 632 |
/// phase. These nodes should be checked in the next phase to |
|
| 633 |
/// find augmenting arcs outgoing from them. |
|
| 634 |
class ActiveIt {
|
|
| 635 |
public: |
|
| 636 |
|
|
| 637 |
/// \brief Constructor. |
|
| 638 |
/// |
|
| 639 |
/// Constructor for getting the active nodes of the given BellmanFord |
|
| 640 |
/// instance. |
|
| 641 |
ActiveIt(const BellmanFord& algorithm) : _algorithm(&algorithm) |
|
| 642 |
{
|
|
| 643 |
_index = _algorithm->_process.size() - 1; |
|
| 644 |
} |
|
| 645 |
|
|
| 646 |
/// \brief Invalid constructor. |
|
| 647 |
/// |
|
| 648 |
/// Invalid constructor. |
|
| 649 |
ActiveIt(Invalid) : _algorithm(0), _index(-1) {}
|
|
| 650 |
|
|
| 651 |
/// \brief Conversion to \c Node. |
|
| 652 |
/// |
|
| 653 |
/// Conversion to \c Node. |
|
| 654 |
operator Node() const {
|
|
| 655 |
return _index >= 0 ? _algorithm->_process[_index] : INVALID; |
|
| 656 |
} |
|
| 657 |
|
|
| 658 |
/// \brief Increment operator. |
|
| 659 |
/// |
|
| 660 |
/// Increment operator. |
|
| 661 |
ActiveIt& operator++() {
|
|
| 662 |
--_index; |
|
| 663 |
return *this; |
|
| 664 |
} |
|
| 665 |
|
|
| 666 |
bool operator==(const ActiveIt& it) const {
|
|
| 667 |
return static_cast<Node>(*this) == static_cast<Node>(it); |
|
| 668 |
} |
|
| 669 |
bool operator!=(const ActiveIt& it) const {
|
|
| 670 |
return static_cast<Node>(*this) != static_cast<Node>(it); |
|
| 671 |
} |
|
| 672 |
bool operator<(const ActiveIt& it) const {
|
|
| 673 |
return static_cast<Node>(*this) < static_cast<Node>(it); |
|
| 674 |
} |
|
| 675 |
|
|
| 676 |
private: |
|
| 677 |
const BellmanFord* _algorithm; |
|
| 678 |
int _index; |
|
| 679 |
}; |
|
| 680 |
|
|
| 681 |
/// \name Query Functions |
|
| 682 |
/// The result of the Bellman-Ford algorithm can be obtained using these |
|
| 683 |
/// functions.\n |
|
| 684 |
/// Either \ref run() or \ref init() should be called before using them. |
|
| 685 |
|
|
| 686 |
///@{
|
|
| 687 |
|
|
| 688 |
/// \brief The shortest path to the given node. |
|
| 689 |
/// |
|
| 690 |
/// Gives back the shortest path to the given node from the root(s). |
|
| 691 |
/// |
|
| 692 |
/// \warning \c t should be reached from the root(s). |
|
| 693 |
/// |
|
| 694 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 695 |
/// using this function. |
|
| 696 |
Path path(Node t) const |
|
| 697 |
{
|
|
| 698 |
return Path(*_gr, *_pred, t); |
|
| 699 |
} |
|
| 700 |
|
|
| 701 |
/// \brief The distance of the given node from the root(s). |
|
| 702 |
/// |
|
| 703 |
/// Returns the distance of the given node from the root(s). |
|
| 704 |
/// |
|
| 705 |
/// \warning If node \c v is not reached from the root(s), then |
|
| 706 |
/// the return value of this function is undefined. |
|
| 707 |
/// |
|
| 708 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 709 |
/// using this function. |
|
| 710 |
Value dist(Node v) const { return (*_dist)[v]; }
|
|
| 711 |
|
|
| 712 |
/// \brief Returns the 'previous arc' of the shortest path tree for |
|
| 713 |
/// the given node. |
|
| 714 |
/// |
|
| 715 |
/// This function returns the 'previous arc' of the shortest path |
|
| 716 |
/// tree for node \c v, i.e. it returns the last arc of a |
|
| 717 |
/// shortest path from a root to \c v. It is \c INVALID if \c v |
|
| 718 |
/// is not reached from the root(s) or if \c v is a root. |
|
| 719 |
/// |
|
| 720 |
/// The shortest path tree used here is equal to the shortest path |
|
| 721 |
/// tree used in \ref predNode() and \predMap(). |
|
| 722 |
/// |
|
| 723 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 724 |
/// using this function. |
|
| 725 |
Arc predArc(Node v) const { return (*_pred)[v]; }
|
|
| 726 |
|
|
| 727 |
/// \brief Returns the 'previous node' of the shortest path tree for |
|
| 728 |
/// the given node. |
|
| 729 |
/// |
|
| 730 |
/// This function returns the 'previous node' of the shortest path |
|
| 731 |
/// tree for node \c v, i.e. it returns the last but one node of |
|
| 732 |
/// a shortest path from a root to \c v. It is \c INVALID if \c v |
|
| 733 |
/// is not reached from the root(s) or if \c v is a root. |
|
| 734 |
/// |
|
| 735 |
/// The shortest path tree used here is equal to the shortest path |
|
| 736 |
/// tree used in \ref predArc() and \predMap(). |
|
| 737 |
/// |
|
| 738 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 739 |
/// using this function. |
|
| 740 |
Node predNode(Node v) const {
|
|
| 741 |
return (*_pred)[v] == INVALID ? INVALID : _gr->source((*_pred)[v]); |
|
| 742 |
} |
|
| 743 |
|
|
| 744 |
/// \brief Returns a const reference to the node map that stores the |
|
| 745 |
/// distances of the nodes. |
|
| 746 |
/// |
|
| 747 |
/// Returns a const reference to the node map that stores the distances |
|
| 748 |
/// of the nodes calculated by the algorithm. |
|
| 749 |
/// |
|
| 750 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 751 |
/// using this function. |
|
| 752 |
const DistMap &distMap() const { return *_dist;}
|
|
| 753 |
|
|
| 754 |
/// \brief Returns a const reference to the node map that stores the |
|
| 755 |
/// predecessor arcs. |
|
| 756 |
/// |
|
| 757 |
/// Returns a const reference to the node map that stores the predecessor |
|
| 758 |
/// arcs, which form the shortest path tree (forest). |
|
| 759 |
/// |
|
| 760 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 761 |
/// using this function. |
|
| 762 |
const PredMap &predMap() const { return *_pred; }
|
|
| 763 |
|
|
| 764 |
/// \brief Checks if a node is reached from the root(s). |
|
| 765 |
/// |
|
| 766 |
/// Returns \c true if \c v is reached from the root(s). |
|
| 767 |
/// |
|
| 768 |
/// \pre Either \ref run() or \ref init() must be called before |
|
| 769 |
/// using this function. |
|
| 770 |
bool reached(Node v) const {
|
|
| 771 |
return (*_dist)[v] != OperationTraits::infinity(); |
|
| 772 |
} |
|
| 773 |
|
|
| 774 |
/// \brief Gives back a negative cycle. |
|
| 775 |
/// |
|
| 776 |
/// This function gives back a directed cycle with negative total |
|
| 777 |
/// length if the algorithm has already found one. |
|
| 778 |
/// Otherwise it gives back an empty path. |
|
| 779 |
lemon::Path<Digraph> negativeCycle() const {
|
|
| 780 |
typename Digraph::template NodeMap<int> state(*_gr, -1); |
|
| 781 |
lemon::Path<Digraph> cycle; |
|
| 782 |
for (int i = 0; i < int(_process.size()); ++i) {
|
|
| 783 |
if (state[_process[i]] != -1) continue; |
|
| 784 |
for (Node v = _process[i]; (*_pred)[v] != INVALID; |
|
| 785 |
v = _gr->source((*_pred)[v])) {
|
|
| 786 |
if (state[v] == i) {
|
|
| 787 |
cycle.addFront((*_pred)[v]); |
|
| 788 |
for (Node u = _gr->source((*_pred)[v]); u != v; |
|
| 789 |
u = _gr->source((*_pred)[u])) {
|
|
| 790 |
cycle.addFront((*_pred)[u]); |
|
| 791 |
} |
|
| 792 |
return cycle; |
|
| 793 |
} |
|
| 794 |
else if (state[v] >= 0) {
|
|
| 795 |
break; |
|
| 796 |
} |
|
| 797 |
state[v] = i; |
|
| 798 |
} |
|
| 799 |
} |
|
| 800 |
return cycle; |
|
| 801 |
} |
|
| 802 |
|
|
| 803 |
///@} |
|
| 804 |
}; |
|
| 805 |
|
|
| 806 |
/// \brief Default traits class of bellmanFord() function. |
|
| 807 |
/// |
|
| 808 |
/// Default traits class of bellmanFord() function. |
|
| 809 |
/// \tparam GR The type of the digraph. |
|
| 810 |
/// \tparam LEN The type of the length map. |
|
| 811 |
template <typename GR, typename LEN> |
|
| 812 |
struct BellmanFordWizardDefaultTraits {
|
|
| 813 |
/// The type of the digraph the algorithm runs on. |
|
| 814 |
typedef GR Digraph; |
|
| 815 |
|
|
| 816 |
/// \brief The type of the map that stores the arc lengths. |
|
| 817 |
/// |
|
| 818 |
/// The type of the map that stores the arc lengths. |
|
| 819 |
/// It must meet the \ref concepts::ReadMap "ReadMap" concept. |
|
| 820 |
typedef LEN LengthMap; |
|
| 821 |
|
|
| 822 |
/// The type of the arc lengths. |
|
| 823 |
typedef typename LEN::Value Value; |
|
| 824 |
|
|
| 825 |
/// \brief Operation traits for Bellman-Ford algorithm. |
|
| 826 |
/// |
|
| 827 |
/// It defines the used operations and the infinity value for the |
|
| 828 |
/// given \c Value type. |
|
| 829 |
/// \see BellmanFordDefaultOperationTraits |
|
| 830 |
typedef BellmanFordDefaultOperationTraits<Value> OperationTraits; |
|
| 831 |
|
|
| 832 |
/// \brief The type of the map that stores the last |
|
| 833 |
/// arcs of the shortest paths. |
|
| 834 |
/// |
|
| 835 |
/// The type of the map that stores the last arcs of the shortest paths. |
|
| 836 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 837 |
typedef typename GR::template NodeMap<typename GR::Arc> PredMap; |
|
| 838 |
|
|
| 839 |
/// \brief Instantiates a \c PredMap. |
|
| 840 |
/// |
|
| 841 |
/// This function instantiates a \ref PredMap. |
|
| 842 |
/// \param g is the digraph to which we would like to define the |
|
| 843 |
/// \ref PredMap. |
|
| 844 |
static PredMap *createPredMap(const GR &g) {
|
|
| 845 |
return new PredMap(g); |
|
| 846 |
} |
|
| 847 |
|
|
| 848 |
/// \brief The type of the map that stores the distances of the nodes. |
|
| 849 |
/// |
|
| 850 |
/// The type of the map that stores the distances of the nodes. |
|
| 851 |
/// It must conform to the \ref concepts::WriteMap "WriteMap" concept. |
|
| 852 |
typedef typename GR::template NodeMap<Value> DistMap; |
|
| 853 |
|
|
| 854 |
/// \brief Instantiates a \c DistMap. |
|
| 855 |
/// |
|
| 856 |
/// This function instantiates a \ref DistMap. |
|
| 857 |
/// \param g is the digraph to which we would like to define the |
|
| 858 |
/// \ref DistMap. |
|
| 859 |
static DistMap *createDistMap(const GR &g) {
|
|
| 860 |
return new DistMap(g); |
|
| 861 |
} |
|
| 862 |
|
|
| 863 |
///The type of the shortest paths. |
|
| 864 |
|
|
| 865 |
///The type of the shortest paths. |
|
| 866 |
///It must meet the \ref concepts::Path "Path" concept. |
|
| 867 |
typedef lemon::Path<Digraph> Path; |
|
| 868 |
}; |
|
| 869 |
|
|
| 870 |
/// \brief Default traits class used by BellmanFordWizard. |
|
| 871 |
/// |
|
| 872 |
/// Default traits class used by BellmanFordWizard. |
|
| 873 |
/// \tparam GR The type of the digraph. |
|
| 874 |
/// \tparam LEN The type of the length map. |
|
| 875 |
template <typename GR, typename LEN> |
|
| 876 |
class BellmanFordWizardBase |
|
| 877 |
: public BellmanFordWizardDefaultTraits<GR, LEN> {
|
|
| 878 |
|
|
| 879 |
typedef BellmanFordWizardDefaultTraits<GR, LEN> Base; |
|
| 880 |
protected: |
|
| 881 |
// Type of the nodes in the digraph. |
|
| 882 |
typedef typename Base::Digraph::Node Node; |
|
| 883 |
|
|
| 884 |
// Pointer to the underlying digraph. |
|
| 885 |
void *_graph; |
|
| 886 |
// Pointer to the length map |
|
| 887 |
void *_length; |
|
| 888 |
// Pointer to the map of predecessors arcs. |
|
| 889 |
void *_pred; |
|
| 890 |
// Pointer to the map of distances. |
|
| 891 |
void *_dist; |
|
| 892 |
//Pointer to the shortest path to the target node. |
|
| 893 |
void *_path; |
|
| 894 |
//Pointer to the distance of the target node. |
|
| 895 |
void *_di; |
|
| 896 |
|
|
| 897 |
public: |
|
| 898 |
/// Constructor. |
|
| 899 |
|
|
| 900 |
/// This constructor does not require parameters, it initiates |
|
| 901 |
/// all of the attributes to default values \c 0. |
|
| 902 |
BellmanFordWizardBase() : |
|
| 903 |
_graph(0), _length(0), _pred(0), _dist(0), _path(0), _di(0) {}
|
|
| 904 |
|
|
| 905 |
/// Constructor. |
|
| 906 |
|
|
| 907 |
/// This constructor requires two parameters, |
|
| 908 |
/// others are initiated to \c 0. |
|
| 909 |
/// \param gr The digraph the algorithm runs on. |
|
| 910 |
/// \param len The length map. |
|
| 911 |
BellmanFordWizardBase(const GR& gr, |
|
| 912 |
const LEN& len) : |
|
| 913 |
_graph(reinterpret_cast<void*>(const_cast<GR*>(&gr))), |
|
| 914 |
_length(reinterpret_cast<void*>(const_cast<LEN*>(&len))), |
|
| 915 |
_pred(0), _dist(0), _path(0), _di(0) {}
|
|
| 916 |
|
|
| 917 |
}; |
|
| 918 |
|
|
| 919 |
/// \brief Auxiliary class for the function-type interface of the |
|
| 920 |
/// \ref BellmanFord "Bellman-Ford" algorithm. |
|
| 921 |
/// |
|
| 922 |
/// This auxiliary class is created to implement the |
|
| 923 |
/// \ref bellmanFord() "function-type interface" of the |
|
| 924 |
/// \ref BellmanFord "Bellman-Ford" algorithm. |
|
| 925 |
/// It does not have own \ref run() method, it uses the |
|
| 926 |
/// functions and features of the plain \ref BellmanFord. |
|
| 927 |
/// |
|
| 928 |
/// This class should only be used through the \ref bellmanFord() |
|
| 929 |
/// function, which makes it easier to use the algorithm. |
|
| 930 |
template<class TR> |
|
| 931 |
class BellmanFordWizard : public TR {
|
|
| 932 |
typedef TR Base; |
|
| 933 |
|
|
| 934 |
typedef typename TR::Digraph Digraph; |
|
| 935 |
|
|
| 936 |
typedef typename Digraph::Node Node; |
|
| 937 |
typedef typename Digraph::NodeIt NodeIt; |
|
| 938 |
typedef typename Digraph::Arc Arc; |
|
| 939 |
typedef typename Digraph::OutArcIt ArcIt; |
|
| 940 |
|
|
| 941 |
typedef typename TR::LengthMap LengthMap; |
|
| 942 |
typedef typename LengthMap::Value Value; |
|
| 943 |
typedef typename TR::PredMap PredMap; |
|
| 944 |
typedef typename TR::DistMap DistMap; |
|
| 945 |
typedef typename TR::Path Path; |
|
| 946 |
|
|
| 947 |
public: |
|
| 948 |
/// Constructor. |
|
| 949 |
BellmanFordWizard() : TR() {}
|
|
| 950 |
|
|
| 951 |
/// \brief Constructor that requires parameters. |
|
| 952 |
/// |
|
| 953 |
/// Constructor that requires parameters. |
|
| 954 |
/// These parameters will be the default values for the traits class. |
|
| 955 |
/// \param gr The digraph the algorithm runs on. |
|
| 956 |
/// \param len The length map. |
|
| 957 |
BellmanFordWizard(const Digraph& gr, const LengthMap& len) |
|
| 958 |
: TR(gr, len) {}
|
|
| 959 |
|
|
| 960 |
/// \brief Copy constructor |
|
| 961 |
BellmanFordWizard(const TR &b) : TR(b) {}
|
|
| 962 |
|
|
| 963 |
~BellmanFordWizard() {}
|
|
| 964 |
|
|
| 965 |
/// \brief Runs the Bellman-Ford algorithm from the given source node. |
|
| 966 |
/// |
|
| 967 |
/// This method runs the Bellman-Ford algorithm from the given source |
|
| 968 |
/// node in order to compute the shortest path to each node. |
|
| 969 |
void run(Node s) {
|
|
| 970 |
BellmanFord<Digraph,LengthMap,TR> |
|
| 971 |
bf(*reinterpret_cast<const Digraph*>(Base::_graph), |
|
| 972 |
*reinterpret_cast<const LengthMap*>(Base::_length)); |
|
| 973 |
if (Base::_pred) bf.predMap(*reinterpret_cast<PredMap*>(Base::_pred)); |
|
| 974 |
if (Base::_dist) bf.distMap(*reinterpret_cast<DistMap*>(Base::_dist)); |
|
| 975 |
bf.run(s); |
|
| 976 |
} |
|
| 977 |
|
|
| 978 |
/// \brief Runs the Bellman-Ford algorithm to find the shortest path |
|
| 979 |
/// between \c s and \c t. |
|
| 980 |
/// |
|
| 981 |
/// This method runs the Bellman-Ford algorithm from node \c s |
|
| 982 |
/// in order to compute the shortest path to node \c t. |
|
| 983 |
/// Actually, it computes the shortest path to each node, but using |
|
| 984 |
/// this function you can retrieve the distance and the shortest path |
|
| 985 |
/// for a single target node easier. |
|
| 986 |
/// |
|
| 987 |
/// \return \c true if \c t is reachable form \c s. |
|
| 988 |
bool run(Node s, Node t) {
|
|
| 989 |
BellmanFord<Digraph,LengthMap,TR> |
|
| 990 |
bf(*reinterpret_cast<const Digraph*>(Base::_graph), |
|
| 991 |
*reinterpret_cast<const LengthMap*>(Base::_length)); |
|
| 992 |
if (Base::_pred) bf.predMap(*reinterpret_cast<PredMap*>(Base::_pred)); |
|
| 993 |
if (Base::_dist) bf.distMap(*reinterpret_cast<DistMap*>(Base::_dist)); |
|
| 994 |
bf.run(s); |
|
| 995 |
if (Base::_path) *reinterpret_cast<Path*>(Base::_path) = bf.path(t); |
|
| 996 |
if (Base::_di) *reinterpret_cast<Value*>(Base::_di) = bf.dist(t); |
|
| 997 |
return bf.reached(t); |
|
| 998 |
} |
|
| 999 |
|
|
| 1000 |
template<class T> |
|
| 1001 |
struct SetPredMapBase : public Base {
|
|
| 1002 |
typedef T PredMap; |
|
| 1003 |
static PredMap *createPredMap(const Digraph &) { return 0; };
|
|
| 1004 |
SetPredMapBase(const TR &b) : TR(b) {}
|
|
| 1005 |
}; |
|
| 1006 |
|
|
| 1007 |
/// \brief \ref named-templ-param "Named parameter" for setting |
|
| 1008 |
/// the predecessor map. |
|
| 1009 |
/// |
|
| 1010 |
/// \ref named-templ-param "Named parameter" for setting |
|
| 1011 |
/// the map that stores the predecessor arcs of the nodes. |
|
| 1012 |
template<class T> |
|
| 1013 |
BellmanFordWizard<SetPredMapBase<T> > predMap(const T &t) {
|
|
| 1014 |
Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t)); |
|
| 1015 |
return BellmanFordWizard<SetPredMapBase<T> >(*this); |
|
| 1016 |
} |
|
| 1017 |
|
|
| 1018 |
template<class T> |
|
| 1019 |
struct SetDistMapBase : public Base {
|
|
| 1020 |
typedef T DistMap; |
|
| 1021 |
static DistMap *createDistMap(const Digraph &) { return 0; };
|
|
| 1022 |
SetDistMapBase(const TR &b) : TR(b) {}
|
|
| 1023 |
}; |
|
| 1024 |
|
|
| 1025 |
/// \brief \ref named-templ-param "Named parameter" for setting |
|
| 1026 |
/// the distance map. |
|
| 1027 |
/// |
|
| 1028 |
/// \ref named-templ-param "Named parameter" for setting |
|
| 1029 |
/// the map that stores the distances of the nodes calculated |
|
| 1030 |
/// by the algorithm. |
|
| 1031 |
template<class T> |
|
| 1032 |
BellmanFordWizard<SetDistMapBase<T> > distMap(const T &t) {
|
|
| 1033 |
Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t)); |
|
| 1034 |
return BellmanFordWizard<SetDistMapBase<T> >(*this); |
|
| 1035 |
} |
|
| 1036 |
|
|
| 1037 |
template<class T> |
|
| 1038 |
struct SetPathBase : public Base {
|
|
| 1039 |
typedef T Path; |
|
| 1040 |
SetPathBase(const TR &b) : TR(b) {}
|
|
| 1041 |
}; |
|
| 1042 |
|
|
| 1043 |
/// \brief \ref named-func-param "Named parameter" for getting |
|
| 1044 |
/// the shortest path to the target node. |
|
| 1045 |
/// |
|
| 1046 |
/// \ref named-func-param "Named parameter" for getting |
|
| 1047 |
/// the shortest path to the target node. |
|
| 1048 |
template<class T> |
|
| 1049 |
BellmanFordWizard<SetPathBase<T> > path(const T &t) |
|
| 1050 |
{
|
|
| 1051 |
Base::_path=reinterpret_cast<void*>(const_cast<T*>(&t)); |
|
| 1052 |
return BellmanFordWizard<SetPathBase<T> >(*this); |
|
| 1053 |
} |
|
| 1054 |
|
|
| 1055 |
/// \brief \ref named-func-param "Named parameter" for getting |
|
| 1056 |
/// the distance of the target node. |
|
| 1057 |
/// |
|
| 1058 |
/// \ref named-func-param "Named parameter" for getting |
|
| 1059 |
/// the distance of the target node. |
|
| 1060 |
BellmanFordWizard dist(const Value &d) |
|
| 1061 |
{
|
|
| 1062 |
Base::_di=reinterpret_cast<void*>(const_cast<Value*>(&d)); |
|
| 1063 |
return *this; |
|
| 1064 |
} |
|
| 1065 |
|
|
| 1066 |
}; |
|
| 1067 |
|
|
| 1068 |
/// \brief Function type interface for the \ref BellmanFord "Bellman-Ford" |
|
| 1069 |
/// algorithm. |
|
| 1070 |
/// |
|
| 1071 |
/// \ingroup shortest_path |
|
| 1072 |
/// Function type interface for the \ref BellmanFord "Bellman-Ford" |
|
| 1073 |
/// algorithm. |
|
| 1074 |
/// |
|
| 1075 |
/// This function also has several \ref named-templ-func-param |
|
| 1076 |
/// "named parameters", they are declared as the members of class |
|
| 1077 |
/// \ref BellmanFordWizard. |
|
| 1078 |
/// The following examples show how to use these parameters. |
|
| 1079 |
/// \code |
|
| 1080 |
/// // Compute shortest path from node s to each node |
|
| 1081 |
/// bellmanFord(g,length).predMap(preds).distMap(dists).run(s); |
|
| 1082 |
/// |
|
| 1083 |
/// // Compute shortest path from s to t |
|
| 1084 |
/// bool reached = bellmanFord(g,length).path(p).dist(d).run(s,t); |
|
| 1085 |
/// \endcode |
|
| 1086 |
/// \warning Don't forget to put the \ref BellmanFordWizard::run() "run()" |
|
| 1087 |
/// to the end of the parameter list. |
|
| 1088 |
/// \sa BellmanFordWizard |
|
| 1089 |
/// \sa BellmanFord |
|
| 1090 |
template<typename GR, typename LEN> |
|
| 1091 |
BellmanFordWizard<BellmanFordWizardBase<GR,LEN> > |
|
| 1092 |
bellmanFord(const GR& digraph, |
|
| 1093 |
const LEN& length) |
|
| 1094 |
{
|
|
| 1095 |
return BellmanFordWizard<BellmanFordWizardBase<GR,LEN> >(digraph, length); |
|
| 1096 |
} |
|
| 1097 |
|
|
| 1098 |
} //END OF NAMESPACE LEMON |
|
| 1099 |
|
|
| 1100 |
#endif |
|
| 1101 |
| ... | ... |
@@ -3,10 +3,37 @@ |
| 3 | 3 |
SET(PROJECT_NAME "LEMON") |
| 4 |
SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.") |
|
| 5 |
|
|
| 6 | 4 |
PROJECT(${PROJECT_NAME})
|
| 7 | 5 |
|
| 8 |
|
|
| 6 |
IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
|
|
| 7 |
INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
|
|
| 8 |
ELSEIF(DEFINED ENV{LEMON_VERSION})
|
|
| 9 |
SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
|
|
| 10 |
ELSE() |
|
| 11 |
EXECUTE_PROCESS( |
|
| 12 |
COMMAND hg id -i |
|
| 13 |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
| 14 |
OUTPUT_VARIABLE HG_REVISION |
|
| 15 |
ERROR_QUIET |
|
| 16 |
OUTPUT_STRIP_TRAILING_WHITESPACE |
|
| 17 |
) |
|
| 18 |
IF(HG_REVISION STREQUAL "") |
|
| 19 |
SET(HG_REVISION "hg-tip") |
|
| 20 |
ENDIF() |
|
| 21 |
SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
|
|
| 22 |
ENDIF() |
|
| 9 | 23 |
|
| 10 |
INCLUDE(FindDoxygen) |
|
| 11 |
INCLUDE(FindGhostscript) |
|
| 24 |
SET(PROJECT_VERSION ${LEMON_VERSION})
|
|
| 25 |
|
|
| 26 |
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
| 27 |
|
|
| 28 |
FIND_PACKAGE(Doxygen) |
|
| 29 |
FIND_PACKAGE(Ghostscript) |
|
| 30 |
FIND_PACKAGE(GLPK 4.33) |
|
| 31 |
FIND_PACKAGE(CPLEX) |
|
| 32 |
FIND_PACKAGE(COIN) |
|
| 33 |
|
|
| 34 |
INCLUDE(CheckTypeSize) |
|
| 35 |
CHECK_TYPE_SIZE("long long" LONG_LONG)
|
|
| 36 |
SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
|
|
| 37 |
|
|
| 38 |
INCLUDE(FindPythonInterp) |
|
| 12 | 39 |
|
| ... | ... |
@@ -15,18 +42,32 @@ |
| 15 | 42 |
ADD_SUBDIRECTORY(lemon) |
| 16 |
ADD_SUBDIRECTORY(demo) |
|
| 17 |
ADD_SUBDIRECTORY(doc) |
|
| 18 |
|
|
| 43 |
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
|
|
| 44 |
ADD_SUBDIRECTORY(demo) |
|
| 45 |
ADD_SUBDIRECTORY(tools) |
|
| 46 |
ADD_SUBDIRECTORY(doc) |
|
| 47 |
ADD_SUBDIRECTORY(test) |
|
| 48 |
ENDIF() |
|
| 19 | 49 |
|
| 20 |
IF(WIN32) |
|
| 21 |
INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico
|
|
| 22 |
DESTINATION bin) |
|
| 23 |
ENDIF(WIN32) |
|
| 50 |
CONFIGURE_FILE( |
|
| 51 |
${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
|
|
| 52 |
${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
|
|
| 53 |
@ONLY |
|
| 54 |
) |
|
| 55 |
IF(UNIX) |
|
| 56 |
INSTALL( |
|
| 57 |
FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
|
|
| 58 |
DESTINATION share/lemon/cmake |
|
| 59 |
) |
|
| 60 |
ELSEIF(WIN32) |
|
| 61 |
INSTALL( |
|
| 62 |
FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
|
|
| 63 |
DESTINATION cmake |
|
| 64 |
) |
|
| 65 |
ENDIF() |
|
| 24 | 66 |
|
| 25 |
IF(WIN32) |
|
| 67 |
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
|
|
| 26 | 68 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
| 27 |
SET(CPACK_PACKAGE_VENDOR |
|
| 28 |
"EGRES - Egervary Research Group on Combinatorial Optimization") |
|
| 69 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
|
| 29 | 70 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
| 30 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
|
| 31 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
|
| 71 |
"LEMON - Library for Efficient Modeling and Optimization in Networks") |
|
| 72 |
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
|
| 32 | 73 |
|
| ... | ... |
@@ -39,37 +80,39 @@ |
| 39 | 80 |
|
| 40 |
# Variables to generate a component-based installer. |
|
| 41 |
#SET(CPACK_COMPONENTS_ALL headers library html_documentation) |
|
| 81 |
SET(CPACK_COMPONENTS_ALL headers library html_documentation bin) |
|
| 42 | 82 |
|
| 43 |
#SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
|
| 44 |
#SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library") |
|
| 45 |
|
|
| 83 |
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
|
| 84 |
SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") |
|
| 85 |
SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") |
|
| 86 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
|
| 46 | 87 |
|
| 47 |
#SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
|
| 48 |
# "C++ header files for use with the LEMON library") |
|
| 49 |
#SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
|
| 50 |
# "Static library used to build programs with LEMON") |
|
| 51 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
|
| 52 |
# "Doxygen generated documentation") |
|
| 88 |
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
|
| 89 |
"C++ header files") |
|
| 90 |
SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
|
| 91 |
"DLL and import library") |
|
| 92 |
SET(CPACK_COMPONENT_BIN_DESCRIPTION |
|
| 93 |
"Command line utilities") |
|
| 94 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
|
| 95 |
"Doxygen generated documentation") |
|
| 53 | 96 |
|
| 54 |
|
|
| 97 |
SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
|
| 55 | 98 |
|
| 56 |
#SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
|
| 57 |
#SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
|
| 58 |
|
|
| 99 |
SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
|
| 100 |
SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
|
| 101 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
|
| 59 | 102 |
|
| 60 |
#SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
|
| 61 |
# "Components needed to develop software using LEMON") |
|
| 62 |
#SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
|
| 63 |
# "Documentation of LEMON") |
|
| 103 |
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
|
| 104 |
"Components needed to develop software using LEMON") |
|
| 105 |
SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
|
| 106 |
"Documentation of LEMON") |
|
| 64 | 107 |
|
| 65 |
|
|
| 108 |
SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
|
| 66 | 109 |
|
| 67 |
#SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
|
| 68 |
#SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
|
| 69 |
|
|
| 110 |
SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
|
| 111 |
SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
|
| 112 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
|
| 70 | 113 |
|
| 71 | 114 |
SET(CPACK_GENERATOR "NSIS") |
| 72 |
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
|
|
| 73 |
SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
|
|
| 74 |
|
|
| 115 |
SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
|
|
| 116 |
SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
|
|
| 117 |
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
|
|
| 75 | 118 |
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") |
| ... | ... |
@@ -80,3 +123,3 @@ |
| 80 | 123 |
SET(CPACK_NSIS_CREATE_ICONS_EXTRA " |
| 81 |
CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\" |
|
| 124 |
CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\" |
|
| 82 | 125 |
") |
| ... | ... |
@@ -88,2 +131,2 @@ |
| 88 | 131 |
INCLUDE(CPack) |
| 89 |
ENDIF( |
|
| 132 |
ENDIF() |
| ... | ... |
@@ -7,2 +7,8 @@ |
| 7 | 7 |
|
| 8 |
LEMON provides two different build environments, one is based on "autotool", |
|
| 9 |
while the other is based on "cmake". This file contains instructions only for |
|
| 10 |
the former one, which is the recommended build environment on Linux, Mac OSX |
|
| 11 |
and other unices or if you use Cygwin on Windows. For cmake installation |
|
| 12 |
instructions visit http://lemon.cs.elte.hu. |
|
| 13 |
|
|
| 8 | 14 |
In order to install LEMON from the extracted source tarball you have to |
| ... | ... |
@@ -23,4 +29,4 @@ |
| 23 | 29 |
This command compiles the non-template part of LEMON into libemon.a |
| 24 |
file. It also compiles the programs in the tools and demo subdirectories |
|
| 25 |
when enabled. |
|
| 30 |
file. It also compiles the programs in the tools subdirectory by |
|
| 31 |
default. |
|
| 26 | 32 |
|
| ... | ... |
@@ -71,10 +77,2 @@ |
| 71 | 77 |
|
| 72 |
--enable-demo |
|
| 73 |
|
|
| 74 |
Build the examples in the demo subdirectory. |
|
| 75 |
|
|
| 76 |
--disable-demo |
|
| 77 |
|
|
| 78 |
Do not build the examples in the demo subdirectory (default). |
|
| 79 |
|
|
| 80 | 78 |
--enable-tools |
| ... | ... |
@@ -154,1 +152,24 @@ |
| 154 | 152 |
Disable SoPlex support. |
| 153 |
|
|
| 154 |
--with-coin[=PREFIX] |
|
| 155 |
|
|
| 156 |
Enable support for COIN-OR solvers (CLP and CBC). You should |
|
| 157 |
specify the prefix too. (by default, COIN-OR tools install |
|
| 158 |
themselves to the source code directory). This command enables the |
|
| 159 |
solvers that are actually found. |
|
| 160 |
|
|
| 161 |
--with-coin-includedir=DIR |
|
| 162 |
|
|
| 163 |
The directory where the COIN-OR header files are located. This is |
|
| 164 |
only useful when the COIN-OR headers and libraries are not under |
|
| 165 |
the same prefix (which is unlikely). |
|
| 166 |
|
|
| 167 |
--with-coin-libdir=DIR |
|
| 168 |
|
|
| 169 |
The directory where the COIN-OR libraries are located. This is only |
|
| 170 |
useful when the COIN-OR headers and libraries are not under the |
|
| 171 |
same prefix (which is unlikely). |
|
| 172 |
|
|
| 173 |
--without-coin |
|
| 174 |
|
|
| 175 |
Disable COIN-OR support. |
| 1 |
LEMON code without an explicit copyright is covered by the following |
|
| 1 |
LEMON code without an explicit copyright notice is covered by the following |
|
| 2 | 2 |
copyright/license. |
| ... | ... |
@@ -7,2 +7,6 @@ |
| 7 | 7 |
|
| 8 |
=========================================================================== |
|
| 9 |
Boost Software License, Version 1.0 |
|
| 10 |
=========================================================================== |
|
| 11 |
|
|
| 8 | 12 |
Permission is hereby granted, free of charge, to any person or organization |
| ... | ... |
@@ -28,6 +32,1 @@ |
| 28 | 32 |
DEALINGS IN THE SOFTWARE. |
| 29 |
|
|
| 30 |
=========================================================================== |
|
| 31 |
This license is a verbatim copy of the Boost Software License, Version 1.0. |
|
| 32 |
|
|
| 33 |
| ... | ... |
@@ -13,4 +13,13 @@ |
| 13 | 13 |
m4/lx_check_soplex.m4 \ |
| 14 |
m4/lx_check_coin.m4 \ |
|
| 14 | 15 |
CMakeLists.txt \ |
| 15 |
cmake |
|
| 16 |
cmake/FindGhostscript.cmake \ |
|
| 17 |
cmake/FindCPLEX.cmake \ |
|
| 18 |
cmake/FindGLPK.cmake \ |
|
| 19 |
cmake/FindCOIN.cmake \ |
|
| 20 |
cmake/LEMONConfig.cmake.in \ |
|
| 21 |
cmake/version.cmake.in \ |
|
| 22 |
cmake/version.cmake \ |
|
| 23 |
cmake/nsis/lemon.ico \ |
|
| 24 |
cmake/nsis/uninstall.ico |
|
| 16 | 25 |
|
| ... | ... |
@@ -36,5 +45,9 @@ |
| 36 | 45 |
include doc/Makefile.am |
| 37 |
include demo/Makefile.am |
|
| 38 | 46 |
include tools/Makefile.am |
| 39 | 47 |
|
| 48 |
DIST_SUBDIRS = demo |
|
| 49 |
|
|
| 50 |
demo: |
|
| 51 |
$(MAKE) $(AM_MAKEFLAGS) -C demo |
|
| 52 |
|
|
| 40 | 53 |
MRPROPERFILES = \ |
| ... | ... |
@@ -65,2 +78,2 @@ |
| 65 | 78 |
|
| 66 |
.PHONY: mrproper dist-bz2 distcheck-bz2 |
|
| 79 |
.PHONY: demo mrproper dist-bz2 distcheck-bz2 |
| 1 |
2009-05-13 Version 1.1 released |
|
| 2 |
|
|
| 3 |
This is the second stable release of the 1.x series. It |
|
| 4 |
features a better coverage of the tools available in the 0.x |
|
| 5 |
series, a thoroughly reworked LP/MIP interface plus various |
|
| 6 |
improvements in the existing tools. |
|
| 7 |
|
|
| 8 |
* Much improved M$ Windows support |
|
| 9 |
* Various improvements in the CMAKE build system |
|
| 10 |
* Compilation warnings are fixed/suppressed |
|
| 11 |
* Support IBM xlC compiler |
|
| 12 |
* New algorithms |
|
| 13 |
* Connectivity related algorithms (#61) |
|
| 14 |
* Euler walks (#65) |
|
| 15 |
* Preflow push-relabel max. flow algorithm (#176) |
|
| 16 |
* Circulation algorithm (push-relabel based) (#175) |
|
| 17 |
* Suurballe algorithm (#47) |
|
| 18 |
* Gomory-Hu algorithm (#66) |
|
| 19 |
* Hao-Orlin algorithm (#58) |
|
| 20 |
* Edmond's maximum cardinality and weighted matching algorithms |
|
| 21 |
in general graphs (#48,#265) |
|
| 22 |
* Minimum cost arborescence/branching (#60) |
|
| 23 |
* Network Simplex min. cost flow algorithm (#234) |
|
| 24 |
* New data structures |
|
| 25 |
* Full graph structure (#57) |
|
| 26 |
* Grid graph structure (#57) |
|
| 27 |
* Hypercube graph structure (#57) |
|
| 28 |
* Graph adaptors (#67) |
|
| 29 |
* ArcSet and EdgeSet classes (#67) |
|
| 30 |
* Elevator class (#174) |
|
| 31 |
* Other new tools |
|
| 32 |
* LP/MIP interface (#44) |
|
| 33 |
* Support for GLPK, CPLEX, Soplex, COIN-OR CLP and CBC |
|
| 34 |
* Reader for the Nauty file format (#55) |
|
| 35 |
* DIMACS readers (#167) |
|
| 36 |
* Radix sort algorithms (#72) |
|
| 37 |
* RangeIdMap and CrossRefMap (#160) |
|
| 38 |
* New command line tools |
|
| 39 |
* DIMACS to LGF converter (#182) |
|
| 40 |
* lgf-gen - a graph generator (#45) |
|
| 41 |
* DIMACS solver utility (#226) |
|
| 42 |
* Other code improvements |
|
| 43 |
* Lognormal distribution added to Random (#102) |
|
| 44 |
* Better (i.e. O(1) time) item counting in SmartGraph (#3) |
|
| 45 |
* The standard maps of graphs are guaranteed to be |
|
| 46 |
reference maps (#190) |
|
| 47 |
* Miscellaneous |
|
| 48 |
* Various doc improvements |
|
| 49 |
* Improved 0.x -> 1.x converter script |
|
| 50 |
|
|
| 51 |
* Several bugfixes (compared to release 1.0): |
|
| 52 |
#170: Bugfix SmartDigraph::split() |
|
| 53 |
#171: Bugfix in SmartGraph::restoreSnapshot() |
|
| 54 |
#172: Extended test cases for graphs and digraphs |
|
| 55 |
#173: Bugfix in Random |
|
| 56 |
* operator()s always return a double now |
|
| 57 |
* the faulty real<Num>(Num) and real<Num>(Num,Num) |
|
| 58 |
have been removed |
|
| 59 |
#187: Remove DijkstraWidestPathOperationTraits |
|
| 60 |
#61: Bugfix in DfsVisit |
|
| 61 |
#193: Bugfix in GraphReader::skipSection() |
|
| 62 |
#195: Bugfix in ConEdgeIt() |
|
| 63 |
#197: Bugfix in heap unionfind |
|
| 64 |
* This bug affects Edmond's general matching algorithms |
|
| 65 |
#207: Fix 'make install' without 'make html' using CMAKE |
|
| 66 |
#208: Suppress or fix VS2008 compilation warnings |
|
| 67 |
----: Update the LEMON icon |
|
| 68 |
----: Enable the component-based installer |
|
| 69 |
(in installers made by CPACK) |
|
| 70 |
----: Set the proper version for CMAKE in the tarballs |
|
| 71 |
(made by autotools) |
|
| 72 |
----: Minor clarification in the LICENSE file |
|
| 73 |
----: Add missing unistd.h include to time_measure.h |
|
| 74 |
#204: Compilation bug fixed in graph_to_eps.h with VS2005 |
|
| 75 |
#214,#215: windows.h should never be included by lemon headers |
|
| 76 |
#230: Build systems check the availability of 'long long' type |
|
| 77 |
#229: Default implementation of Tolerance<> is used for integer types |
|
| 78 |
#211,#212: Various fixes for compiling on AIX |
|
| 79 |
----: Improvements in CMAKE config |
|
| 80 |
- docs is installed in share/doc/ |
|
| 81 |
- detects newer versions of Ghostscript |
|
| 82 |
#239: Fix missing 'inline' specifier in time_measure.h |
|
| 83 |
#274,#280: Install lemon/config.h |
|
| 84 |
#275: Prefix macro names with LEMON_ in lemon/config.h |
|
| 85 |
----: Small script for making the release tarballs added |
|
| 86 |
----: Minor improvement in unify-sources.sh (a76f55d7d397) |
|
| 87 |
|
|
| 88 |
2009-03-27 LEMON joins to the COIN-OR initiative |
|
| 89 |
|
|
| 90 |
COIN-OR (Computational Infrastructure for Operations Research, |
|
| 91 |
http://www.coin-or.org) project is an initiative to spur the |
|
| 92 |
development of open-source software for the operations research |
|
| 93 |
community. |
|
| 94 |
|
|
| 1 | 95 |
2008-10-13 Version 1.0 released |
| 1 |
================================================================== |
|
| 2 |
LEMON - a Library of Efficient Models and Optimization in Networks |
|
| 3 |
================================================================== |
|
| 1 |
===================================================================== |
|
| 2 |
LEMON - a Library for Efficient Modeling and Optimization in Networks |
|
| 3 |
===================================================================== |
|
| 4 | 4 |
| ... | ... |
@@ -4,10 +4,13 @@ |
| 4 | 4 |
m4_define([lemon_version_number], |
| 5 |
|
|
| 5 |
[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
|
|
| 6 | 6 |
dnl m4_define([lemon_version_number], []) |
| 7 | 7 |
m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) |
| 8 |
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) |
|
| 8 |
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))]) |
|
| 9 | 9 |
m4_define([lemon_version], [ifelse(lemon_version_number(), |
| 10 |
[], |
|
| 11 |
[lemon_hg_path().lemon_hg_revision()], |
|
| 12 |
|
|
| 10 |
[], |
|
| 11 |
[ifelse(lemon_hg_revision(), |
|
| 12 |
[], |
|
| 13 |
[hg-tip], |
|
| 14 |
[lemon_hg_path().lemon_hg_revision()])], |
|
| 15 |
[lemon_version_number()])]) |
|
| 13 | 16 |
|
| ... | ... |
@@ -21,2 +24,4 @@ |
| 21 | 24 |
|
| 25 |
AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string]) |
|
| 26 |
|
|
| 22 | 27 |
dnl Do compilation tests using the C++ compiler. |
| ... | ... |
@@ -24,2 +29,8 @@ |
| 24 | 29 |
|
| 30 |
dnl Check the existence of long long type. |
|
| 31 |
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) |
|
| 32 |
if test x"$long_long_found" = x"yes"; then |
|
| 33 |
AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) |
|
| 34 |
fi |
|
| 35 |
|
|
| 25 | 36 |
dnl Checks for programs. |
| ... | ... |
@@ -32,2 +43,3 @@ |
| 32 | 43 |
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) |
| 44 |
AC_CHECK_PROG([python_found],[python],[yes],[no]) |
|
| 33 | 45 |
AC_CHECK_PROG([gs_found],[gs],[yes],[no]) |
| ... | ... |
@@ -55,3 +67,3 @@ |
| 55 | 67 |
LX_CHECK_SOPLEX |
| 56 |
|
|
| 68 |
LX_CHECK_COIN |
|
| 57 | 69 |
|
| ... | ... |
@@ -60,15 +72,2 @@ |
| 60 | 72 |
|
| 61 |
dnl Disable/enable building the demo programs. |
|
| 62 |
AC_ARG_ENABLE([demo], |
|
| 63 |
AS_HELP_STRING([--enable-demo], [build the demo programs]) |
|
| 64 |
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), |
|
| 65 |
[], [enable_demo=no]) |
|
| 66 |
AC_MSG_CHECKING([whether to build the demo programs]) |
|
| 67 |
if test x"$enable_demo" != x"no"; then |
|
| 68 |
AC_MSG_RESULT([yes]) |
|
| 69 |
else |
|
| 70 |
AC_MSG_RESULT([no]) |
|
| 71 |
fi |
|
| 72 |
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) |
|
| 73 |
|
|
| 74 | 73 |
dnl Disable/enable building the binary tools. |
| ... | ... |
@@ -102,3 +101,3 @@ |
| 102 | 101 |
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], |
| 103 |
['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in']) |
|
| 102 |
['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in']) |
|
| 104 | 103 |
|
| ... | ... |
@@ -106,2 +105,4 @@ |
| 106 | 105 |
Makefile |
| 106 |
demo/Makefile |
|
| 107 |
cmake/version.cmake |
|
| 107 | 108 |
doc/Doxyfile |
| ... | ... |
@@ -120,2 +121,4 @@ |
| 120 | 121 |
echo |
| 122 |
echo Compiler supports long long... : $long_long_found |
|
| 123 |
echo |
|
| 121 | 124 |
echo GLPK support.................. : $lx_glpk_found |
| ... | ... |
@@ -124,4 +127,4 @@ |
| 124 | 127 |
echo CLP support................... : $lx_clp_found |
| 128 |
echo CBC support................... : $lx_cbc_found |
|
| 125 | 129 |
echo |
| 126 |
echo Build demo programs........... : $enable_demo |
|
| 127 | 130 |
echo Build additional tools........ : $enable_tools |
| 1 |
INCLUDE_DIRECTORIES( |
|
| 1 |
INCLUDE_DIRECTORIES( |
|
| 2 |
${PROJECT_SOURCE_DIR}
|
|
| 3 |
${PROJECT_BINARY_DIR}
|
|
| 4 |
) |
|
| 2 | 5 |
|
| 3 |
LINK_DIRECTORIES( |
|
| 6 |
LINK_DIRECTORIES( |
|
| 7 |
${PROJECT_BINARY_DIR}/lemon
|
|
| 8 |
) |
|
| 4 | 9 |
|
| ... | ... |
@@ -7,3 +12,4 @@ |
| 7 | 12 |
graph_to_eps_demo |
| 8 |
lgf_demo |
|
| 13 |
lgf_demo |
|
| 14 |
) |
|
| 9 | 15 |
|
| ... | ... |
@@ -12,2 +18,2 @@ |
| 12 | 18 |
TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
|
| 13 |
ENDFOREACH( |
|
| 19 |
ENDFOREACH() |
| 1 |
EXTRA_DIST += \ |
|
| 2 |
demo/CMakeLists.txt \ |
|
| 3 |
|
|
| 1 |
AM_CXXFLAGS = $(WARNINGCXXFLAGS) |
|
| 4 | 2 |
|
| 5 |
|
|
| 3 |
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) |
|
| 4 |
LDADD = $(top_builddir)/lemon/libemon.la |
|
| 6 | 5 |
|
| 7 |
noinst_PROGRAMS += \ |
|
| 8 |
demo/arg_parser_demo \ |
|
| 9 |
demo/graph_to_eps_demo \ |
|
| 10 |
demo/lgf_demo |
|
| 6 |
EXTRA_DIST = \ |
|
| 7 |
CMakeLists.txt \ |
|
| 8 |
digraph.lgf |
|
| 11 | 9 |
|
| 12 |
|
|
| 10 |
noinst_PROGRAMS = \ |
|
| 11 |
arg_parser_demo \ |
|
| 12 |
graph_to_eps_demo \ |
|
| 13 |
lgf_demo |
|
| 13 | 14 |
|
| 14 |
demo_arg_parser_demo_SOURCES = demo/arg_parser_demo.cc |
|
| 15 |
demo_graph_to_eps_demo_SOURCES = demo/graph_to_eps_demo.cc |
|
| 16 |
|
|
| 15 |
arg_parser_demo_SOURCES = arg_parser_demo.cc |
|
| 16 |
graph_to_eps_demo_SOURCES = graph_to_eps_demo.cc |
|
| 17 |
lgf_demo_SOURCES = lgf_demo.cc |
| ... | ... |
@@ -2,42 +2,51 @@ |
| 2 | 2 |
SET(PACKAGE_VERSION ${PROJECT_VERSION})
|
| 3 |
SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
|
|
| 4 |
SET(abs_top_builddir ${CMAKE_BINARY_DIR})
|
|
| 3 |
SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
|
|
| 4 |
SET(abs_top_builddir ${PROJECT_BINARY_DIR})
|
|
| 5 | 5 |
|
| 6 | 6 |
CONFIGURE_FILE( |
| 7 |
${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
|
|
| 8 |
${CMAKE_BINARY_DIR}/doc/Doxyfile
|
|
| 9 |
|
|
| 7 |
${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
|
|
| 8 |
${PROJECT_BINARY_DIR}/doc/Doxyfile
|
|
| 9 |
@ONLY |
|
| 10 |
) |
|
| 10 | 11 |
|
| 11 |
IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE) |
|
| 12 |
IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE) |
|
| 13 |
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
|
|
| 14 |
SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha) |
|
| 15 |
ADD_CUSTOM_TARGET(html |
|
| 16 |
COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
|
|
| 17 |
COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
|
|
| 18 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
|
|
| 19 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
|
|
| 20 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
|
|
| 21 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
|
|
| 22 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
|
|
| 23 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
|
|
| 24 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
|
|
| 25 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
|
|
| 26 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
|
|
| 27 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
|
|
| 28 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
|
|
| 29 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
|
|
| 30 |
COMMAND ${CMAKE_COMMAND} -E remove_directory html
|
|
| 31 |
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
|
|
| 32 |
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
|
|
| 33 |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
| 34 |
) |
|
| 35 |
|
|
| 36 |
SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC) |
|
| 37 |
|
|
| 12 | 38 |
IF(UNIX) |
| 13 |
ADD_CUSTOM_TARGET(html |
|
| 14 |
COMMAND rm -rf gen-images |
|
| 15 |
COMMAND mkdir gen-images |
|
| 16 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
|
|
| 17 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
|
|
| 18 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
|
|
| 19 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
|
|
| 20 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
|
|
| 21 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
|
|
| 22 |
COMMAND rm -rf html |
|
| 23 |
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
|
|
| 24 |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
| 39 |
INSTALL( |
|
| 40 |
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
| 41 |
DESTINATION share/doc/lemon/html |
|
| 42 |
COMPONENT html_documentation |
|
| 43 |
) |
|
| 25 | 44 |
ELSEIF(WIN32) |
| 26 |
ADD_CUSTOM_TARGET(html |
|
| 27 |
COMMAND if exist gen-images rmdir /s /q gen-images |
|
| 28 |
COMMAND mkdir gen-images |
|
| 29 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
|
|
| 30 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
|
|
| 31 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
|
|
| 32 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
|
|
| 33 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
|
|
| 34 |
COMMAND if exist html rmdir /s /q html |
|
| 35 |
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
|
|
| 36 |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
| 37 |
ENDIF(UNIX) |
|
| 38 |
|
|
| 45 |
INSTALL( |
|
| 46 |
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
| 47 |
DESTINATION doc |
|
| 48 |
COMPONENT html_documentation |
|
| 49 |
) |
|
| 50 |
ENDIF() |
|
| 39 | 51 |
|
| 40 |
INSTALL( |
|
| 41 |
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
|
| 42 |
DESTINATION doc |
|
| 43 |
COMPONENT html_documentation) |
|
| 52 |
ENDIF() |
| 1 |
# Doxyfile 1.5. |
|
| 1 |
# Doxyfile 1.5.9 |
|
| 2 | 2 |
|
| ... | ... |
@@ -23,3 +23,2 @@ |
| 23 | 23 |
MULTILINE_CPP_IS_BRIEF = NO |
| 24 |
DETAILS_AT_TOP = YES |
|
| 25 | 24 |
INHERIT_DOCS = NO |
| ... | ... |
@@ -93,3 +92,4 @@ |
| 93 | 92 |
"@abs_top_srcdir@/tools" \ |
| 94 |
"@abs_top_srcdir@/test/test_tools.h" |
|
| 93 |
"@abs_top_srcdir@/test/test_tools.h" \ |
|
| 94 |
"@abs_top_builddir@/doc/references.dox" |
|
| 95 | 95 |
INPUT_ENCODING = UTF-8 |
| ... | ... |
@@ -225,3 +225,3 @@ |
| 225 | 225 |
#--------------------------------------------------------------------------- |
| 226 |
# |
|
| 226 |
# Options related to the search engine |
|
| 227 | 227 |
#--------------------------------------------------------------------------- |
| ... | ... |
@@ -10,2 +10,3 @@ |
| 10 | 10 |
doc/migration.dox \ |
| 11 |
doc/min_cost_flow.dox \ |
|
| 11 | 12 |
doc/named-param.dox \ |
| ... | ... |
@@ -23,4 +24,13 @@ |
| 23 | 24 |
|
| 25 |
DOC_EPS_IMAGES27 = \ |
|
| 26 |
bipartite_matching.eps \ |
|
| 27 |
bipartite_partitions.eps \ |
|
| 28 |
connected_components.eps \ |
|
| 29 |
edge_biconnected_components.eps \ |
|
| 30 |
node_biconnected_components.eps \ |
|
| 31 |
strongly_connected_components.eps |
|
| 32 |
|
|
| 24 | 33 |
DOC_EPS_IMAGES = \ |
| 25 |
$(DOC_EPS_IMAGES18) |
|
| 34 |
$(DOC_EPS_IMAGES18) \ |
|
| 35 |
$(DOC_EPS_IMAGES27) |
|
| 26 | 36 |
|
| ... | ... |
@@ -47,3 +57,26 @@ |
| 47 | 57 |
|
| 48 |
|
|
| 58 |
$(DOC_EPS_IMAGES27:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps |
|
| 59 |
-mkdir doc/gen-images |
|
| 60 |
if test ${gs_found} = yes; then \
|
|
| 61 |
$(GS_COMMAND) -sDEVICE=pngalpha -r27 -sOutputFile=$@ $<; \ |
|
| 62 |
else \ |
|
| 63 |
echo; \ |
|
| 64 |
echo "Ghostscript not found."; \ |
|
| 65 |
echo; \ |
|
| 66 |
exit 1; \ |
|
| 67 |
fi |
|
| 68 |
|
|
| 69 |
references.dox: doc/references.bib |
|
| 70 |
if test ${python_found} = yes; then \
|
|
| 71 |
cd doc; \ |
|
| 72 |
python @abs_top_srcdir@/scripts/bib2dox.py @abs_top_builddir@/$< >$@; \ |
|
| 73 |
cd ..; \ |
|
| 74 |
else \ |
|
| 75 |
echo; \ |
|
| 76 |
echo "Python not found."; \ |
|
| 77 |
echo; \ |
|
| 78 |
exit 1; \ |
|
| 79 |
fi |
|
| 80 |
|
|
| 81 |
html-local: $(DOC_PNG_IMAGES) references.dox |
|
| 49 | 82 |
if test ${doxygen_found} = yes; then \
|
| ... | ... |
@@ -72,7 +105,7 @@ |
| 72 | 105 |
@$(NORMAL_INSTALL) |
| 73 |
$(mkinstalldirs) $(DESTDIR)$(htmldir)/ |
|
| 106 |
$(mkinstalldirs) $(DESTDIR)$(htmldir)/html |
|
| 74 | 107 |
for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
|
| 75 | 108 |
f="`echo $$p | sed -e 's|^.*/||'`"; \ |
| 76 |
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \ |
|
| 77 |
$(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \ |
|
| 109 |
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f"; \ |
|
| 110 |
$(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f; \ |
|
| 78 | 111 |
done |
| ... | ... |
@@ -83,4 +116,4 @@ |
| 83 | 116 |
f="`echo $$p | sed -e 's|^.*/||'`"; \ |
| 84 |
echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \ |
|
| 85 |
rm -f $(DESTDIR)$(htmldir)/docs/$$f; \ |
|
| 117 |
echo " rm -f $(DESTDIR)$(htmldir)/html/$$f"; \ |
|
| 118 |
rm -f $(DESTDIR)$(htmldir)/html/$$f; \ |
|
| 86 | 119 |
done |
| ... | ... |
@@ -22,3 +22,3 @@ |
| 22 | 22 |
@defgroup datas Data Structures |
| 23 |
This group |
|
| 23 |
This group contains the several data structures implemented in LEMON. |
|
| 24 | 24 |
*/ |
| ... | ... |
@@ -140,12 +140,2 @@ |
| 140 | 140 |
/** |
| 141 |
@defgroup semi_adaptors Semi-Adaptor Classes for Graphs |
|
| 142 |
@ingroup graphs |
|
| 143 |
\brief Graph types between real graphs and graph adaptors. |
|
| 144 |
|
|
| 145 |
This group describes some graph types between real graphs and graph adaptors. |
|
| 146 |
These classes wrap graphs to give new functionality as the adaptors do it. |
|
| 147 |
On the other hand they are not light-weight structures as the adaptors. |
|
| 148 |
*/ |
|
| 149 |
|
|
| 150 |
/** |
|
| 151 | 141 |
@defgroup maps Maps |
| ... | ... |
@@ -154,3 +144,3 @@ |
| 154 | 144 |
|
| 155 |
This group |
|
| 145 |
This group contains the map structures implemented in LEMON. |
|
| 156 | 146 |
|
| ... | ... |
@@ -167,3 +157,3 @@ |
| 167 | 157 |
|
| 168 |
This group |
|
| 158 |
This group contains maps that are specifically designed to assign |
|
| 169 | 159 |
values to the nodes and arcs/edges of graphs. |
| ... | ... |
@@ -179,3 +169,3 @@ |
| 179 | 169 |
|
| 180 |
This group |
|
| 170 |
This group contains map adaptors that are used to create "implicit" |
|
| 181 | 171 |
maps from other maps. |
| ... | ... |
@@ -238,10 +228,2 @@ |
| 238 | 228 |
/** |
| 239 |
@defgroup matrices Matrices |
|
| 240 |
@ingroup datas |
|
| 241 |
\brief Two dimensional data storages implemented in LEMON. |
|
| 242 |
|
|
| 243 |
This group describes two dimensional data storages implemented in LEMON. |
|
| 244 |
*/ |
|
| 245 |
|
|
| 246 |
/** |
|
| 247 | 229 |
@defgroup paths Path Structures |
| ... | ... |
@@ -250,3 +232,3 @@ |
| 250 | 232 |
|
| 251 |
This group |
|
| 233 |
This group contains the path structures implemented in LEMON. |
|
| 252 | 234 |
|
| ... | ... |
@@ -258,3 +240,32 @@ |
| 258 | 240 |
|
| 259 |
\sa |
|
| 241 |
\sa \ref concepts::Path "Path concept" |
|
| 242 |
*/ |
|
| 243 |
|
|
| 244 |
/** |
|
| 245 |
@defgroup heaps Heap Structures |
|
| 246 |
@ingroup datas |
|
| 247 |
\brief %Heap structures implemented in LEMON. |
|
| 248 |
|
|
| 249 |
This group contains the heap structures implemented in LEMON. |
|
| 250 |
|
|
| 251 |
LEMON provides several heap classes. They are efficient implementations |
|
| 252 |
of the abstract data type \e priority \e queue. They store items with |
|
| 253 |
specified values called \e priorities in such a way that finding and |
|
| 254 |
removing the item with minimum priority are efficient. |
|
| 255 |
The basic operations are adding and erasing items, changing the priority |
|
| 256 |
of an item, etc. |
|
| 257 |
|
|
| 258 |
Heaps are crucial in several algorithms, such as Dijkstra and Prim. |
|
| 259 |
The heap implementations have the same interface, thus any of them can be |
|
| 260 |
used easily in such algorithms. |
|
| 261 |
|
|
| 262 |
\sa \ref concepts::Heap "Heap concept" |
|
| 263 |
*/ |
|
| 264 |
|
|
| 265 |
/** |
|
| 266 |
@defgroup matrices Matrices |
|
| 267 |
@ingroup datas |
|
| 268 |
\brief Two dimensional data storages implemented in LEMON. |
|
| 269 |
|
|
| 270 |
This group contains two dimensional data storages implemented in LEMON. |
|
| 260 | 271 |
*/ |
| ... | ... |
@@ -266,3 +277,3 @@ |
| 266 | 277 |
|
| 267 |
This group |
|
| 278 |
This group contains some data structures implemented in LEMON in |
|
| 268 | 279 |
order to make it easier to implement combinatorial algorithms. |
| ... | ... |
@@ -271,7 +282,29 @@ |
| 271 | 282 |
/** |
| 283 |
@defgroup geomdat Geometric Data Structures |
|
| 284 |
@ingroup auxdat |
|
| 285 |
\brief Geometric data structures implemented in LEMON. |
|
| 286 |
|
|
| 287 |
This group contains geometric data structures implemented in LEMON. |
|
| 288 |
|
|
| 289 |
- \ref lemon::dim2::Point "dim2::Point" implements a two dimensional |
|
| 290 |
vector with the usual operations. |
|
| 291 |
- \ref lemon::dim2::Box "dim2::Box" can be used to determine the |
|
| 292 |
rectangular bounding box of a set of \ref lemon::dim2::Point |
|
| 293 |
"dim2::Point"'s. |
|
| 294 |
*/ |
|
| 295 |
|
|
| 296 |
/** |
|
| 297 |
@defgroup matrices Matrices |
|
| 298 |
@ingroup auxdat |
|
| 299 |
\brief Two dimensional data storages implemented in LEMON. |
|
| 300 |
|
|
| 301 |
This group contains two dimensional data storages implemented in LEMON. |
|
| 302 |
*/ |
|
| 303 |
|
|
| 304 |
/** |
|
| 272 | 305 |
@defgroup algs Algorithms |
| 273 |
\brief This group |
|
| 306 |
\brief This group contains the several algorithms |
|
| 274 | 307 |
implemented in LEMON. |
| 275 | 308 |
|
| 276 |
This group |
|
| 309 |
This group contains the several algorithms |
|
| 277 | 310 |
implemented in LEMON. |
| ... | ... |
@@ -284,4 +317,5 @@ |
| 284 | 317 |
|
| 285 |
This group describes the common graph search algorithms, namely |
|
| 286 |
\e breadth-first \e search (BFS) and \e depth-first \e search (DFS). |
|
| 318 |
This group contains the common graph search algorithms, namely |
|
| 319 |
\e breadth-first \e search (BFS) and \e depth-first \e search (DFS) |
|
| 320 |
\ref clrs01algorithms. |
|
| 287 | 321 |
*/ |
| ... | ... |
@@ -293,3 +327,4 @@ |
| 293 | 327 |
|
| 294 |
This group |
|
| 328 |
This group contains the algorithms for finding shortest paths in digraphs |
|
| 329 |
\ref clrs01algorithms. |
|
| 295 | 330 |
|
| ... | ... |
@@ -310,2 +345,11 @@ |
| 310 | 345 |
/** |
| 346 |
@defgroup spantree Minimum Spanning Tree Algorithms |
|
| 347 |
@ingroup algs |
|
| 348 |
\brief Algorithms for finding minimum cost spanning trees and arborescences. |
|
| 349 |
|
|
| 350 |
This group contains the algorithms for finding minimum cost spanning |
|
| 351 |
trees and arborescences \ref clrs01algorithms. |
|
| 352 |
*/ |
|
| 353 |
|
|
| 354 |
/** |
|
| 311 | 355 |
@defgroup max_flow Maximum Flow Algorithms |
| ... | ... |
@@ -314,4 +358,4 @@ |
| 314 | 358 |
|
| 315 |
This group describes the algorithms for finding maximum flows and |
|
| 316 |
feasible circulations. |
|
| 359 |
This group contains the algorithms for finding maximum flows and |
|
| 360 |
feasible circulations \ref clrs01algorithms, \ref amo93networkflows. |
|
| 317 | 361 |
|
| ... | ... |
@@ -319,22 +363,31 @@ |
| 319 | 363 |
a single source and a single target. Formally, there is a \f$G=(V,A)\f$ |
| 320 |
digraph, a \f$cap:A\rightarrow\mathbf{R}^+_0\f$ capacity function and
|
|
| 364 |
digraph, a \f$cap: A\rightarrow\mathbf{R}^+_0\f$ capacity function and
|
|
| 321 | 365 |
\f$s, t \in V\f$ source and target nodes. |
| 322 |
A maximum flow is an \f$f:A\rightarrow\mathbf{R}^+_0\f$ solution of the
|
|
| 366 |
A maximum flow is an \f$f: A\rightarrow\mathbf{R}^+_0\f$ solution of the
|
|
| 323 | 367 |
following optimization problem. |
| 324 | 368 |
|
| 325 |
\f[ \max\sum_{a\in\delta_{out}(s)}f(a) - \sum_{a\in\delta_{in}(s)}f(a) \f]
|
|
| 326 |
\f[ \sum_{a\in\delta_{out}(v)} f(a) = \sum_{a\in\delta_{in}(v)} f(a)
|
|
| 327 |
\qquad \forall v\in V\setminus\{s,t\} \f]
|
|
| 328 |
\f[ 0 \leq f(a) \leq cap(a) \qquad \forall a\in A \f] |
|
| 369 |
\f[ \max\sum_{sv\in A} f(sv) - \sum_{vs\in A} f(vs) \f]
|
|
| 370 |
\f[ \sum_{uv\in A} f(uv) = \sum_{vu\in A} f(vu)
|
|
| 371 |
\quad \forall u\in V\setminus\{s,t\} \f]
|
|
| 372 |
\f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f] |
|
| 329 | 373 |
|
| 330 | 374 |
LEMON contains several algorithms for solving maximum flow problems: |
| 331 |
- \ref EdmondsKarp Edmonds-Karp algorithm. |
|
| 332 |
- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm. |
|
| 333 |
- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees. |
|
| 334 |
- \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees. |
|
| 375 |
- \ref EdmondsKarp Edmonds-Karp algorithm |
|
| 376 |
\ref edmondskarp72theoretical. |
|
| 377 |
- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm |
|
| 378 |
\ref goldberg88newapproach. |
|
| 379 |
- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees |
|
| 380 |
\ref dinic70algorithm, \ref sleator83dynamic. |
|
| 381 |
- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees |
|
| 382 |
\ref goldberg88newapproach, \ref sleator83dynamic. |
|
| 335 | 383 |
|
| 336 |
In most cases the \ref Preflow |
|
| 384 |
In most cases the \ref Preflow algorithm provides the |
|
| 337 | 385 |
fastest method for computing a maximum flow. All implementations |
| 338 |
provides functions to also query the minimum cut, which is the dual |
|
| 339 |
problem of the maximum flow. |
|
| 386 |
also provide functions to query the minimum cut, which is the dual |
|
| 387 |
problem of maximum flow. |
|
| 388 |
|
|
| 389 |
\ref Circulation is a preflow push-relabel algorithm implemented directly |
|
| 390 |
for finding feasible circulations, which is a somewhat different problem, |
|
| 391 |
but it is strongly related to maximum flow. |
|
| 392 |
For more information, see \ref Circulation. |
|
| 340 | 393 |
*/ |
| ... | ... |
@@ -342,3 +395,3 @@ |
| 342 | 395 |
/** |
| 343 |
@defgroup |
|
| 396 |
@defgroup min_cost_flow_algs Minimum Cost Flow Algorithms |
|
| 344 | 397 |
@ingroup algs |
| ... | ... |
@@ -347,31 +400,24 @@ |
| 347 | 400 |
|
| 348 |
This group describes the algorithms for finding minimum cost flows and |
|
| 349 |
circulations. |
|
| 401 |
This group contains the algorithms for finding minimum cost flows and |
|
| 402 |
circulations \ref amo93networkflows. For more information about this |
|
| 403 |
problem and its dual solution, see \ref min_cost_flow |
|
| 404 |
"Minimum Cost Flow Problem". |
|
| 350 | 405 |
|
| 351 |
The \e minimum \e cost \e flow \e problem is to find a feasible flow of |
|
| 352 |
minimum total cost from a set of supply nodes to a set of demand nodes |
|
| 353 |
in a network with capacity constraints and arc costs. |
|
| 354 |
Formally, let \f$G=(V,A)\f$ be a digraph, |
|
| 355 |
\f$lower, upper: A\rightarrow\mathbf{Z}^+_0\f$ denote the lower and
|
|
| 356 |
upper bounds for the flow values on the arcs, |
|
| 357 |
\f$cost: A\rightarrow\mathbf{Z}^+_0\f$ denotes the cost per unit flow
|
|
| 358 |
on the arcs, and |
|
| 359 |
\f$supply: V\rightarrow\mathbf{Z}\f$ denotes the supply/demand values
|
|
| 360 |
of the nodes. |
|
| 361 |
A minimum cost flow is an \f$f:A\rightarrow\mathbf{R}^+_0\f$ solution of
|
|
| 362 |
the following optimization problem. |
|
| 406 |
LEMON contains several algorithms for this problem. |
|
| 407 |
- \ref NetworkSimplex Primal Network Simplex algorithm with various |
|
| 408 |
pivot strategies \ref dantzig63linearprog, \ref kellyoneill91netsimplex. |
|
| 409 |
- \ref CostScaling Push-Relabel and Augment-Relabel algorithms based on |
|
| 410 |
cost scaling \ref goldberg90approximation, \ref goldberg97efficient, |
|
| 411 |
\ref bunnagel98efficient. |
|
| 412 |
- \ref CapacityScaling Successive Shortest %Path algorithm with optional |
|
| 413 |
capacity scaling \ref edmondskarp72theoretical. |
|
| 414 |
- \ref CancelAndTighten The Cancel and Tighten algorithm |
|
| 415 |
\ref goldberg89cyclecanceling. |
|
| 416 |
- \ref CycleCanceling Cycle-Canceling algorithms |
|
| 417 |
\ref klein67primal, \ref goldberg89cyclecanceling. |
|
| 363 | 418 |
|
| 364 |
\f[ \min\sum_{a\in A} f(a) cost(a) \f]
|
|
| 365 |
\f[ \sum_{a\in\delta_{out}(v)} f(a) - \sum_{a\in\delta_{in}(v)} f(a) =
|
|
| 366 |
supply(v) \qquad \forall v\in V \f] |
|
| 367 |
\f[ lower(a) \leq f(a) \leq upper(a) \qquad \forall a\in A \f] |
|
| 368 |
|
|
| 369 |
LEMON contains several algorithms for solving minimum cost flow problems: |
|
| 370 |
- \ref CycleCanceling Cycle-canceling algorithms. |
|
| 371 |
- \ref CapacityScaling Successive shortest path algorithm with optional |
|
| 372 |
capacity scaling. |
|
| 373 |
- \ref CostScaling Push-relabel and augment-relabel algorithms based on |
|
| 374 |
cost scaling. |
|
| 375 |
- \ref NetworkSimplex Primal network simplex algorithm with various |
|
| 376 |
|
|
| 419 |
In general NetworkSimplex is the most efficient implementation, |
|
| 420 |
but in special cases other algorithms could be faster. |
|
| 421 |
For example, if the total supply and/or capacities are rather small, |
|
| 422 |
CapacityScaling is usually the fastest algorithm (without effective scaling). |
|
| 377 | 423 |
*/ |
| ... | ... |
@@ -384,3 +430,3 @@ |
| 384 | 430 |
|
| 385 |
This group |
|
| 431 |
This group contains the algorithms for finding minimum cut in graphs. |
|
| 386 | 432 |
|
| ... | ... |
@@ -393,3 +439,3 @@ |
| 393 | 439 |
\f[ \min_{X \subset V, X\not\in \{\emptyset, V\}}
|
| 394 |
\sum_{uv\in A
|
|
| 440 |
\sum_{uv\in A: u\in X, v\not\in X}cap(uv) \f]
|
|
| 395 | 441 |
|
| ... | ... |
@@ -401,3 +447,3 @@ |
| 401 | 447 |
calculating minimum cut in undirected graphs. |
| 402 |
- \ref |
|
| 448 |
- \ref GomoryHu "Gomory-Hu tree computation" for calculating |
|
| 403 | 449 |
all-pairs minimum cut in undirected graphs. |
| ... | ... |
@@ -409,23 +455,36 @@ |
| 409 | 455 |
/** |
| 410 |
@defgroup |
|
| 456 |
@defgroup min_mean_cycle Minimum Mean Cycle Algorithms |
|
| 411 | 457 |
@ingroup algs |
| 412 |
\brief Algorithms for |
|
| 458 |
\brief Algorithms for finding minimum mean cycles. |
|
| 413 | 459 |
|
| 414 |
This group describes the algorithms for discovering the graph properties |
|
| 415 |
like connectivity, bipartiteness, euler property, simplicity etc. |
|
| 460 |
This group contains the algorithms for finding minimum mean cycles |
|
| 461 |
\ref clrs01algorithms, \ref amo93networkflows. |
|
| 416 | 462 |
|
| 417 |
\image html edge_biconnected_components.png |
|
| 418 |
\image latex edge_biconnected_components.eps "bi-edge-connected components" width=\textwidth |
|
| 419 |
|
|
| 463 |
The \e minimum \e mean \e cycle \e problem is to find a directed cycle |
|
| 464 |
of minimum mean length (cost) in a digraph. |
|
| 465 |
The mean length of a cycle is the average length of its arcs, i.e. the |
|
| 466 |
ratio between the total length of the cycle and the number of arcs on it. |
|
| 420 | 467 |
|
| 421 |
/** |
|
| 422 |
@defgroup planar Planarity Embedding and Drawing |
|
| 423 |
@ingroup algs |
|
| 424 |
\brief Algorithms for planarity checking, embedding and drawing |
|
| 468 |
This problem has an important connection to \e conservative \e length |
|
| 469 |
\e functions, too. A length function on the arcs of a digraph is called |
|
| 470 |
conservative if and only if there is no directed cycle of negative total |
|
| 471 |
length. For an arbitrary length function, the negative of the minimum |
|
| 472 |
cycle mean is the smallest \f$\epsilon\f$ value so that increasing the |
|
| 473 |
arc lengths uniformly by \f$\epsilon\f$ results in a conservative length |
|
| 474 |
function. |
|
| 425 | 475 |
|
| 426 |
This group describes the algorithms for planarity checking, |
|
| 427 |
embedding and drawing. |
|
| 476 |
LEMON contains three algorithms for solving the minimum mean cycle problem: |
|
| 477 |
- \ref Karp "Karp"'s original algorithm \ref amo93networkflows, |
|
| 478 |
\ref dasdan98minmeancycle. |
|
| 479 |
- \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved |
|
| 480 |
version of Karp's algorithm \ref dasdan98minmeancycle. |
|
| 481 |
- \ref Howard "Howard"'s policy iteration algorithm |
|
| 482 |
\ref dasdan98minmeancycle. |
|
| 428 | 483 |
|
| 429 |
\image html planar.png |
|
| 430 |
\image latex planar.eps "Plane graph" width=\textwidth |
|
| 484 |
In practice, the Howard algorithm proved to be by far the most efficient |
|
| 485 |
one, though the best known theoretical bound on its running time is |
|
| 486 |
exponential. |
|
| 487 |
Both Karp and HartmannOrlin algorithms run in time O(ne) and use space |
|
| 488 |
O(n<sup>2</sup>+e), but the latter one is typically faster due to the |
|
| 489 |
applied early termination scheme. |
|
| 431 | 490 |
*/ |
| ... | ... |
@@ -437,5 +496,6 @@ |
| 437 | 496 |
|
| 438 |
This group contains |
|
| 497 |
This group contains the algorithms for calculating |
|
| 439 | 498 |
matchings in graphs and bipartite graphs. The general matching problem is |
| 440 |
finding a subset of the |
|
| 499 |
finding a subset of the edges for which each node has at most one incident |
|
| 500 |
edge. |
|
| 441 | 501 |
|
| ... | ... |
@@ -472,8 +532,32 @@ |
| 472 | 532 |
/** |
| 473 |
@defgroup |
|
| 533 |
@defgroup graph_properties Connectivity and Other Graph Properties |
|
| 474 | 534 |
@ingroup algs |
| 475 |
\brief Algorithms for |
|
| 535 |
\brief Algorithms for discovering the graph properties |
|
| 476 | 536 |
|
| 477 |
This group describes the algorithms for finding a minimum cost spanning |
|
| 478 |
tree in a graph. |
|
| 537 |
This group contains the algorithms for discovering the graph properties |
|
| 538 |
like connectivity, bipartiteness, euler property, simplicity etc. |
|
| 539 |
|
|
| 540 |
\image html connected_components.png |
|
| 541 |
\image latex connected_components.eps "Connected components" width=\textwidth |
|
| 542 |
*/ |
|
| 543 |
|
|
| 544 |
/** |
|
| 545 |
@defgroup planar Planarity Embedding and Drawing |
|
| 546 |
@ingroup algs |
|
| 547 |
\brief Algorithms for planarity checking, embedding and drawing |
|
| 548 |
|
|
| 549 |
This group contains the algorithms for planarity checking, |
|
| 550 |
embedding and drawing. |
|
| 551 |
|
|
| 552 |
\image html planar.png |
|
| 553 |
\image latex planar.eps "Plane graph" width=\textwidth |
|
| 554 |
*/ |
|
| 555 |
|
|
| 556 |
/** |
|
| 557 |
@defgroup approx Approximation Algorithms |
|
| 558 |
@ingroup algs |
|
| 559 |
\brief Approximation algorithms. |
|
| 560 |
|
|
| 561 |
This group contains the approximation and heuristic algorithms |
|
| 562 |
implemented in LEMON. |
|
| 479 | 563 |
*/ |
| ... | ... |
@@ -485,3 +569,3 @@ |
| 485 | 569 |
|
| 486 |
This group |
|
| 570 |
This group contains some algorithms implemented in LEMON |
|
| 487 | 571 |
in order to make it easier to implement complex algorithms. |
| ... | ... |
@@ -490,7 +574,7 @@ |
| 490 | 574 |
/** |
| 491 |
@defgroup approx Approximation Algorithms |
|
| 492 |
@ingroup algs |
|
| 493 |
|
|
| 575 |
@defgroup gen_opt_group General Optimization Tools |
|
| 576 |
\brief This group contains some general optimization frameworks |
|
| 577 |
implemented in LEMON. |
|
| 494 | 578 |
|
| 495 |
This group |
|
| 579 |
This group contains some general optimization frameworks |
|
| 496 | 580 |
implemented in LEMON. |
| ... | ... |
@@ -499,18 +583,12 @@ |
| 499 | 583 |
/** |
| 500 |
@defgroup gen_opt_group General Optimization Tools |
|
| 501 |
\brief This group describes some general optimization frameworks |
|
| 502 |
|
|
| 584 |
@defgroup lp_group LP and MIP Solvers |
|
| 585 |
@ingroup gen_opt_group |
|
| 586 |
\brief LP and MIP solver interfaces for LEMON. |
|
| 503 | 587 |
|
| 504 |
This group describes some general optimization frameworks |
|
| 505 |
implemented in LEMON. |
|
| 506 |
|
|
| 588 |
This group contains LP and MIP solver interfaces for LEMON. |
|
| 589 |
Various LP solvers could be used in the same manner with this |
|
| 590 |
high-level interface. |
|
| 507 | 591 |
|
| 508 |
/** |
|
| 509 |
@defgroup lp_group Lp and Mip Solvers |
|
| 510 |
@ingroup gen_opt_group |
|
| 511 |
\brief Lp and Mip solver interfaces for LEMON. |
|
| 512 |
|
|
| 513 |
This group describes Lp and Mip solver interfaces for LEMON. The |
|
| 514 |
various LP solvers could be used in the same manner with this |
|
| 515 |
interface. |
|
| 592 |
The currently supported solvers are \ref glpk, \ref clp, \ref cbc, |
|
| 593 |
\ref cplex, \ref soplex. |
|
| 516 | 594 |
*/ |
| ... | ... |
@@ -531,3 +609,3 @@ |
| 531 | 609 |
|
| 532 |
This group |
|
| 610 |
This group contains some metaheuristic optimization tools. |
|
| 533 | 611 |
*/ |
| ... | ... |
@@ -546,3 +624,3 @@ |
| 546 | 624 |
|
| 547 |
This group |
|
| 625 |
This group contains some simple basic graph utilities. |
|
| 548 | 626 |
*/ |
| ... | ... |
@@ -554,3 +632,3 @@ |
| 554 | 632 |
|
| 555 |
This group |
|
| 633 |
This group contains several useful tools for development, |
|
| 556 | 634 |
debugging and testing. |
| ... | ... |
@@ -563,3 +641,3 @@ |
| 563 | 641 |
|
| 564 |
This group |
|
| 642 |
This group contains simple tools for measuring the performance |
|
| 565 | 643 |
of algorithms. |
| ... | ... |
@@ -572,3 +650,3 @@ |
| 572 | 650 |
|
| 573 |
This group |
|
| 651 |
This group contains the exceptions defined in LEMON. |
|
| 574 | 652 |
*/ |
| ... | ... |
@@ -579,3 +657,3 @@ |
| 579 | 657 |
|
| 580 |
This group |
|
| 658 |
This group contains the tools for importing and exporting graphs |
|
| 581 | 659 |
and graph related data. Now it supports the \ref lgf-format |
| ... | ... |
@@ -590,3 +668,3 @@ |
| 590 | 668 |
|
| 591 |
This group |
|
| 669 |
This group contains methods for reading and writing |
|
| 592 | 670 |
\ref lgf-format "LEMON Graph Format". |
| ... | ... |
@@ -599,3 +677,3 @@ |
| 599 | 677 |
|
| 600 |
This group |
|
| 678 |
This group contains general \c EPS drawing methods and special |
|
| 601 | 679 |
graph exporting tools. |
| ... | ... |
@@ -604,3 +682,3 @@ |
| 604 | 682 |
/** |
| 605 |
@defgroup dimacs_group DIMACS |
|
| 683 |
@defgroup dimacs_group DIMACS Format |
|
| 606 | 684 |
@ingroup io_group |
| ... | ... |
@@ -623,3 +701,3 @@ |
| 623 | 701 |
|
| 624 |
This group |
|
| 702 |
This group contains the data/algorithm skeletons and concept checking |
|
| 625 | 703 |
classes implemented in LEMON. |
| ... | ... |
@@ -653,4 +731,4 @@ |
| 653 | 731 |
|
| 654 |
This group describes the skeletons and concept checking classes of LEMON's |
|
| 655 |
graph structures and helper classes used to implement these. |
|
| 732 |
This group contains the skeletons and concept checking classes of |
|
| 733 |
graph structures. |
|
| 656 | 734 |
*/ |
| ... | ... |
@@ -662,15 +740,3 @@ |
| 662 | 740 |
|
| 663 |
This group describes the skeletons and concept checking classes of maps. |
|
| 664 |
*/ |
|
| 665 |
|
|
| 666 |
/** |
|
| 667 |
\anchor demoprograms |
|
| 668 |
|
|
| 669 |
@defgroup demos Demo Programs |
|
| 670 |
|
|
| 671 |
Some demo programs are listed here. Their full source codes can be found in |
|
| 672 |
the \c demo subdirectory of the source tree. |
|
| 673 |
|
|
| 674 |
It order to compile them, use <tt>--enable-demo</tt> configure option when |
|
| 675 |
|
|
| 741 |
This group contains the skeletons and concept checking classes of maps. |
|
| 676 | 742 |
*/ |
| ... | ... |
@@ -686,2 +752,14 @@ |
| 686 | 752 |
|
| 753 |
/** |
|
| 754 |
\anchor demoprograms |
|
| 755 |
|
|
| 756 |
@defgroup demos Demo Programs |
|
| 757 |
|
|
| 758 |
Some demo programs are listed here. Their full source codes can be found in |
|
| 759 |
the \c demo subdirectory of the source tree. |
|
| 760 |
|
|
| 761 |
In order to compile them, use the <tt>make demo</tt> or the |
|
| 762 |
<tt>make check</tt> commands. |
|
| 763 |
*/ |
|
| 764 |
|
|
| 687 | 765 |
} |
| ... | ... |
@@ -23,11 +23,7 @@ |
| 23 | 23 |
|
| 24 |
\subsection whatis What is LEMON |
|
| 25 |
|
|
| 26 |
LEMON stands for |
|
| 27 |
<b>L</b>ibrary of <b>E</b>fficient <b>M</b>odels |
|
| 28 |
and <b>O</b>ptimization in <b>N</b>etworks. |
|
| 29 |
It is a C++ template |
|
| 30 |
library aimed at combinatorial optimization tasks which |
|
| 31 |
often involve in working |
|
| 32 |
|
|
| 24 |
<b>LEMON</b> stands for <i><b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling |
|
| 25 |
and <b>O</b>ptimization in <b>N</b>etworks</i>. |
|
| 26 |
It is a C++ template library providing efficient implementation of common |
|
| 27 |
data structures and algorithms with focus on combinatorial optimization |
|
| 28 |
problems in graphs and networks. |
|
| 33 | 29 |
|
| ... | ... |
@@ -41,18 +37,18 @@ |
| 41 | 37 |
|
| 42 |
|
|
| 38 |
The project is maintained by the |
|
| 39 |
<a href="http://www.cs.elte.hu/egres/">Egerváry Research Group on |
|
| 40 |
Combinatorial Optimization</a> \ref egres |
|
| 41 |
at the Operations Research Department of the |
|
| 42 |
<a href="http://www.elte.hu/">Eötvös Loránd University, |
|
| 43 |
Budapest</a>, Hungary. |
|
| 44 |
LEMON is also a member of the <a href="http://www.coin-or.org/">COIN-OR</a> |
|
| 45 |
initiative \ref coinor. |
|
| 43 | 46 |
|
| 44 |
If you want to get a quick start and see the most important features then |
|
| 45 |
take a look at our \ref quicktour |
|
| 46 |
|
|
| 47 |
\section howtoread How to Read the Documentation |
|
| 47 | 48 |
|
| 48 |
If you already feel like using our library, see the page that tells you |
|
| 49 |
\ref getstart "How to start using LEMON". |
|
| 49 |
If you would like to get to know the library, see |
|
| 50 |
<a class="el" href="http://lemon.cs.elte.hu/pub/tutorial/">LEMON Tutorial</a>. |
|
| 50 | 51 |
|
| 51 |
If you |
|
| 52 |
want to see how LEMON works, see |
|
| 53 |
some \ref demoprograms "demo programs". |
|
| 54 |
|
|
| 55 |
If you know what you are looking for then try to find it under the |
|
| 56 |
<a class="el" href="modules.html">Modules</a> |
|
| 57 |
|
|
| 52 |
If you know what you are looking for, then try to find it under the |
|
| 53 |
<a class="el" href="modules.html">Modules</a> section. |
|
| 58 | 54 |
| 1 |
INCLUDE_DIRECTORIES( |
|
| 1 |
INCLUDE_DIRECTORIES( |
|
| 2 |
${PROJECT_SOURCE_DIR}
|
|
| 3 |
${PROJECT_BINARY_DIR}
|
|
| 4 |
) |
|
| 2 | 5 |
|
| 3 |
|
|
| 6 |
CONFIGURE_FILE( |
|
| 7 |
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
|
|
| 8 |
${CMAKE_CURRENT_BINARY_DIR}/config.h
|
|
| 9 |
) |
|
| 10 |
|
|
| 11 |
SET(LEMON_SOURCES |
|
| 4 | 12 |
arg_parser.cc |
| ... | ... |
@@ -6,3 +14,37 @@ |
| 6 | 14 |
color.cc |
| 7 |
|
|
| 15 |
lp_base.cc |
|
| 16 |
lp_skeleton.cc |
|
| 17 |
random.cc |
|
| 18 |
bits/windows.cc |
|
| 19 |
) |
|
| 20 |
|
|
| 21 |
IF(LEMON_HAVE_GLPK) |
|
| 22 |
SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
|
|
| 23 |
INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
|
|
| 24 |
IF(WIN32) |
|
| 25 |
INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
|
|
| 26 |
INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
|
|
| 27 |
INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
|
|
| 28 |
ENDIF() |
|
| 29 |
ENDIF() |
|
| 30 |
|
|
| 31 |
IF(LEMON_HAVE_CPLEX) |
|
| 32 |
SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
|
|
| 33 |
INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
|
|
| 34 |
ENDIF() |
|
| 35 |
|
|
| 36 |
IF(LEMON_HAVE_CLP) |
|
| 37 |
SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
|
|
| 38 |
INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
|
|
| 39 |
ENDIF() |
|
| 40 |
|
|
| 41 |
IF(LEMON_HAVE_CBC) |
|
| 42 |
SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
|
|
| 43 |
INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
|
|
| 44 |
ENDIF() |
|
| 45 |
|
|
| 46 |
ADD_LIBRARY(lemon ${LEMON_SOURCES})
|
|
| 47 |
IF(UNIX) |
|
| 48 |
SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon) |
|
| 49 |
ENDIF() |
|
| 8 | 50 |
|
| ... | ... |
@@ -11,3 +53,4 @@ |
| 11 | 53 |
ARCHIVE DESTINATION lib |
| 12 |
COMPONENT library |
|
| 54 |
COMPONENT library |
|
| 55 |
) |
|
| 13 | 56 |
|
| ... | ... |
@@ -17,2 +60,9 @@ |
| 17 | 60 |
COMPONENT headers |
| 18 |
FILES_MATCHING PATTERN "*.h" |
|
| 61 |
FILES_MATCHING PATTERN "*.h" |
|
| 62 |
) |
|
| 63 |
|
|
| 64 |
INSTALL( |
|
| 65 |
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
|
|
| 66 |
DESTINATION include/lemon |
|
| 67 |
COMPONENT headers |
|
| 68 |
) |
| ... | ... |
@@ -2,3 +2,4 @@ |
| 2 | 2 |
lemon/lemon.pc.in \ |
| 3 |
lemon/CMakeLists.txt |
|
| 3 |
lemon/CMakeLists.txt \ |
|
| 4 |
lemon/config.h.cmake |
|
| 4 | 5 |
|
| ... | ... |
@@ -14,6 +15,9 @@ |
| 14 | 15 |
lemon/lp_skeleton.cc \ |
| 15 |
lemon/random.cc |
|
| 16 |
lemon/random.cc \ |
|
| 17 |
lemon/bits/windows.cc |
|
| 16 | 18 |
|
| 19 |
nodist_lemon_HEADERS = lemon/config.h |
|
| 17 | 20 |
|
| 18 | 21 |
lemon_libemon_la_CXXFLAGS = \ |
| 22 |
$(AM_CXXFLAGS) \ |
|
| 19 | 23 |
$(GLPK_CFLAGS) \ |
| ... | ... |
@@ -21,3 +25,4 @@ |
| 21 | 25 |
$(SOPLEX_CXXFLAGS) \ |
| 22 |
$(CLP_CXXFLAGS) |
|
| 26 |
$(CLP_CXXFLAGS) \ |
|
| 27 |
$(CBC_CXXFLAGS) |
|
| 23 | 28 |
|
| ... | ... |
@@ -27,3 +32,4 @@ |
| 27 | 32 |
$(SOPLEX_LIBS) \ |
| 28 |
$(CLP_LIBS) |
|
| 33 |
$(CLP_LIBS) \ |
|
| 34 |
$(CBC_LIBS) |
|
| 29 | 35 |
|
| ... | ... |
@@ -45,2 +51,6 @@ |
| 45 | 51 |
|
| 52 |
if HAVE_CBC |
|
| 53 |
lemon_libemon_la_SOURCES += lemon/cbc.cc |
|
| 54 |
endif |
|
| 55 |
|
|
| 46 | 56 |
lemon_HEADERS += \ |
| ... | ... |
@@ -49,4 +59,8 @@ |
| 49 | 59 |
lemon/assert.h \ |
| 60 |
lemon/bellman_ford.h \ |
|
| 50 | 61 |
lemon/bfs.h \ |
| 51 | 62 |
lemon/bin_heap.h \ |
| 63 |
lemon/binom_heap.h \ |
|
| 64 |
lemon/bucket_heap.h \ |
|
| 65 |
lemon/cbc.h \ |
|
| 52 | 66 |
lemon/circulation.h \ |
| ... | ... |
@@ -55,2 +69,3 @@ |
| 55 | 69 |
lemon/concept_check.h \ |
| 70 |
lemon/connectivity.h \ |
|
| 56 | 71 |
lemon/counter.h \ |
| ... | ... |
@@ -65,7 +80,15 @@ |
| 65 | 80 |
lemon/error.h \ |
| 81 |
lemon/euler.h \ |
|
| 82 |
lemon/fib_heap.h \ |
|
| 83 |
lemon/fourary_heap.h \ |
|
| 66 | 84 |
lemon/full_graph.h \ |
| 67 | 85 |
lemon/glpk.h \ |
| 86 |
lemon/gomory_hu.h \ |
|
| 68 | 87 |
lemon/graph_to_eps.h \ |
| 69 | 88 |
lemon/grid_graph.h \ |
| 89 |
lemon/hartmann_orlin.h \ |
|
| 90 |
lemon/howard.h \ |
|
| 70 | 91 |
lemon/hypercube_graph.h \ |
| 92 |
lemon/karp.h \ |
|
| 93 |
lemon/kary_heap.h \ |
|
| 71 | 94 |
lemon/kruskal.h \ |
| ... | ... |
@@ -78,9 +101,12 @@ |
| 78 | 101 |
lemon/lp_skeleton.h \ |
| 79 |
lemon/list_graph.h \ |
|
| 80 | 102 |
lemon/maps.h \ |
| 103 |
lemon/matching.h \ |
|
| 81 | 104 |
lemon/math.h \ |
| 82 |
lemon/ |
|
| 105 |
lemon/min_cost_arborescence.h \ |
|
| 83 | 106 |
lemon/nauty_reader.h \ |
| 107 |
lemon/network_simplex.h \ |
|
| 108 |
lemon/pairing_heap.h \ |
|
| 84 | 109 |
lemon/path.h \ |
| 85 | 110 |
lemon/preflow.h \ |
| 111 |
lemon/radix_heap.h \ |
|
| 86 | 112 |
lemon/radix_sort.h \ |
| ... | ... |
@@ -89,2 +115,3 @@ |
| 89 | 115 |
lemon/soplex.h \ |
| 116 |
lemon/static_graph.h \ |
|
| 90 | 117 |
lemon/suurballe.h \ |
| ... | ... |
@@ -92,3 +119,4 @@ |
| 92 | 119 |
lemon/tolerance.h \ |
| 93 |
lemon/unionfind.h |
|
| 120 |
lemon/unionfind.h \ |
|
| 121 |
lemon/bits/windows.h |
|
| 94 | 122 |
|
| ... | ... |
@@ -97,3 +125,2 @@ |
| 97 | 125 |
lemon/bits/array_map.h \ |
| 98 |
lemon/bits/base_extender.h \ |
|
| 99 | 126 |
lemon/bits/bezier.h \ |
| ... | ... |
@@ -32,2 +32,3 @@ |
| 32 | 32 |
#include <lemon/bits/graph_adaptor_extender.h> |
| 33 |
#include <lemon/bits/map_extender.h> |
|
| 33 | 34 |
#include <lemon/tolerance.h> |
| ... | ... |
@@ -38,19 +39,24 @@ |
| 38 | 39 |
|
| 39 |
|
|
| 40 |
#ifdef _MSC_VER |
|
| 41 |
#define LEMON_SCOPE_FIX(OUTER, NESTED) OUTER::NESTED |
|
| 42 |
#else |
|
| 43 |
#define LEMON_SCOPE_FIX(OUTER, NESTED) typename OUTER::template NESTED |
|
| 44 |
#endif |
|
| 45 |
|
|
| 46 |
template<typename DGR> |
|
| 40 | 47 |
class DigraphAdaptorBase {
|
| 41 | 48 |
public: |
| 42 |
typedef |
|
| 49 |
typedef DGR Digraph; |
|
| 43 | 50 |
typedef DigraphAdaptorBase Adaptor; |
| 44 |
typedef Digraph ParentDigraph; |
|
| 45 | 51 |
|
| 46 | 52 |
protected: |
| 47 |
|
|
| 53 |
DGR* _digraph; |
|
| 48 | 54 |
DigraphAdaptorBase() : _digraph(0) { }
|
| 49 |
void |
|
| 55 |
void initialize(DGR& digraph) { _digraph = &digraph; }
|
|
| 50 | 56 |
|
| 51 | 57 |
public: |
| 52 |
DigraphAdaptorBase(Digraph& digraph) : _digraph(&digraph) { }
|
|
| 53 |
|
|
| 54 |
typedef typename Digraph::Node Node; |
|
| 55 |
typedef typename Digraph::Arc Arc; |
|
| 58 |
DigraphAdaptorBase(DGR& digraph) : _digraph(&digraph) { }
|
|
| 59 |
|
|
| 60 |
typedef typename DGR::Node Node; |
|
| 61 |
typedef typename DGR::Arc Arc; |
|
| 56 | 62 |
|
| ... | ... |
@@ -69,9 +75,9 @@ |
| 69 | 75 |
|
| 70 |
typedef NodeNumTagIndicator< |
|
| 76 |
typedef NodeNumTagIndicator<DGR> NodeNumTag; |
|
| 71 | 77 |
int nodeNum() const { return _digraph->nodeNum(); }
|
| 72 | 78 |
|
| 73 |
typedef ArcNumTagIndicator< |
|
| 79 |
typedef ArcNumTagIndicator<DGR> ArcNumTag; |
|
| 74 | 80 |
int arcNum() const { return _digraph->arcNum(); }
|
| 75 | 81 |
|
| 76 |
typedef FindArcTagIndicator< |
|
| 82 |
typedef FindArcTagIndicator<DGR> FindArcTag; |
|
| 77 | 83 |
Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) const {
|
| ... | ... |
@@ -97,18 +103,16 @@ |
| 97 | 103 |
|
| 98 |
typedef typename ItemSetTraits< |
|
| 104 |
typedef typename ItemSetTraits<DGR, Node>::ItemNotifier NodeNotifier; |
|
| 99 | 105 |
NodeNotifier& notifier(Node) const { return _digraph->notifier(Node()); }
|
| 100 | 106 |
|
| 101 |
typedef typename ItemSetTraits< |
|
| 107 |
typedef typename ItemSetTraits<DGR, Arc>::ItemNotifier ArcNotifier; |
|
| 102 | 108 |
ArcNotifier& notifier(Arc) const { return _digraph->notifier(Arc()); }
|
| 103 | 109 |
|
| 104 |
template <typename _Value> |
|
| 105 |
class NodeMap : public Digraph::template NodeMap<_Value> {
|
|
| 110 |
template <typename V> |
|
| 111 |
class NodeMap : public DGR::template NodeMap<V> {
|
|
| 112 |
typedef typename DGR::template NodeMap<V> Parent; |
|
| 113 |
|
|
| 106 | 114 |
public: |
| 107 |
|
|
| 108 |
typedef typename Digraph::template NodeMap<_Value> Parent; |
|
| 109 |
|
|
| 110 | 115 |
explicit NodeMap(const Adaptor& adaptor) |
| 111 | 116 |
: Parent(*adaptor._digraph) {}
|
| 112 |
|
|
| 113 |
NodeMap(const Adaptor& adaptor, const _Value& value) |
|
| 117 |
NodeMap(const Adaptor& adaptor, const V& value) |
|
| 114 | 118 |
: Parent(*adaptor._digraph, value) { }
|
| ... | ... |
@@ -128,12 +132,10 @@ |
| 128 | 132 |
|
| 129 |
template <typename _Value> |
|
| 130 |
class ArcMap : public Digraph::template ArcMap<_Value> {
|
|
| 133 |
template <typename V> |
|
| 134 |
class ArcMap : public DGR::template ArcMap<V> {
|
|
| 135 |
typedef typename DGR::template ArcMap<V> Parent; |
|
| 136 |
|
|
| 131 | 137 |
public: |
| 132 |
|
|
| 133 |
typedef typename Digraph::template ArcMap<_Value> Parent; |
|
| 134 |
|
|
| 135 |
explicit ArcMap(const Adaptor& adaptor) |
|
| 138 |
explicit ArcMap(const DigraphAdaptorBase<DGR>& adaptor) |
|
| 136 | 139 |
: Parent(*adaptor._digraph) {}
|
| 137 |
|
|
| 138 |
ArcMap(const Adaptor& adaptor, const _Value& value) |
|
| 140 |
ArcMap(const DigraphAdaptorBase<DGR>& adaptor, const V& value) |
|
| 139 | 141 |
: Parent(*adaptor._digraph, value) {}
|
| ... | ... |
@@ -155,10 +157,9 @@ |
| 155 | 157 |
|
| 156 |
template<typename |
|
| 158 |
template<typename GR> |
|
| 157 | 159 |
class GraphAdaptorBase {
|
| 158 | 160 |
public: |
| 159 |
typedef _Graph Graph; |
|
| 160 |
typedef Graph ParentGraph; |
|
| 161 |
typedef GR Graph; |
|
| 161 | 162 |
|
| 162 | 163 |
protected: |
| 163 |
|
|
| 164 |
GR* _graph; |
|
| 164 | 165 |
|
| ... | ... |
@@ -166,10 +167,10 @@ |
| 166 | 167 |
|
| 167 |
void |
|
| 168 |
void initialize(GR& graph) { _graph = &graph; }
|
|
| 168 | 169 |
|
| 169 | 170 |
public: |
| 170 |
GraphAdaptorBase(Graph& graph) : _graph(&graph) {}
|
|
| 171 |
|
|
| 172 |
typedef typename Graph::Node Node; |
|
| 173 |
typedef typename Graph::Arc Arc; |
|
| 174 |
|
|
| 171 |
GraphAdaptorBase(GR& graph) : _graph(&graph) {}
|
|
| 172 |
|
|
| 173 |
typedef typename GR::Node Node; |
|
| 174 |
typedef typename GR::Arc Arc; |
|
| 175 |
typedef typename GR::Edge Edge; |
|
| 175 | 176 |
|
| ... | ... |
@@ -241,18 +242,19 @@ |
| 241 | 242 |
|
| 242 |
typedef typename ItemSetTraits< |
|
| 243 |
typedef typename ItemSetTraits<GR, Node>::ItemNotifier NodeNotifier; |
|
| 243 | 244 |
NodeNotifier& notifier(Node) const { return _graph->notifier(Node()); }
|
| 244 | 245 |
|
| 245 |
typedef typename ItemSetTraits< |
|
| 246 |
typedef typename ItemSetTraits<GR, Arc>::ItemNotifier ArcNotifier; |
|
| 246 | 247 |
ArcNotifier& notifier(Arc) const { return _graph->notifier(Arc()); }
|
| 247 | 248 |
|
| 248 |
typedef typename ItemSetTraits< |
|
| 249 |
typedef typename ItemSetTraits<GR, Edge>::ItemNotifier EdgeNotifier; |
|
| 249 | 250 |
EdgeNotifier& notifier(Edge) const { return _graph->notifier(Edge()); }
|
| 250 | 251 |
|
| 251 |
template <typename _Value> |
|
| 252 |
class NodeMap : public Graph::template NodeMap<_Value> {
|
|
| 252 |
template <typename V> |
|
| 253 |
class NodeMap : public GR::template NodeMap<V> {
|
|
| 254 |
typedef typename GR::template NodeMap<V> Parent; |
|
| 255 |
|
|
| 253 | 256 |
public: |
| 254 |
typedef typename Graph::template NodeMap<_Value> Parent; |
|
| 255 |
explicit NodeMap(const GraphAdaptorBase<Graph>& adapter) |
|
| 257 |
explicit NodeMap(const GraphAdaptorBase<GR>& adapter) |
|
| 256 | 258 |
: Parent(*adapter._graph) {}
|
| 257 |
NodeMap(const GraphAdaptorBase< |
|
| 259 |
NodeMap(const GraphAdaptorBase<GR>& adapter, const V& value) |
|
| 258 | 260 |
: Parent(*adapter._graph, value) {}
|
| ... | ... |
@@ -272,9 +274,10 @@ |
| 272 | 274 |
|
| 273 |
template <typename _Value> |
|
| 274 |
class ArcMap : public Graph::template ArcMap<_Value> {
|
|
| 275 |
template <typename V> |
|
| 276 |
class ArcMap : public GR::template ArcMap<V> {
|
|
| 277 |
typedef typename GR::template ArcMap<V> Parent; |
|
| 278 |
|
|
| 275 | 279 |
public: |
| 276 |
typedef typename Graph::template ArcMap<_Value> Parent; |
|
| 277 |
explicit ArcMap(const GraphAdaptorBase<Graph>& adapter) |
|
| 280 |
explicit ArcMap(const GraphAdaptorBase<GR>& adapter) |
|
| 278 | 281 |
: Parent(*adapter._graph) {}
|
| 279 |
ArcMap(const GraphAdaptorBase< |
|
| 282 |
ArcMap(const GraphAdaptorBase<GR>& adapter, const V& value) |
|
| 280 | 283 |
: Parent(*adapter._graph, value) {}
|
| ... | ... |
@@ -293,9 +296,10 @@ |
| 293 | 296 |
|
| 294 |
template <typename _Value> |
|
| 295 |
class EdgeMap : public Graph::template EdgeMap<_Value> {
|
|
| 297 |
template <typename V> |
|
| 298 |
class EdgeMap : public GR::template EdgeMap<V> {
|
|
| 299 |
typedef typename GR::template EdgeMap<V> Parent; |
|
| 300 |
|
|
| 296 | 301 |
public: |
| 297 |
typedef typename Graph::template EdgeMap<_Value> Parent; |
|
| 298 |
explicit EdgeMap(const GraphAdaptorBase<Graph>& adapter) |
|
| 302 |
explicit EdgeMap(const GraphAdaptorBase<GR>& adapter) |
|
| 299 | 303 |
: Parent(*adapter._graph) {}
|
| 300 |
EdgeMap(const GraphAdaptorBase< |
|
| 304 |
EdgeMap(const GraphAdaptorBase<GR>& adapter, const V& value) |
|
| 301 | 305 |
: Parent(*adapter._graph, value) {}
|
| ... | ... |
@@ -316,7 +320,7 @@ |
| 316 | 320 |
|
| 317 |
template <typename _Digraph> |
|
| 318 |
class ReverseDigraphBase : public DigraphAdaptorBase<_Digraph> {
|
|
| 321 |
template <typename DGR> |
|
| 322 |
class ReverseDigraphBase : public DigraphAdaptorBase<DGR> {
|
|
| 323 |
typedef DigraphAdaptorBase<DGR> Parent; |
|
| 319 | 324 |
public: |
| 320 |
typedef _Digraph Digraph; |
|
| 321 |
typedef DigraphAdaptorBase<_Digraph> Parent; |
|
| 325 |
typedef DGR Digraph; |
|
| 322 | 326 |
protected: |
| ... | ... |
@@ -338,3 +342,3 @@ |
| 338 | 342 |
|
| 339 |
typedef FindArcTagIndicator< |
|
| 343 |
typedef FindArcTagIndicator<DGR> FindArcTag; |
|
| 340 | 344 |
Arc findArc(const Node& u, const Node& v, |
| ... | ... |
@@ -358,3 +362,3 @@ |
| 358 | 362 |
/// |
| 359 |
/// \tparam |
|
| 363 |
/// \tparam DGR The type of the adapted digraph. |
|
| 360 | 364 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -364,3 +368,3 @@ |
| 364 | 368 |
/// digraph are convertible to each other. |
| 365 |
template<typename |
|
| 369 |
template<typename DGR> |
|
| 366 | 370 |
#ifdef DOXYGEN |
| ... | ... |
@@ -369,8 +373,8 @@ |
| 369 | 373 |
class ReverseDigraph : |
| 370 |
public DigraphAdaptorExtender<ReverseDigraphBase< |
|
| 374 |
public DigraphAdaptorExtender<ReverseDigraphBase<DGR> > {
|
|
| 371 | 375 |
#endif |
| 376 |
typedef DigraphAdaptorExtender<ReverseDigraphBase<DGR> > Parent; |
|
| 372 | 377 |
public: |
| 373 | 378 |
/// The type of the adapted digraph. |
| 374 |
typedef GR Digraph; |
|
| 375 |
typedef DigraphAdaptorExtender<ReverseDigraphBase<GR> > Parent; |
|
| 379 |
typedef DGR Digraph; |
|
| 376 | 380 |
protected: |
| ... | ... |
@@ -382,4 +386,4 @@ |
| 382 | 386 |
/// Creates a reverse digraph adaptor for the given digraph. |
| 383 |
explicit ReverseDigraph(Digraph& digraph) {
|
|
| 384 |
Parent::setDigraph(digraph); |
|
| 387 |
explicit ReverseDigraph(DGR& digraph) {
|
|
| 388 |
Parent::initialize(digraph); |
|
| 385 | 389 |
} |
| ... | ... |
@@ -392,5 +396,5 @@ |
| 392 | 396 |
/// \relates ReverseDigraph |
| 393 |
template<typename GR> |
|
| 394 |
ReverseDigraph<const GR> reverseDigraph(const GR& digraph) {
|
|
| 395 |
|
|
| 397 |
template<typename DGR> |
|
| 398 |
ReverseDigraph<const DGR> reverseDigraph(const DGR& digraph) {
|
|
| 399 |
return ReverseDigraph<const DGR>(digraph); |
|
| 396 | 400 |
} |
| ... | ... |
@@ -398,15 +402,14 @@ |
| 398 | 402 |
|
| 399 |
template <typename _Digraph, typename _NodeFilterMap, |
|
| 400 |
typename _ArcFilterMap, bool _checked = true> |
|
| 401 |
|
|
| 403 |
template <typename DGR, typename NF, typename AF, bool ch = true> |
|
| 404 |
class SubDigraphBase : public DigraphAdaptorBase<DGR> {
|
|
| 405 |
typedef DigraphAdaptorBase<DGR> Parent; |
|
| 402 | 406 |
public: |
| 403 |
typedef _Digraph Digraph; |
|
| 404 |
typedef _NodeFilterMap NodeFilterMap; |
|
| 405 |
typedef |
|
| 407 |
typedef DGR Digraph; |
|
| 408 |
typedef NF NodeFilterMap; |
|
| 409 |
typedef AF ArcFilterMap; |
|
| 406 | 410 |
|
| 407 | 411 |
typedef SubDigraphBase Adaptor; |
| 408 |
typedef DigraphAdaptorBase<_Digraph> Parent; |
|
| 409 | 412 |
protected: |
| 410 |
NodeFilterMap* _node_filter; |
|
| 411 |
ArcFilterMap* _arc_filter; |
|
| 413 |
NF* _node_filter; |
|
| 414 |
AF* _arc_filter; |
|
| 412 | 415 |
SubDigraphBase() |
| ... | ... |
@@ -414,7 +417,6 @@ |
| 414 | 417 |
|
| 415 |
void |
|
| 418 |
void initialize(DGR& digraph, NF& node_filter, AF& arc_filter) {
|
|
| 419 |
Parent::initialize(digraph); |
|
| 416 | 420 |
_node_filter = &node_filter; |
| 417 |
} |
|
| 418 |
void setArcFilterMap(ArcFilterMap& arc_filter) {
|
|
| 419 |
_arc_filter = &arc_filter; |
|
| 421 |
_arc_filter = &arc_filter; |
|
| 420 | 422 |
} |
| ... | ... |
@@ -489,3 +491,3 @@ |
| 489 | 491 |
|
| 490 |
typedef FindArcTagIndicator< |
|
| 492 |
typedef FindArcTagIndicator<DGR> FindArcTag; |
|
| 491 | 493 |
Arc findArc(const Node& source, const Node& target, |
| ... | ... |
@@ -502,14 +504,18 @@ |
| 502 | 504 |
|
| 503 |
template <typename _Value> |
|
| 504 |
class NodeMap : public SubMapExtender<Adaptor, |
|
| 505 |
|
|
| 505 |
public: |
|
| 506 |
|
|
| 507 |
template <typename V> |
|
| 508 |
class NodeMap |
|
| 509 |
: public SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>, |
|
| 510 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> {
|
|
| 511 |
typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>, |
|
| 512 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> Parent; |
|
| 513 |
|
|
| 506 | 514 |
public: |
| 507 |
typedef _Value Value; |
|
| 508 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 509 |
template NodeMap<Value> > MapParent; |
|
| 510 |
|
|
| 511 |
NodeMap(const Adaptor& adaptor) |
|
| 512 |
: MapParent(adaptor) {}
|
|
| 513 |
NodeMap(const Adaptor& adaptor, const Value& value) |
|
| 514 |
: MapParent(adaptor, value) {}
|
|
| 515 |
typedef V Value; |
|
| 516 |
|
|
| 517 |
NodeMap(const SubDigraphBase<DGR, NF, AF, ch>& adaptor) |
|
| 518 |
: Parent(adaptor) {}
|
|
| 519 |
NodeMap(const SubDigraphBase<DGR, NF, AF, ch>& adaptor, const V& value) |
|
| 520 |
: Parent(adaptor, value) {}
|
|
| 515 | 521 |
|
| ... | ... |
@@ -522,3 +528,3 @@ |
| 522 | 528 |
NodeMap& operator=(const CMap& cmap) {
|
| 523 |
|
|
| 529 |
Parent::operator=(cmap); |
|
| 524 | 530 |
return *this; |
| ... | ... |
@@ -527,14 +533,16 @@ |
| 527 | 533 |
|
| 528 |
template <typename _Value> |
|
| 529 |
class ArcMap : public SubMapExtender<Adaptor, |
|
| 530 |
|
|
| 534 |
template <typename V> |
|
| 535 |
class ArcMap |
|
| 536 |
: public SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>, |
|
| 537 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> {
|
|
| 538 |
typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>, |
|
| 539 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> Parent; |
|
| 540 |
|
|
| 531 | 541 |
public: |
| 532 |
typedef _Value Value; |
|
| 533 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 534 |
template ArcMap<Value> > MapParent; |
|
| 535 |
|
|
| 536 |
ArcMap(const Adaptor& adaptor) |
|
| 537 |
: MapParent(adaptor) {}
|
|
| 538 |
ArcMap(const Adaptor& adaptor, const Value& value) |
|
| 539 |
: MapParent(adaptor, value) {}
|
|
| 542 |
typedef V Value; |
|
| 543 |
|
|
| 544 |
ArcMap(const SubDigraphBase<DGR, NF, AF, ch>& adaptor) |
|
| 545 |
: Parent(adaptor) {}
|
|
| 546 |
ArcMap(const SubDigraphBase<DGR, NF, AF, ch>& adaptor, const V& value) |
|
| 547 |
: Parent(adaptor, value) {}
|
|
| 540 | 548 |
|
| ... | ... |
@@ -547,3 +555,3 @@ |
| 547 | 555 |
ArcMap& operator=(const CMap& cmap) {
|
| 548 |
|
|
| 556 |
Parent::operator=(cmap); |
|
| 549 | 557 |
return *this; |
| ... | ... |
@@ -554,15 +562,15 @@ |
| 554 | 562 |
|
| 555 |
template <typename _Digraph, typename _NodeFilterMap, typename _ArcFilterMap> |
|
| 556 |
class SubDigraphBase<_Digraph, _NodeFilterMap, _ArcFilterMap, false> |
|
| 557 |
|
|
| 563 |
template <typename DGR, typename NF, typename AF> |
|
| 564 |
class SubDigraphBase<DGR, NF, AF, false> |
|
| 565 |
: public DigraphAdaptorBase<DGR> {
|
|
| 566 |
typedef DigraphAdaptorBase<DGR> Parent; |
|
| 558 | 567 |
public: |
| 559 |
typedef _Digraph Digraph; |
|
| 560 |
typedef _NodeFilterMap NodeFilterMap; |
|
| 561 |
typedef |
|
| 568 |
typedef DGR Digraph; |
|
| 569 |
typedef NF NodeFilterMap; |
|
| 570 |
typedef AF ArcFilterMap; |
|
| 562 | 571 |
|
| 563 | 572 |
typedef SubDigraphBase Adaptor; |
| 564 |
typedef DigraphAdaptorBase<Digraph> Parent; |
|
| 565 | 573 |
protected: |
| 566 |
NodeFilterMap* _node_filter; |
|
| 567 |
ArcFilterMap* _arc_filter; |
|
| 574 |
NF* _node_filter; |
|
| 575 |
AF* _arc_filter; |
|
| 568 | 576 |
SubDigraphBase() |
| ... | ... |
@@ -570,7 +578,6 @@ |
| 570 | 578 |
|
| 571 |
void |
|
| 579 |
void initialize(DGR& digraph, NF& node_filter, AF& arc_filter) {
|
|
| 580 |
Parent::initialize(digraph); |
|
| 572 | 581 |
_node_filter = &node_filter; |
| 573 |
} |
|
| 574 |
void setArcFilterMap(ArcFilterMap& arc_filter) {
|
|
| 575 |
_arc_filter = &arc_filter; |
|
| 582 |
_arc_filter = &arc_filter; |
|
| 576 | 583 |
} |
| ... | ... |
@@ -629,3 +636,3 @@ |
| 629 | 636 |
|
| 630 |
typedef FindArcTagIndicator< |
|
| 637 |
typedef FindArcTagIndicator<DGR> FindArcTag; |
|
| 631 | 638 |
Arc findArc(const Node& source, const Node& target, |
| ... | ... |
@@ -642,14 +649,16 @@ |
| 642 | 649 |
|
| 643 |
template <typename _Value> |
|
| 644 |
class NodeMap : public SubMapExtender<Adaptor, |
|
| 645 |
|
|
| 650 |
template <typename V> |
|
| 651 |
class NodeMap |
|
| 652 |
: public SubMapExtender<SubDigraphBase<DGR, NF, AF, false>, |
|
| 653 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> {
|
|
| 654 |
typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, false>, |
|
| 655 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> Parent; |
|
| 656 |
|
|
| 646 | 657 |
public: |
| 647 |
typedef _Value Value; |
|
| 648 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 649 |
template NodeMap<Value> > MapParent; |
|
| 650 |
|
|
| 651 |
NodeMap(const Adaptor& adaptor) |
|
| 652 |
: MapParent(adaptor) {}
|
|
| 653 |
NodeMap(const Adaptor& adaptor, const Value& value) |
|
| 654 |
: MapParent(adaptor, value) {}
|
|
| 658 |
typedef V Value; |
|
| 659 |
|
|
| 660 |
NodeMap(const SubDigraphBase<DGR, NF, AF, false>& adaptor) |
|
| 661 |
: Parent(adaptor) {}
|
|
| 662 |
NodeMap(const SubDigraphBase<DGR, NF, AF, false>& adaptor, const V& value) |
|
| 663 |
: Parent(adaptor, value) {}
|
|
| 655 | 664 |
|
| ... | ... |
@@ -662,3 +671,3 @@ |
| 662 | 671 |
NodeMap& operator=(const CMap& cmap) {
|
| 663 |
|
|
| 672 |
Parent::operator=(cmap); |
|
| 664 | 673 |
return *this; |
| ... | ... |
@@ -667,14 +676,16 @@ |
| 667 | 676 |
|
| 668 |
template <typename _Value> |
|
| 669 |
class ArcMap : public SubMapExtender<Adaptor, |
|
| 670 |
|
|
| 677 |
template <typename V> |
|
| 678 |
class ArcMap |
|
| 679 |
: public SubMapExtender<SubDigraphBase<DGR, NF, AF, false>, |
|
| 680 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> {
|
|
| 681 |
typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, false>, |
|
| 682 |
LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> Parent; |
|
| 683 |
|
|
| 671 | 684 |
public: |
| 672 |
typedef _Value Value; |
|
| 673 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 674 |
template ArcMap<Value> > MapParent; |
|
| 675 |
|
|
| 676 |
ArcMap(const Adaptor& adaptor) |
|
| 677 |
: MapParent(adaptor) {}
|
|
| 678 |
ArcMap(const Adaptor& adaptor, const Value& value) |
|
| 679 |
: MapParent(adaptor, value) {}
|
|
| 685 |
typedef V Value; |
|
| 686 |
|
|
| 687 |
ArcMap(const SubDigraphBase<DGR, NF, AF, false>& adaptor) |
|
| 688 |
: Parent(adaptor) {}
|
|
| 689 |
ArcMap(const SubDigraphBase<DGR, NF, AF, false>& adaptor, const V& value) |
|
| 690 |
: Parent(adaptor, value) {}
|
|
| 680 | 691 |
|
| ... | ... |
@@ -687,3 +698,3 @@ |
| 687 | 698 |
ArcMap& operator=(const CMap& cmap) {
|
| 688 |
|
|
| 699 |
Parent::operator=(cmap); |
|
| 689 | 700 |
return *this; |
| ... | ... |
@@ -710,3 +721,3 @@ |
| 710 | 721 |
/// |
| 711 |
/// \tparam |
|
| 722 |
/// \tparam DGR The type of the adapted digraph. |
|
| 712 | 723 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -716,3 +727,3 @@ |
| 716 | 727 |
/// adapted digraph. The default type is |
| 717 |
/// \ref concepts::Digraph::NodeMap " |
|
| 728 |
/// \ref concepts::Digraph::NodeMap "DGR::NodeMap<bool>". |
|
| 718 | 729 |
/// \tparam AF The type of the arc filter map. |
| ... | ... |
@@ -720,3 +731,3 @@ |
| 720 | 731 |
/// adapted digraph. The default type is |
| 721 |
/// \ref concepts::Digraph::ArcMap " |
|
| 732 |
/// \ref concepts::Digraph::ArcMap "DGR::ArcMap<bool>". |
|
| 722 | 733 |
/// |
| ... | ... |
@@ -728,10 +739,10 @@ |
| 728 | 739 |
#ifdef DOXYGEN |
| 729 |
template<typename |
|
| 740 |
template<typename DGR, typename NF, typename AF> |
|
| 730 | 741 |
class SubDigraph {
|
| 731 | 742 |
#else |
| 732 |
template<typename GR, |
|
| 733 |
typename NF = typename GR::template NodeMap<bool>, |
|
| 734 |
|
|
| 743 |
template<typename DGR, |
|
| 744 |
typename NF = typename DGR::template NodeMap<bool>, |
|
| 745 |
typename AF = typename DGR::template ArcMap<bool> > |
|
| 735 | 746 |
class SubDigraph : |
| 736 |
public DigraphAdaptorExtender<SubDigraphBase< |
|
| 747 |
public DigraphAdaptorExtender<SubDigraphBase<DGR, NF, AF, true> > {
|
|
| 737 | 748 |
#endif |
| ... | ... |
@@ -739,3 +750,3 @@ |
| 739 | 750 |
/// The type of the adapted digraph. |
| 740 |
typedef |
|
| 751 |
typedef DGR Digraph; |
|
| 741 | 752 |
/// The type of the node filter map. |
| ... | ... |
@@ -745,3 +756,3 @@ |
| 745 | 756 |
|
| 746 |
typedef DigraphAdaptorExtender<SubDigraphBase< |
|
| 757 |
typedef DigraphAdaptorExtender<SubDigraphBase<DGR, NF, AF, true> > |
|
| 747 | 758 |
Parent; |
| ... | ... |
@@ -759,7 +770,4 @@ |
| 759 | 770 |
/// given node and arc filter maps. |
| 760 |
SubDigraph(Digraph& digraph, NodeFilterMap& node_filter, |
|
| 761 |
ArcFilterMap& arc_filter) {
|
|
| 762 |
setDigraph(digraph); |
|
| 763 |
setNodeFilterMap(node_filter); |
|
| 764 |
|
|
| 771 |
SubDigraph(DGR& digraph, NF& node_filter, AF& arc_filter) {
|
|
| 772 |
Parent::initialize(digraph, node_filter, arc_filter); |
|
| 765 | 773 |
} |
| ... | ... |
@@ -825,32 +833,32 @@ |
| 825 | 833 |
/// \relates SubDigraph |
| 826 |
template<typename GR, typename NF, typename AF> |
|
| 827 |
SubDigraph<const GR, NF, AF> |
|
| 828 |
subDigraph(const GR& digraph, |
|
| 829 |
NF& node_filter_map, AF& arc_filter_map) {
|
|
| 830 |
return SubDigraph<const GR, NF, AF> |
|
| 831 |
(digraph, node_filter_map, arc_filter_map); |
|
| 834 |
template<typename DGR, typename NF, typename AF> |
|
| 835 |
SubDigraph<const DGR, NF, AF> |
|
| 836 |
subDigraph(const DGR& digraph, |
|
| 837 |
NF& node_filter, AF& arc_filter) {
|
|
| 838 |
return SubDigraph<const DGR, NF, AF> |
|
| 839 |
(digraph, node_filter, arc_filter); |
|
| 832 | 840 |
} |
| 833 | 841 |
|
| 834 |
template<typename GR, typename NF, typename AF> |
|
| 835 |
SubDigraph<const GR, const NF, AF> |
|
| 836 |
subDigraph(const GR& digraph, |
|
| 837 |
const NF& node_filter_map, AF& arc_filter_map) {
|
|
| 838 |
return SubDigraph<const GR, const NF, AF> |
|
| 839 |
(digraph, node_filter_map, arc_filter_map); |
|
| 842 |
template<typename DGR, typename NF, typename AF> |
|
| 843 |
SubDigraph<const DGR, const NF, AF> |
|
| 844 |
subDigraph(const DGR& digraph, |
|
| 845 |
const NF& node_filter, AF& arc_filter) {
|
|
| 846 |
return SubDigraph<const DGR, const NF, AF> |
|
| 847 |
(digraph, node_filter, arc_filter); |
|
| 840 | 848 |
} |
| 841 | 849 |
|
| 842 |
template<typename GR, typename NF, typename AF> |
|
| 843 |
SubDigraph<const GR, NF, const AF> |
|
| 844 |
subDigraph(const GR& digraph, |
|
| 845 |
NF& node_filter_map, const AF& arc_filter_map) {
|
|
| 846 |
return SubDigraph<const GR, NF, const AF> |
|
| 847 |
(digraph, node_filter_map, arc_filter_map); |
|
| 850 |
template<typename DGR, typename NF, typename AF> |
|
| 851 |
SubDigraph<const DGR, NF, const AF> |
|
| 852 |
subDigraph(const DGR& digraph, |
|
| 853 |
NF& node_filter, const AF& arc_filter) {
|
|
| 854 |
return SubDigraph<const DGR, NF, const AF> |
|
| 855 |
(digraph, node_filter, arc_filter); |
|
| 848 | 856 |
} |
| 849 | 857 |
|
| 850 |
template<typename GR, typename NF, typename AF> |
|
| 851 |
SubDigraph<const GR, const NF, const AF> |
|
| 852 |
subDigraph(const GR& digraph, |
|
| 853 |
const NF& node_filter_map, const AF& arc_filter_map) {
|
|
| 854 |
return SubDigraph<const GR, const NF, const AF> |
|
| 855 |
(digraph, node_filter_map, arc_filter_map); |
|
| 858 |
template<typename DGR, typename NF, typename AF> |
|
| 859 |
SubDigraph<const DGR, const NF, const AF> |
|
| 860 |
subDigraph(const DGR& digraph, |
|
| 861 |
const NF& node_filter, const AF& arc_filter) {
|
|
| 862 |
return SubDigraph<const DGR, const NF, const AF> |
|
| 863 |
(digraph, node_filter, arc_filter); |
|
| 856 | 864 |
} |
| ... | ... |
@@ -858,25 +866,23 @@ |
| 858 | 866 |
|
| 859 |
template <typename _Graph, typename _NodeFilterMap, |
|
| 860 |
typename _EdgeFilterMap, bool _checked = true> |
|
| 861 |
|
|
| 867 |
template <typename GR, typename NF, typename EF, bool ch = true> |
|
| 868 |
class SubGraphBase : public GraphAdaptorBase<GR> {
|
|
| 869 |
typedef GraphAdaptorBase<GR> Parent; |
|
| 862 | 870 |
public: |
| 863 |
typedef _Graph Graph; |
|
| 864 |
typedef _NodeFilterMap NodeFilterMap; |
|
| 865 |
typedef |
|
| 871 |
typedef GR Graph; |
|
| 872 |
typedef NF NodeFilterMap; |
|
| 873 |
typedef EF EdgeFilterMap; |
|
| 866 | 874 |
|
| 867 | 875 |
typedef SubGraphBase Adaptor; |
| 868 |
typedef GraphAdaptorBase<_Graph> Parent; |
|
| 869 | 876 |
protected: |
| 870 | 877 |
|
| 871 |
NodeFilterMap* _node_filter_map; |
|
| 872 |
EdgeFilterMap* _edge_filter_map; |
|
| 878 |
NF* _node_filter; |
|
| 879 |
EF* _edge_filter; |
|
| 873 | 880 |
|
| 874 | 881 |
SubGraphBase() |
| 875 |
: Parent(), _node_filter_map(0), _edge_filter_map(0) { }
|
|
| 876 |
|
|
| 877 |
void setNodeFilterMap(NodeFilterMap& node_filter_map) {
|
|
| 878 |
_node_filter_map=&node_filter_map; |
|
| 879 |
} |
|
| 880 |
void setEdgeFilterMap(EdgeFilterMap& edge_filter_map) {
|
|
| 881 |
|
|
| 882 |
: Parent(), _node_filter(0), _edge_filter(0) { }
|
|
| 883 |
|
|
| 884 |
void initialize(GR& graph, NF& node_filter, EF& edge_filter) {
|
|
| 885 |
Parent::initialize(graph); |
|
| 886 |
_node_filter = &node_filter; |
|
| 887 |
_edge_filter = &edge_filter; |
|
| 882 | 888 |
} |
| ... | ... |
@@ -891,3 +897,3 @@ |
| 891 | 897 |
Parent::first(i); |
| 892 |
while (i!=INVALID && !(* |
|
| 898 |
while (i!=INVALID && !(*_node_filter)[i]) Parent::next(i); |
|
| 893 | 899 |
} |
| ... | ... |
@@ -896,5 +902,5 @@ |
| 896 | 902 |
Parent::first(i); |
| 897 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 898 |
|| !(*_node_filter_map)[Parent::source(i)] |
|
| 899 |
|
|
| 903 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 904 |
|| !(*_node_filter)[Parent::source(i)] |
|
| 905 |
|| !(*_node_filter)[Parent::target(i)])) |
|
| 900 | 906 |
Parent::next(i); |
| ... | ... |
@@ -904,5 +910,5 @@ |
| 904 | 910 |
Parent::first(i); |
| 905 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 906 |
|| !(*_node_filter_map)[Parent::u(i)] |
|
| 907 |
|
|
| 911 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 912 |
|| !(*_node_filter)[Parent::u(i)] |
|
| 913 |
|| !(*_node_filter)[Parent::v(i)])) |
|
| 908 | 914 |
Parent::next(i); |
| ... | ... |
@@ -912,4 +918,4 @@ |
| 912 | 918 |
Parent::firstIn(i, n); |
| 913 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 914 |
|| !(*_node_filter_map)[Parent::source(i)])) |
|
| 919 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 920 |
|| !(*_node_filter)[Parent::source(i)])) |
|
| 915 | 921 |
Parent::nextIn(i); |
| ... | ... |
@@ -919,4 +925,4 @@ |
| 919 | 925 |
Parent::firstOut(i, n); |
| 920 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 921 |
|| !(*_node_filter_map)[Parent::target(i)])) |
|
| 926 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 927 |
|| !(*_node_filter)[Parent::target(i)])) |
|
| 922 | 928 |
Parent::nextOut(i); |
| ... | ... |
@@ -926,5 +932,5 @@ |
| 926 | 932 |
Parent::firstInc(i, d, n); |
| 927 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 928 |
|| !(*_node_filter_map)[Parent::u(i)] |
|
| 929 |
|
|
| 933 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 934 |
|| !(*_node_filter)[Parent::u(i)] |
|
| 935 |
|| !(*_node_filter)[Parent::v(i)])) |
|
| 930 | 936 |
Parent::nextInc(i, d); |
| ... | ... |
@@ -934,3 +940,3 @@ |
| 934 | 940 |
Parent::next(i); |
| 935 |
while (i!=INVALID && !(* |
|
| 941 |
while (i!=INVALID && !(*_node_filter)[i]) Parent::next(i); |
|
| 936 | 942 |
} |
| ... | ... |
@@ -939,5 +945,5 @@ |
| 939 | 945 |
Parent::next(i); |
| 940 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 941 |
|| !(*_node_filter_map)[Parent::source(i)] |
|
| 942 |
|
|
| 946 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 947 |
|| !(*_node_filter)[Parent::source(i)] |
|
| 948 |
|| !(*_node_filter)[Parent::target(i)])) |
|
| 943 | 949 |
Parent::next(i); |
| ... | ... |
@@ -947,5 +953,5 @@ |
| 947 | 953 |
Parent::next(i); |
| 948 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 949 |
|| !(*_node_filter_map)[Parent::u(i)] |
|
| 950 |
|
|
| 954 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 955 |
|| !(*_node_filter)[Parent::u(i)] |
|
| 956 |
|| !(*_node_filter)[Parent::v(i)])) |
|
| 951 | 957 |
Parent::next(i); |
| ... | ... |
@@ -955,4 +961,4 @@ |
| 955 | 961 |
Parent::nextIn(i); |
| 956 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 957 |
|| !(*_node_filter_map)[Parent::source(i)])) |
|
| 962 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 963 |
|| !(*_node_filter)[Parent::source(i)])) |
|
| 958 | 964 |
Parent::nextIn(i); |
| ... | ... |
@@ -962,4 +968,4 @@ |
| 962 | 968 |
Parent::nextOut(i); |
| 963 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 964 |
|| !(*_node_filter_map)[Parent::target(i)])) |
|
| 969 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 970 |
|| !(*_node_filter)[Parent::target(i)])) |
|
| 965 | 971 |
Parent::nextOut(i); |
| ... | ... |
@@ -969,5 +975,5 @@ |
| 969 | 975 |
Parent::nextInc(i, d); |
| 970 |
while (i!=INVALID && (!(*_edge_filter_map)[i] |
|
| 971 |
|| !(*_node_filter_map)[Parent::u(i)] |
|
| 972 |
|
|
| 976 |
while (i!=INVALID && (!(*_edge_filter)[i] |
|
| 977 |
|| !(*_node_filter)[Parent::u(i)] |
|
| 978 |
|| !(*_node_filter)[Parent::v(i)])) |
|
| 973 | 979 |
Parent::nextInc(i, d); |
| ... | ... |
@@ -975,7 +981,7 @@ |
| 975 | 981 |
|
| 976 |
void status(const Node& n, bool v) const { _node_filter_map->set(n, v); }
|
|
| 977 |
void status(const Edge& e, bool v) const { _edge_filter_map->set(e, v); }
|
|
| 978 |
|
|
| 979 |
bool status(const Node& n) const { return (*_node_filter_map)[n]; }
|
|
| 980 |
|
|
| 982 |
void status(const Node& n, bool v) const { _node_filter->set(n, v); }
|
|
| 983 |
void status(const Edge& e, bool v) const { _edge_filter->set(e, v); }
|
|
| 984 |
|
|
| 985 |
bool status(const Node& n) const { return (*_node_filter)[n]; }
|
|
| 986 |
bool status(const Edge& e) const { return (*_edge_filter)[e]; }
|
|
| 981 | 987 |
|
| ... | ... |
@@ -988,3 +994,3 @@ |
| 988 | 994 |
const Arc& prev = INVALID) const {
|
| 989 |
if (!(* |
|
| 995 |
if (!(*_node_filter)[u] || !(*_node_filter)[v]) {
|
|
| 990 | 996 |
return INVALID; |
| ... | ... |
@@ -992,3 +998,3 @@ |
| 992 | 998 |
Arc arc = Parent::findArc(u, v, prev); |
| 993 |
while (arc != INVALID && !(* |
|
| 999 |
while (arc != INVALID && !(*_edge_filter)[arc]) {
|
|
| 994 | 1000 |
arc = Parent::findArc(u, v, arc); |
| ... | ... |
@@ -1001,3 +1007,3 @@ |
| 1001 | 1007 |
const Edge& prev = INVALID) const {
|
| 1002 |
if (!(* |
|
| 1008 |
if (!(*_node_filter)[u] || !(*_node_filter)[v]) {
|
|
| 1003 | 1009 |
return INVALID; |
| ... | ... |
@@ -1005,3 +1011,3 @@ |
| 1005 | 1011 |
Edge edge = Parent::findEdge(u, v, prev); |
| 1006 |
while (edge != INVALID && !(* |
|
| 1012 |
while (edge != INVALID && !(*_edge_filter)[edge]) {
|
|
| 1007 | 1013 |
edge = Parent::findEdge(u, v, edge); |
| ... | ... |
@@ -1011,14 +1017,16 @@ |
| 1011 | 1017 |
|
| 1012 |
template <typename _Value> |
|
| 1013 |
class NodeMap : public SubMapExtender<Adaptor, |
|
| 1014 |
|
|
| 1018 |
template <typename V> |
|
| 1019 |
class NodeMap |
|
| 1020 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1021 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> {
|
|
| 1022 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1023 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> Parent; |
|
| 1024 |
|
|
| 1015 | 1025 |
public: |
| 1016 |
typedef _Value Value; |
|
| 1017 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1018 |
template NodeMap<Value> > MapParent; |
|
| 1019 |
|
|
| 1020 |
NodeMap(const Adaptor& adaptor) |
|
| 1021 |
: MapParent(adaptor) {}
|
|
| 1022 |
NodeMap(const Adaptor& adaptor, const Value& value) |
|
| 1023 |
: MapParent(adaptor, value) {}
|
|
| 1026 |
typedef V Value; |
|
| 1027 |
|
|
| 1028 |
NodeMap(const SubGraphBase<GR, NF, EF, ch>& adaptor) |
|
| 1029 |
: Parent(adaptor) {}
|
|
| 1030 |
NodeMap(const SubGraphBase<GR, NF, EF, ch>& adaptor, const V& value) |
|
| 1031 |
: Parent(adaptor, value) {}
|
|
| 1024 | 1032 |
|
| ... | ... |
@@ -1031,3 +1039,3 @@ |
| 1031 | 1039 |
NodeMap& operator=(const CMap& cmap) {
|
| 1032 |
|
|
| 1040 |
Parent::operator=(cmap); |
|
| 1033 | 1041 |
return *this; |
| ... | ... |
@@ -1036,14 +1044,16 @@ |
| 1036 | 1044 |
|
| 1037 |
template <typename _Value> |
|
| 1038 |
class ArcMap : public SubMapExtender<Adaptor, |
|
| 1039 |
|
|
| 1045 |
template <typename V> |
|
| 1046 |
class ArcMap |
|
| 1047 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1048 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> {
|
|
| 1049 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1050 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> Parent; |
|
| 1051 |
|
|
| 1040 | 1052 |
public: |
| 1041 |
typedef _Value Value; |
|
| 1042 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1043 |
template ArcMap<Value> > MapParent; |
|
| 1044 |
|
|
| 1045 |
ArcMap(const Adaptor& adaptor) |
|
| 1046 |
: MapParent(adaptor) {}
|
|
| 1047 |
ArcMap(const Adaptor& adaptor, const Value& value) |
|
| 1048 |
: MapParent(adaptor, value) {}
|
|
| 1053 |
typedef V Value; |
|
| 1054 |
|
|
| 1055 |
ArcMap(const SubGraphBase<GR, NF, EF, ch>& adaptor) |
|
| 1056 |
: Parent(adaptor) {}
|
|
| 1057 |
ArcMap(const SubGraphBase<GR, NF, EF, ch>& adaptor, const V& value) |
|
| 1058 |
: Parent(adaptor, value) {}
|
|
| 1049 | 1059 |
|
| ... | ... |
@@ -1056,3 +1066,3 @@ |
| 1056 | 1066 |
ArcMap& operator=(const CMap& cmap) {
|
| 1057 |
|
|
| 1067 |
Parent::operator=(cmap); |
|
| 1058 | 1068 |
return *this; |
| ... | ... |
@@ -1061,15 +1071,17 @@ |
| 1061 | 1071 |
|
| 1062 |
template <typename _Value> |
|
| 1063 |
class EdgeMap : public SubMapExtender<Adaptor, |
|
| 1064 |
|
|
| 1072 |
template <typename V> |
|
| 1073 |
class EdgeMap |
|
| 1074 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1075 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> {
|
|
| 1076 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, |
|
| 1077 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> Parent; |
|
| 1078 |
|
|
| 1065 | 1079 |
public: |
| 1066 |
typedef _Value Value; |
|
| 1067 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1068 |
template EdgeMap<Value> > MapParent; |
|
| 1069 |
|
|
| 1070 |
EdgeMap(const Adaptor& adaptor) |
|
| 1071 |
: MapParent(adaptor) {}
|
|
| 1072 |
|
|
| 1073 |
EdgeMap(const Adaptor& adaptor, const Value& value) |
|
| 1074 |
|
|
| 1080 |
typedef V Value; |
|
| 1081 |
|
|
| 1082 |
EdgeMap(const SubGraphBase<GR, NF, EF, ch>& adaptor) |
|
| 1083 |
: Parent(adaptor) {}
|
|
| 1084 |
|
|
| 1085 |
EdgeMap(const SubGraphBase<GR, NF, EF, ch>& adaptor, const V& value) |
|
| 1086 |
: Parent(adaptor, value) {}
|
|
| 1075 | 1087 |
|
| ... | ... |
@@ -1082,3 +1094,3 @@ |
| 1082 | 1094 |
EdgeMap& operator=(const CMap& cmap) {
|
| 1083 |
|
|
| 1095 |
Parent::operator=(cmap); |
|
| 1084 | 1096 |
return *this; |
| ... | ... |
@@ -1089,23 +1101,22 @@ |
| 1089 | 1101 |
|
| 1090 |
template <typename _Graph, typename _NodeFilterMap, typename _EdgeFilterMap> |
|
| 1091 |
class SubGraphBase<_Graph, _NodeFilterMap, _EdgeFilterMap, false> |
|
| 1092 |
|
|
| 1102 |
template <typename GR, typename NF, typename EF> |
|
| 1103 |
class SubGraphBase<GR, NF, EF, false> |
|
| 1104 |
: public GraphAdaptorBase<GR> {
|
|
| 1105 |
typedef GraphAdaptorBase<GR> Parent; |
|
| 1093 | 1106 |
public: |
| 1094 |
typedef _Graph Graph; |
|
| 1095 |
typedef _NodeFilterMap NodeFilterMap; |
|
| 1096 |
typedef |
|
| 1107 |
typedef GR Graph; |
|
| 1108 |
typedef NF NodeFilterMap; |
|
| 1109 |
typedef EF EdgeFilterMap; |
|
| 1097 | 1110 |
|
| 1098 | 1111 |
typedef SubGraphBase Adaptor; |
| 1099 |
typedef GraphAdaptorBase<_Graph> Parent; |
|
| 1100 | 1112 |
protected: |
| 1101 |
NodeFilterMap* _node_filter_map; |
|
| 1102 |
EdgeFilterMap* _edge_filter_map; |
|
| 1103 |
SubGraphBase() : Parent(), |
|
| 1104 |
_node_filter_map(0), _edge_filter_map(0) { }
|
|
| 1105 |
|
|
| 1106 |
void setNodeFilterMap(NodeFilterMap& node_filter_map) {
|
|
| 1107 |
_node_filter_map=&node_filter_map; |
|
| 1108 |
} |
|
| 1109 |
void setEdgeFilterMap(EdgeFilterMap& edge_filter_map) {
|
|
| 1110 |
_edge_filter_map=&edge_filter_map; |
|
| 1113 |
NF* _node_filter; |
|
| 1114 |
EF* _edge_filter; |
|
| 1115 |
SubGraphBase() |
|
| 1116 |
: Parent(), _node_filter(0), _edge_filter(0) { }
|
|
| 1117 |
|
|
| 1118 |
void initialize(GR& graph, NF& node_filter, EF& edge_filter) {
|
|
| 1119 |
Parent::initialize(graph); |
|
| 1120 |
_node_filter = &node_filter; |
|
| 1121 |
_edge_filter = &edge_filter; |
|
| 1111 | 1122 |
} |
| ... | ... |
@@ -1120,3 +1131,3 @@ |
| 1120 | 1131 |
Parent::first(i); |
| 1121 |
while (i!=INVALID && !(* |
|
| 1132 |
while (i!=INVALID && !(*_node_filter)[i]) Parent::next(i); |
|
| 1122 | 1133 |
} |
| ... | ... |
@@ -1125,3 +1136,3 @@ |
| 1125 | 1136 |
Parent::first(i); |
| 1126 |
while (i!=INVALID && !(* |
|
| 1137 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::next(i); |
|
| 1127 | 1138 |
} |
| ... | ... |
@@ -1130,3 +1141,3 @@ |
| 1130 | 1141 |
Parent::first(i); |
| 1131 |
while (i!=INVALID && !(* |
|
| 1142 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::next(i); |
|
| 1132 | 1143 |
} |
| ... | ... |
@@ -1135,3 +1146,3 @@ |
| 1135 | 1146 |
Parent::firstIn(i, n); |
| 1136 |
while (i!=INVALID && !(* |
|
| 1147 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextIn(i); |
|
| 1137 | 1148 |
} |
| ... | ... |
@@ -1140,3 +1151,3 @@ |
| 1140 | 1151 |
Parent::firstOut(i, n); |
| 1141 |
while (i!=INVALID && !(* |
|
| 1152 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextOut(i); |
|
| 1142 | 1153 |
} |
| ... | ... |
@@ -1145,3 +1156,3 @@ |
| 1145 | 1156 |
Parent::firstInc(i, d, n); |
| 1146 |
while (i!=INVALID && !(* |
|
| 1157 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextInc(i, d); |
|
| 1147 | 1158 |
} |
| ... | ... |
@@ -1150,3 +1161,3 @@ |
| 1150 | 1161 |
Parent::next(i); |
| 1151 |
while (i!=INVALID && !(* |
|
| 1162 |
while (i!=INVALID && !(*_node_filter)[i]) Parent::next(i); |
|
| 1152 | 1163 |
} |
| ... | ... |
@@ -1154,3 +1165,3 @@ |
| 1154 | 1165 |
Parent::next(i); |
| 1155 |
while (i!=INVALID && !(* |
|
| 1166 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::next(i); |
|
| 1156 | 1167 |
} |
| ... | ... |
@@ -1158,3 +1169,3 @@ |
| 1158 | 1169 |
Parent::next(i); |
| 1159 |
while (i!=INVALID && !(* |
|
| 1170 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::next(i); |
|
| 1160 | 1171 |
} |
| ... | ... |
@@ -1162,3 +1173,3 @@ |
| 1162 | 1173 |
Parent::nextIn(i); |
| 1163 |
while (i!=INVALID && !(* |
|
| 1174 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextIn(i); |
|
| 1164 | 1175 |
} |
| ... | ... |
@@ -1167,3 +1178,3 @@ |
| 1167 | 1178 |
Parent::nextOut(i); |
| 1168 |
while (i!=INVALID && !(* |
|
| 1179 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextOut(i); |
|
| 1169 | 1180 |
} |
| ... | ... |
@@ -1171,10 +1182,10 @@ |
| 1171 | 1182 |
Parent::nextInc(i, d); |
| 1172 |
while (i!=INVALID && !(* |
|
| 1183 |
while (i!=INVALID && !(*_edge_filter)[i]) Parent::nextInc(i, d); |
|
| 1173 | 1184 |
} |
| 1174 | 1185 |
|
| 1175 |
void status(const Node& n, bool v) const { _node_filter_map->set(n, v); }
|
|
| 1176 |
void status(const Edge& e, bool v) const { _edge_filter_map->set(e, v); }
|
|
| 1177 |
|
|
| 1178 |
bool status(const Node& n) const { return (*_node_filter_map)[n]; }
|
|
| 1179 |
|
|
| 1186 |
void status(const Node& n, bool v) const { _node_filter->set(n, v); }
|
|
| 1187 |
void status(const Edge& e, bool v) const { _edge_filter->set(e, v); }
|
|
| 1188 |
|
|
| 1189 |
bool status(const Node& n) const { return (*_node_filter)[n]; }
|
|
| 1190 |
bool status(const Edge& e) const { return (*_edge_filter)[e]; }
|
|
| 1180 | 1191 |
|
| ... | ... |
@@ -1188,3 +1199,3 @@ |
| 1188 | 1199 |
Arc arc = Parent::findArc(u, v, prev); |
| 1189 |
while (arc != INVALID && !(* |
|
| 1200 |
while (arc != INVALID && !(*_edge_filter)[arc]) {
|
|
| 1190 | 1201 |
arc = Parent::findArc(u, v, arc); |
| ... | ... |
@@ -1198,3 +1209,3 @@ |
| 1198 | 1209 |
Edge edge = Parent::findEdge(u, v, prev); |
| 1199 |
while (edge != INVALID && !(* |
|
| 1210 |
while (edge != INVALID && !(*_edge_filter)[edge]) {
|
|
| 1200 | 1211 |
edge = Parent::findEdge(u, v, edge); |
| ... | ... |
@@ -1204,14 +1215,16 @@ |
| 1204 | 1215 |
|
| 1205 |
template <typename _Value> |
|
| 1206 |
class NodeMap : public SubMapExtender<Adaptor, |
|
| 1207 |
|
|
| 1216 |
template <typename V> |
|
| 1217 |
class NodeMap |
|
| 1218 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1219 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> {
|
|
| 1220 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1221 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> Parent; |
|
| 1222 |
|
|
| 1208 | 1223 |
public: |
| 1209 |
typedef _Value Value; |
|
| 1210 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1211 |
template NodeMap<Value> > MapParent; |
|
| 1212 |
|
|
| 1213 |
NodeMap(const Adaptor& adaptor) |
|
| 1214 |
: MapParent(adaptor) {}
|
|
| 1215 |
NodeMap(const Adaptor& adaptor, const Value& value) |
|
| 1216 |
: MapParent(adaptor, value) {}
|
|
| 1224 |
typedef V Value; |
|
| 1225 |
|
|
| 1226 |
NodeMap(const SubGraphBase<GR, NF, EF, false>& adaptor) |
|
| 1227 |
: Parent(adaptor) {}
|
|
| 1228 |
NodeMap(const SubGraphBase<GR, NF, EF, false>& adaptor, const V& value) |
|
| 1229 |
: Parent(adaptor, value) {}
|
|
| 1217 | 1230 |
|
| ... | ... |
@@ -1224,3 +1237,3 @@ |
| 1224 | 1237 |
NodeMap& operator=(const CMap& cmap) {
|
| 1225 |
|
|
| 1238 |
Parent::operator=(cmap); |
|
| 1226 | 1239 |
return *this; |
| ... | ... |
@@ -1229,14 +1242,16 @@ |
| 1229 | 1242 |
|
| 1230 |
template <typename _Value> |
|
| 1231 |
class ArcMap : public SubMapExtender<Adaptor, |
|
| 1232 |
|
|
| 1243 |
template <typename V> |
|
| 1244 |
class ArcMap |
|
| 1245 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1246 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> {
|
|
| 1247 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1248 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> Parent; |
|
| 1249 |
|
|
| 1233 | 1250 |
public: |
| 1234 |
typedef _Value Value; |
|
| 1235 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1236 |
template ArcMap<Value> > MapParent; |
|
| 1237 |
|
|
| 1238 |
ArcMap(const Adaptor& adaptor) |
|
| 1239 |
: MapParent(adaptor) {}
|
|
| 1240 |
ArcMap(const Adaptor& adaptor, const Value& value) |
|
| 1241 |
: MapParent(adaptor, value) {}
|
|
| 1251 |
typedef V Value; |
|
| 1252 |
|
|
| 1253 |
ArcMap(const SubGraphBase<GR, NF, EF, false>& adaptor) |
|
| 1254 |
: Parent(adaptor) {}
|
|
| 1255 |
ArcMap(const SubGraphBase<GR, NF, EF, false>& adaptor, const V& value) |
|
| 1256 |
: Parent(adaptor, value) {}
|
|
| 1242 | 1257 |
|
| ... | ... |
@@ -1249,3 +1264,3 @@ |
| 1249 | 1264 |
ArcMap& operator=(const CMap& cmap) {
|
| 1250 |
|
|
| 1265 |
Parent::operator=(cmap); |
|
| 1251 | 1266 |
return *this; |
| ... | ... |
@@ -1254,15 +1269,17 @@ |
| 1254 | 1269 |
|
| 1255 |
template <typename _Value> |
|
| 1256 |
class EdgeMap : public SubMapExtender<Adaptor, |
|
| 1257 |
|
|
| 1270 |
template <typename V> |
|
| 1271 |
class EdgeMap |
|
| 1272 |
: public SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1273 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> {
|
|
| 1274 |
typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, |
|
| 1275 |
LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> Parent; |
|
| 1276 |
|
|
| 1258 | 1277 |
public: |
| 1259 |
typedef _Value Value; |
|
| 1260 |
typedef SubMapExtender<Adaptor, typename Parent:: |
|
| 1261 |
template EdgeMap<Value> > MapParent; |
|
| 1262 |
|
|
| 1263 |
EdgeMap(const Adaptor& adaptor) |
|
| 1264 |
: MapParent(adaptor) {}
|
|
| 1265 |
|
|
| 1266 |
EdgeMap(const Adaptor& adaptor, const _Value& value) |
|
| 1267 |
|
|
| 1278 |
typedef V Value; |
|
| 1279 |
|
|
| 1280 |
EdgeMap(const SubGraphBase<GR, NF, EF, false>& adaptor) |
|
| 1281 |
: Parent(adaptor) {}
|
|
| 1282 |
|
|
| 1283 |
EdgeMap(const SubGraphBase<GR, NF, EF, false>& adaptor, const V& value) |
|
| 1284 |
: Parent(adaptor, value) {}
|
|
| 1268 | 1285 |
|
| ... | ... |
@@ -1275,3 +1292,3 @@ |
| 1275 | 1292 |
EdgeMap& operator=(const CMap& cmap) {
|
| 1276 |
|
|
| 1293 |
Parent::operator=(cmap); |
|
| 1277 | 1294 |
return *this; |
| ... | ... |
@@ -1334,3 +1351,3 @@ |
| 1334 | 1351 |
|
| 1335 |
typedef GraphAdaptorExtender< |
|
| 1352 |
typedef GraphAdaptorExtender<SubGraphBase<GR, NF, EF, true> > |
|
| 1336 | 1353 |
Parent; |
| ... | ... |
@@ -1348,7 +1365,4 @@ |
| 1348 | 1365 |
/// and edge filter maps. |
| 1349 |
SubGraph(Graph& graph, NodeFilterMap& node_filter_map, |
|
| 1350 |
EdgeFilterMap& edge_filter_map) {
|
|
| 1351 |
setGraph(graph); |
|
| 1352 |
setNodeFilterMap(node_filter_map); |
|
| 1353 |
|
|
| 1366 |
SubGraph(GR& graph, NF& node_filter, EF& edge_filter) {
|
|
| 1367 |
initialize(graph, node_filter, edge_filter); |
|
| 1354 | 1368 |
} |
| ... | ... |
@@ -1416,6 +1430,5 @@ |
| 1416 | 1430 |
SubGraph<const GR, NF, EF> |
| 1417 |
subGraph(const GR& graph, |
|
| 1418 |
NF& node_filter_map, EF& edge_filter_map) {
|
|
| 1431 |
subGraph(const GR& graph, NF& node_filter, EF& edge_filter) {
|
|
| 1419 | 1432 |
return SubGraph<const GR, NF, EF> |
| 1420 |
(graph, |
|
| 1433 |
(graph, node_filter, edge_filter); |
|
| 1421 | 1434 |
} |
| ... | ... |
@@ -1424,6 +1437,5 @@ |
| 1424 | 1437 |
SubGraph<const GR, const NF, EF> |
| 1425 |
subGraph(const GR& graph, |
|
| 1426 |
const NF& node_filter_map, EF& edge_filter_map) {
|
|
| 1438 |
subGraph(const GR& graph, const NF& node_filter, EF& edge_filter) {
|
|
| 1427 | 1439 |
return SubGraph<const GR, const NF, EF> |
| 1428 |
(graph, |
|
| 1440 |
(graph, node_filter, edge_filter); |
|
| 1429 | 1441 |
} |
| ... | ... |
@@ -1432,6 +1444,5 @@ |
| 1432 | 1444 |
SubGraph<const GR, NF, const EF> |
| 1433 |
subGraph(const GR& graph, |
|
| 1434 |
NF& node_filter_map, const EF& edge_filter_map) {
|
|
| 1445 |
subGraph(const GR& graph, NF& node_filter, const EF& edge_filter) {
|
|
| 1435 | 1446 |
return SubGraph<const GR, NF, const EF> |
| 1436 |
(graph, |
|
| 1447 |
(graph, node_filter, edge_filter); |
|
| 1437 | 1448 |
} |
| ... | ... |
@@ -1440,6 +1451,5 @@ |
| 1440 | 1451 |
SubGraph<const GR, const NF, const EF> |
| 1441 |
subGraph(const GR& graph, |
|
| 1442 |
const NF& node_filter_map, const EF& edge_filter_map) {
|
|
| 1452 |
subGraph(const GR& graph, const NF& node_filter, const EF& edge_filter) {
|
|
| 1443 | 1453 |
return SubGraph<const GR, const NF, const EF> |
| 1444 |
(graph, |
|
| 1454 |
(graph, node_filter, edge_filter); |
|
| 1445 | 1455 |
} |
| ... | ... |
@@ -1483,4 +1493,9 @@ |
| 1483 | 1493 |
public DigraphAdaptorExtender< |
| 1484 |
SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, bool |
|
| 1494 |
SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, Const<bool, true> >, |
|
| 1495 |
true> > {
|
|
| 1485 | 1496 |
#endif |
| 1497 |
typedef DigraphAdaptorExtender< |
|
| 1498 |
SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, Const<bool, true> >, |
|
| 1499 |
true> > Parent; |
|
| 1500 |
|
|
| 1486 | 1501 |
public: |
| ... | ... |
@@ -1490,6 +1505,2 @@ |
| 1490 | 1505 |
|
| 1491 |
typedef DigraphAdaptorExtender< |
|
| 1492 |
SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, bool>, true> > |
|
| 1493 |
Parent; |
|
| 1494 |
|
|
| 1495 | 1506 |
typedef typename Parent::Node Node; |
| ... | ... |
@@ -1497,7 +1508,5 @@ |
| 1497 | 1508 |
protected: |
| 1498 |
ConstMap<typename Digraph::Arc, bool> const_true_map; |
|
| 1499 |
|
|
| 1500 |
FilterNodes() : const_true_map(true) {
|
|
| 1501 |
Parent::setArcFilterMap(const_true_map); |
|
| 1502 |
|
|
| 1509 |
ConstMap<typename Digraph::Arc, Const<bool, true> > const_true_map; |
|
| 1510 |
|
|
| 1511 |
FilterNodes() : const_true_map() {}
|
|
| 1503 | 1512 |
|
| ... | ... |
@@ -1509,8 +1518,6 @@ |
| 1509 | 1518 |
/// given node filter map. |
| 1510 |
FilterNodes(GR& graph, NodeFilterMap& node_filter) : |
|
| 1511 |
Parent(), const_true_map(true) |
|
| 1519 |
FilterNodes(GR& graph, NF& node_filter) |
|
| 1520 |
: Parent(), const_true_map() |
|
| 1512 | 1521 |
{
|
| 1513 |
Parent::setDigraph(graph); |
|
| 1514 |
Parent::setNodeFilterMap(node_filter); |
|
| 1515 |
Parent:: |
|
| 1522 |
Parent::initialize(graph, node_filter, const_true_map); |
|
| 1516 | 1523 |
} |
| ... | ... |
@@ -1549,18 +1556,20 @@ |
| 1549 | 1556 |
public GraphAdaptorExtender< |
| 1550 |
SubGraphBase<GR, NF, ConstMap<typename GR::Edge, bool |
|
| 1557 |
SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >, |
|
| 1558 |
true> > {
|
|
| 1559 |
|
|
| 1560 |
typedef GraphAdaptorExtender< |
|
| 1561 |
SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >, |
|
| 1562 |
true> > Parent; |
|
| 1551 | 1563 |
|
| 1552 | 1564 |
public: |
| 1565 |
|
|
| 1553 | 1566 |
typedef GR Graph; |
| 1554 | 1567 |
typedef NF NodeFilterMap; |
| 1555 |
typedef GraphAdaptorExtender< |
|
| 1556 |
SubGraphBase<GR, NF, ConstMap<typename GR::Edge, bool>, true> > |
|
| 1557 |
Parent; |
|
| 1558 | 1568 |
|
| 1559 | 1569 |
typedef typename Parent::Node Node; |
| 1570 |
|
|
| 1560 | 1571 |
protected: |
| 1561 |
ConstMap<typename Graph::Edge, bool> const_true_map; |
|
| 1562 |
|
|
| 1563 |
FilterNodes() : const_true_map(true) {
|
|
| 1564 |
Parent::setEdgeFilterMap(const_true_map); |
|
| 1565 |
|
|
| 1572 |
ConstMap<typename GR::Edge, Const<bool, true> > const_true_map; |
|
| 1573 |
|
|
| 1574 |
FilterNodes() : const_true_map() {}
|
|
| 1566 | 1575 |
|
| ... | ... |
@@ -1568,7 +1577,5 @@ |
| 1568 | 1577 |
|
| 1569 |
FilterNodes(Graph& _graph, NodeFilterMap& node_filter_map) : |
|
| 1570 |
Parent(), const_true_map(true) {
|
|
| 1571 |
Parent::setGraph(_graph); |
|
| 1572 |
Parent::setNodeFilterMap(node_filter_map); |
|
| 1573 |
|
|
| 1578 |
FilterNodes(GR& graph, NodeFilterMap& node_filter) : |
|
| 1579 |
Parent(), const_true_map() {
|
|
| 1580 |
Parent::initialize(graph, node_filter, const_true_map); |
|
| 1574 | 1581 |
} |
| ... | ... |
@@ -1590,4 +1597,4 @@ |
| 1590 | 1597 |
FilterNodes<const GR, NF> |
| 1591 |
filterNodes(const GR& graph, NF& node_filter_map) {
|
|
| 1592 |
return FilterNodes<const GR, NF>(graph, node_filter_map); |
|
| 1598 |
filterNodes(const GR& graph, NF& node_filter) {
|
|
| 1599 |
return FilterNodes<const GR, NF>(graph, node_filter); |
|
| 1593 | 1600 |
} |
| ... | ... |
@@ -1596,4 +1603,4 @@ |
| 1596 | 1603 |
FilterNodes<const GR, const NF> |
| 1597 |
filterNodes(const GR& graph, const NF& node_filter_map) {
|
|
| 1598 |
return FilterNodes<const GR, const NF>(graph, node_filter_map); |
|
| 1604 |
filterNodes(const GR& graph, const NF& node_filter) {
|
|
| 1605 |
return FilterNodes<const GR, const NF>(graph, node_filter); |
|
| 1599 | 1606 |
} |
| ... | ... |
@@ -1614,3 +1621,3 @@ |
| 1614 | 1621 |
/// |
| 1615 |
/// \tparam |
|
| 1622 |
/// \tparam DGR The type of the adapted digraph. |
|
| 1616 | 1623 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -1620,3 +1627,3 @@ |
| 1620 | 1627 |
/// adapted digraph. The default type is |
| 1621 |
/// \ref concepts::Digraph::ArcMap " |
|
| 1628 |
/// \ref concepts::Digraph::ArcMap "DGR::ArcMap<bool>". |
|
| 1622 | 1629 |
/// |
| ... | ... |
@@ -1625,3 +1632,3 @@ |
| 1625 | 1632 |
#ifdef DOXYGEN |
| 1626 |
template<typename |
|
| 1633 |
template<typename DGR, |
|
| 1627 | 1634 |
typename AF> |
| ... | ... |
@@ -1629,11 +1636,17 @@ |
| 1629 | 1636 |
#else |
| 1630 |
template<typename GR, |
|
| 1631 |
typename AF = typename GR::template ArcMap<bool> > |
|
| 1637 |
template<typename DGR, |
|
| 1638 |
typename AF = typename DGR::template ArcMap<bool> > |
|
| 1632 | 1639 |
class FilterArcs : |
| 1633 | 1640 |
public DigraphAdaptorExtender< |
| 1634 |
SubDigraphBase< |
|
| 1641 |
SubDigraphBase<DGR, ConstMap<typename DGR::Node, Const<bool, true> >, |
|
| 1642 |
AF, false> > {
|
|
| 1635 | 1643 |
#endif |
| 1644 |
typedef DigraphAdaptorExtender< |
|
| 1645 |
SubDigraphBase<DGR, ConstMap<typename DGR::Node, Const<bool, true> >, |
|
| 1646 |
AF, false> > Parent; |
|
| 1647 |
|
|
| 1636 | 1648 |
public: |
| 1649 |
|
|
| 1637 | 1650 |
/// The type of the adapted digraph. |
| 1638 |
typedef |
|
| 1651 |
typedef DGR Digraph; |
|
| 1639 | 1652 |
/// The type of the arc filter map. |
| ... | ... |
@@ -1641,6 +1654,2 @@ |
| 1641 | 1654 |
|
| 1642 |
typedef DigraphAdaptorExtender< |
|
| 1643 |
SubDigraphBase<GR, ConstMap<typename GR::Node, bool>, AF, false> > |
|
| 1644 |
Parent; |
|
| 1645 |
|
|
| 1646 | 1655 |
typedef typename Parent::Arc Arc; |
| ... | ... |
@@ -1648,7 +1657,5 @@ |
| 1648 | 1657 |
protected: |
| 1649 |
ConstMap<typename Digraph::Node, bool> const_true_map; |
|
| 1650 |
|
|
| 1651 |
FilterArcs() : const_true_map(true) {
|
|
| 1652 |
Parent::setNodeFilterMap(const_true_map); |
|
| 1653 |
|
|
| 1658 |
ConstMap<typename DGR::Node, Const<bool, true> > const_true_map; |
|
| 1659 |
|
|
| 1660 |
FilterArcs() : const_true_map() {}
|
|
| 1654 | 1661 |
|
| ... | ... |
@@ -1660,7 +1667,5 @@ |
| 1660 | 1667 |
/// filter map. |
| 1661 |
FilterArcs(Digraph& digraph, ArcFilterMap& arc_filter) |
|
| 1662 |
: Parent(), const_true_map(true) {
|
|
| 1663 |
Parent::setDigraph(digraph); |
|
| 1664 |
Parent::setNodeFilterMap(const_true_map); |
|
| 1665 |
|
|
| 1668 |
FilterArcs(DGR& digraph, ArcFilterMap& arc_filter) |
|
| 1669 |
: Parent(), const_true_map() {
|
|
| 1670 |
Parent::initialize(digraph, const_true_map, arc_filter); |
|
| 1666 | 1671 |
} |
| ... | ... |
@@ -1700,12 +1705,12 @@ |
| 1700 | 1705 |
/// \relates FilterArcs |
| 1701 |
template<typename GR, typename AF> |
|
| 1702 |
FilterArcs<const GR, AF> |
|
| 1703 |
filterArcs(const GR& digraph, AF& arc_filter_map) {
|
|
| 1704 |
return FilterArcs<const GR, AF>(digraph, arc_filter_map); |
|
| 1706 |
template<typename DGR, typename AF> |
|
| 1707 |
FilterArcs<const DGR, AF> |
|
| 1708 |
filterArcs(const DGR& digraph, AF& arc_filter) {
|
|
| 1709 |
return FilterArcs<const DGR, AF>(digraph, arc_filter); |
|
| 1705 | 1710 |
} |
| 1706 | 1711 |
|
| 1707 |
template<typename GR, typename AF> |
|
| 1708 |
FilterArcs<const GR, const AF> |
|
| 1709 |
filterArcs(const GR& digraph, const AF& arc_filter_map) {
|
|
| 1710 |
return FilterArcs<const GR, const AF>(digraph, arc_filter_map); |
|
| 1712 |
template<typename DGR, typename AF> |
|
| 1713 |
FilterArcs<const DGR, const AF> |
|
| 1714 |
filterArcs(const DGR& digraph, const AF& arc_filter) {
|
|
| 1715 |
return FilterArcs<const DGR, const AF>(digraph, arc_filter); |
|
| 1711 | 1716 |
} |
| ... | ... |
@@ -1745,5 +1750,11 @@ |
| 1745 | 1750 |
public GraphAdaptorExtender< |
| 1746 |
SubGraphBase<GR, ConstMap<typename GR::Node,bool |
|
| 1751 |
SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true> >, |
|
| 1752 |
EF, false> > {
|
|
| 1747 | 1753 |
#endif |
| 1754 |
typedef GraphAdaptorExtender< |
|
| 1755 |
SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true > >, |
|
| 1756 |
EF, false> > Parent; |
|
| 1757 |
|
|
| 1748 | 1758 |
public: |
| 1759 |
|
|
| 1749 | 1760 |
/// The type of the adapted graph. |
| ... | ... |
@@ -1753,6 +1764,2 @@ |
| 1753 | 1764 |
|
| 1754 |
typedef GraphAdaptorExtender< |
|
| 1755 |
SubGraphBase<GR, ConstMap<typename GR::Node,bool>, EF, false> > |
|
| 1756 |
Parent; |
|
| 1757 |
|
|
| 1758 | 1765 |
typedef typename Parent::Edge Edge; |
| ... | ... |
@@ -1760,3 +1767,3 @@ |
| 1760 | 1767 |
protected: |
| 1761 |
ConstMap<typename |
|
| 1768 |
ConstMap<typename GR::Node, Const<bool, true> > const_true_map; |
|
| 1762 | 1769 |
|
| ... | ... |
@@ -1772,7 +1779,5 @@ |
| 1772 | 1779 |
/// filter map. |
| 1773 |
FilterEdges(Graph& graph, EdgeFilterMap& edge_filter_map) : |
|
| 1774 |
Parent(), const_true_map(true) {
|
|
| 1775 |
Parent::setGraph(graph); |
|
| 1776 |
Parent::setNodeFilterMap(const_true_map); |
|
| 1777 |
|
|
| 1780 |
FilterEdges(GR& graph, EF& edge_filter) |
|
| 1781 |
: Parent(), const_true_map() {
|
|
| 1782 |
Parent::initialize(graph, const_true_map, edge_filter); |
|
| 1778 | 1783 |
} |
| ... | ... |
@@ -1814,4 +1819,4 @@ |
| 1814 | 1819 |
FilterEdges<const GR, EF> |
| 1815 |
filterEdges(const GR& graph, EF& edge_filter_map) {
|
|
| 1816 |
return FilterEdges<const GR, EF>(graph, edge_filter_map); |
|
| 1820 |
filterEdges(const GR& graph, EF& edge_filter) {
|
|
| 1821 |
return FilterEdges<const GR, EF>(graph, edge_filter); |
|
| 1817 | 1822 |
} |
| ... | ... |
@@ -1820,4 +1825,4 @@ |
| 1820 | 1825 |
FilterEdges<const GR, const EF> |
| 1821 |
filterEdges(const GR& graph, const EF& edge_filter_map) {
|
|
| 1822 |
return FilterEdges<const GR, const EF>(graph, edge_filter_map); |
|
| 1826 |
filterEdges(const GR& graph, const EF& edge_filter) {
|
|
| 1827 |
return FilterEdges<const GR, const EF>(graph, edge_filter); |
|
| 1823 | 1828 |
} |
| ... | ... |
@@ -1825,6 +1830,6 @@ |
| 1825 | 1830 |
|
| 1826 |
template <typename |
|
| 1831 |
template <typename DGR> |
|
| 1827 | 1832 |
class UndirectorBase {
|
| 1828 | 1833 |
public: |
| 1829 |
typedef |
|
| 1834 |
typedef DGR Digraph; |
|
| 1830 | 1835 |
typedef UndirectorBase Adaptor; |
| ... | ... |
@@ -1836,9 +1841,10 @@ |
| 1836 | 1841 |
|
| 1837 |
class Arc |
|
| 1842 |
class Arc {
|
|
| 1838 | 1843 |
friend class UndirectorBase; |
| 1839 | 1844 |
protected: |
| 1845 |
Edge _edge; |
|
| 1840 | 1846 |
bool _forward; |
| 1841 | 1847 |
|
| 1842 |
Arc(const Edge& edge, bool forward) : |
|
| 1843 |
Edge(edge), _forward(forward) {}
|
|
| 1848 |
Arc(const Edge& edge, bool forward) |
|
| 1849 |
: _edge(edge), _forward(forward) {}
|
|
| 1844 | 1850 |
|
| ... | ... |
@@ -1847,11 +1853,11 @@ |
| 1847 | 1853 |
|
| 1848 |
Arc(Invalid) : |
|
| 1854 |
Arc(Invalid) : _edge(INVALID), _forward(true) {}
|
|
| 1855 |
|
|
| 1856 |
operator const Edge&() const { return _edge; }
|
|
| 1849 | 1857 |
|
| 1850 | 1858 |
bool operator==(const Arc &other) const {
|
| 1851 |
return _forward == other._forward && |
|
| 1852 |
static_cast<const Edge&>(*this) == static_cast<const Edge&>(other); |
|
| 1859 |
return _forward == other._forward && _edge == other._edge; |
|
| 1853 | 1860 |
} |
| 1854 | 1861 |
bool operator!=(const Arc &other) const {
|
| 1855 |
return _forward != other._forward || |
|
| 1856 |
static_cast<const Edge&>(*this) != static_cast<const Edge&>(other); |
|
| 1862 |
return _forward != other._forward || _edge != other._edge; |
|
| 1857 | 1863 |
} |
| ... | ... |
@@ -1859,4 +1865,3 @@ |
| 1859 | 1865 |
return _forward < other._forward || |
| 1860 |
(_forward == other._forward && |
|
| 1861 |
static_cast<const Edge&>(*this) < static_cast<const Edge&>(other)); |
|
| 1866 |
(_forward == other._forward && _edge < other._edge); |
|
| 1862 | 1867 |
} |
| ... | ... |
@@ -1873,3 +1878,3 @@ |
| 1873 | 1878 |
void first(Arc& a) const {
|
| 1874 |
_digraph->first(a); |
|
| 1879 |
_digraph->first(a._edge); |
|
| 1875 | 1880 |
a._forward = true; |
| ... | ... |
@@ -1881,3 +1886,3 @@ |
| 1881 | 1886 |
} else {
|
| 1882 |
_digraph->next(a); |
|
| 1887 |
_digraph->next(a._edge); |
|
| 1883 | 1888 |
a._forward = true; |
| ... | ... |
@@ -1895,7 +1900,7 @@ |
| 1895 | 1900 |
void firstOut(Arc& a, const Node& n) const {
|
| 1896 |
_digraph->firstIn(a, n); |
|
| 1897 |
if( static_cast<const Edge&>(a) != INVALID ) {
|
|
| 1901 |
_digraph->firstIn(a._edge, n); |
|
| 1902 |
if (a._edge != INVALID ) {
|
|
| 1898 | 1903 |
a._forward = false; |
| 1899 | 1904 |
} else {
|
| 1900 |
_digraph->firstOut(a, n); |
|
| 1905 |
_digraph->firstOut(a._edge, n); |
|
| 1901 | 1906 |
a._forward = true; |
| ... | ... |
@@ -1905,6 +1910,6 @@ |
| 1905 | 1910 |
if (!a._forward) {
|
| 1906 |
Node n = _digraph->target(a); |
|
| 1907 |
_digraph->nextIn(a); |
|
| 1908 |
if (static_cast<const Edge&>(a) == INVALID ) {
|
|
| 1909 |
_digraph->firstOut(a, n); |
|
| 1911 |
Node n = _digraph->target(a._edge); |
|
| 1912 |
_digraph->nextIn(a._edge); |
|
| 1913 |
if (a._edge == INVALID) {
|
|
| 1914 |
_digraph->firstOut(a._edge, n); |
|
| 1910 | 1915 |
a._forward = true; |
| ... | ... |
@@ -1913,3 +1918,3 @@ |
| 1913 | 1918 |
else {
|
| 1914 |
_digraph->nextOut(a); |
|
| 1919 |
_digraph->nextOut(a._edge); |
|
| 1915 | 1920 |
} |
| ... | ... |
@@ -1918,7 +1923,7 @@ |
| 1918 | 1923 |
void firstIn(Arc &a, const Node &n) const {
|
| 1919 |
_digraph->firstOut(a, n); |
|
| 1920 |
if (static_cast<const Edge&>(a) != INVALID ) {
|
|
| 1924 |
_digraph->firstOut(a._edge, n); |
|
| 1925 |
if (a._edge != INVALID ) {
|
|
| 1921 | 1926 |
a._forward = false; |
| 1922 | 1927 |
} else {
|
| 1923 |
_digraph->firstIn(a, n); |
|
| 1928 |
_digraph->firstIn(a._edge, n); |
|
| 1924 | 1929 |
a._forward = true; |
| ... | ... |
@@ -1928,6 +1933,6 @@ |
| 1928 | 1933 |
if (!a._forward) {
|
| 1929 |
Node n = _digraph->source(a); |
|
| 1930 |
_digraph->nextOut(a); |
|
| 1931 |
if( static_cast<const Edge&>(a) == INVALID ) {
|
|
| 1932 |
_digraph->firstIn(a, n); |
|
| 1934 |
Node n = _digraph->source(a._edge); |
|
| 1935 |
_digraph->nextOut(a._edge); |
|
| 1936 |
if (a._edge == INVALID ) {
|
|
| 1937 |
_digraph->firstIn(a._edge, n); |
|
| 1933 | 1938 |
a._forward = true; |
| ... | ... |
@@ -1936,3 +1941,3 @@ |
| 1936 | 1941 |
else {
|
| 1937 |
_digraph->nextIn(a); |
|
| 1942 |
_digraph->nextIn(a._edge); |
|
| 1938 | 1943 |
} |
| ... | ... |
@@ -1969,3 +1974,3 @@ |
| 1969 | 1974 |
Node source(const Arc &a) const {
|
| 1970 |
return a._forward ? _digraph->source(a) : _digraph->target(a); |
|
| 1975 |
return a._forward ? _digraph->source(a._edge) : _digraph->target(a._edge); |
|
| 1971 | 1976 |
} |
| ... | ... |
@@ -1973,3 +1978,3 @@ |
| 1973 | 1978 |
Node target(const Arc &a) const {
|
| 1974 |
return a._forward ? _digraph->target(a) : _digraph->source(a); |
|
| 1979 |
return a._forward ? _digraph->target(a._edge) : _digraph->source(a._edge); |
|
| 1975 | 1980 |
} |
| ... | ... |
@@ -1979,5 +1984,2 @@ |
| 1979 | 1984 |
} |
| 1980 |
Arc direct(const Edge &e, const Node& n) const {
|
|
| 1981 |
return Arc(e, _digraph->source(e) == n); |
|
| 1982 |
} |
|
| 1983 | 1985 |
|
| ... | ... |
@@ -2064,3 +2066,3 @@ |
| 2064 | 2066 |
|
| 2065 |
template <typename |
|
| 2067 |
template <typename V> |
|
| 2066 | 2068 |
class ArcMapBase {
|
| ... | ... |
@@ -2068,3 +2070,3 @@ |
| 2068 | 2070 |
|
| 2069 |
typedef typename |
|
| 2071 |
typedef typename DGR::template ArcMap<V> MapImpl; |
|
| 2070 | 2072 |
|
| ... | ... |
@@ -2074,3 +2076,3 @@ |
| 2074 | 2076 |
|
| 2075 |
typedef |
|
| 2077 |
typedef V Value; |
|
| 2076 | 2078 |
typedef Arc Key; |
| ... | ... |
@@ -2081,13 +2083,14 @@ |
| 2081 | 2083 |
|
| 2082 |
ArcMapBase(const |
|
| 2084 |
ArcMapBase(const UndirectorBase<DGR>& adaptor) : |
|
| 2083 | 2085 |
_forward(*adaptor._digraph), _backward(*adaptor._digraph) {}
|
| 2084 | 2086 |
|
| 2085 |
ArcMapBase(const Adaptor& adaptor, const Value& v) |
|
| 2086 |
: _forward(*adaptor._digraph, v), _backward(*adaptor._digraph, v) {}
|
|
| 2087 |
|
|
| 2088 |
void set(const Arc& a, const Value& v) {
|
|
| 2087 |
ArcMapBase(const UndirectorBase<DGR>& adaptor, const V& value) |
|
| 2088 |
: _forward(*adaptor._digraph, value), |
|
| 2089 |
_backward(*adaptor._digraph, value) {}
|
|
| 2090 |
|
|
| 2091 |
void set(const Arc& a, const V& value) {
|
|
| 2089 | 2092 |
if (direction(a)) {
|
| 2090 |
_forward.set(a, |
|
| 2093 |
_forward.set(a, value); |
|
| 2091 | 2094 |
} else {
|
| 2092 |
_backward.set(a, |
|
| 2095 |
_backward.set(a, value); |
|
| 2093 | 2096 |
} |
| ... | ... |
@@ -2119,13 +2122,13 @@ |
| 2119 | 2122 |
|
| 2120 |
template <typename _Value> |
|
| 2121 |
class NodeMap : public Digraph::template NodeMap<_Value> {
|
|
| 2123 |
template <typename V> |
|
| 2124 |
class NodeMap : public DGR::template NodeMap<V> {
|
|
| 2125 |
typedef typename DGR::template NodeMap<V> Parent; |
|
| 2126 |
|
|
| 2122 | 2127 |
public: |
| 2123 |
|
|
| 2124 |
typedef _Value Value; |
|
| 2125 |
typedef typename Digraph::template NodeMap<Value> Parent; |
|
| 2126 |
|
|
| 2127 |
|
|
| 2128 |
typedef V Value; |
|
| 2129 |
|
|
| 2130 |
explicit NodeMap(const UndirectorBase<DGR>& adaptor) |
|
| 2128 | 2131 |
: Parent(*adaptor._digraph) {}
|
| 2129 | 2132 |
|
| 2130 |
NodeMap(const |
|
| 2133 |
NodeMap(const UndirectorBase<DGR>& adaptor, const V& value) |
|
| 2131 | 2134 |
: Parent(*adaptor._digraph, value) { }
|
| ... | ... |
@@ -2145,14 +2148,14 @@ |
| 2145 | 2148 |
|
| 2146 |
template <typename |
|
| 2149 |
template <typename V> |
|
| 2147 | 2150 |
class ArcMap |
| 2148 |
: public SubMapExtender<Adaptor, ArcMapBase<_Value> > |
|
| 2149 |
{
|
|
| 2151 |
: public SubMapExtender<UndirectorBase<DGR>, ArcMapBase<V> > {
|
|
| 2152 |
typedef SubMapExtender<UndirectorBase<DGR>, ArcMapBase<V> > Parent; |
|
| 2153 |
|
|
| 2150 | 2154 |
public: |
| 2151 |
typedef _Value Value; |
|
| 2152 |
typedef SubMapExtender<Adaptor, ArcMapBase<Value> > Parent; |
|
| 2153 |
|
|
| 2154 |
explicit ArcMap(const Adaptor& adaptor) |
|
| 2155 |
typedef V Value; |
|
| 2156 |
|
|
| 2157 |
explicit ArcMap(const UndirectorBase<DGR>& adaptor) |
|
| 2155 | 2158 |
: Parent(adaptor) {}
|
| 2156 | 2159 |
|
| 2157 |
ArcMap(const |
|
| 2160 |
ArcMap(const UndirectorBase<DGR>& adaptor, const V& value) |
|
| 2158 | 2161 |
: Parent(adaptor, value) {}
|
| ... | ... |
@@ -2171,13 +2174,13 @@ |
| 2171 | 2174 |
|
| 2172 |
template <typename _Value> |
|
| 2173 |
class EdgeMap : public Digraph::template ArcMap<_Value> {
|
|
| 2175 |
template <typename V> |
|
| 2176 |
class EdgeMap : public Digraph::template ArcMap<V> {
|
|
| 2177 |
typedef typename Digraph::template ArcMap<V> Parent; |
|
| 2178 |
|
|
| 2174 | 2179 |
public: |
| 2175 |
|
|
| 2176 |
typedef _Value Value; |
|
| 2177 |
typedef typename Digraph::template ArcMap<Value> Parent; |
|
| 2178 |
|
|
| 2179 |
|
|
| 2180 |
typedef V Value; |
|
| 2181 |
|
|
| 2182 |
explicit EdgeMap(const UndirectorBase<DGR>& adaptor) |
|
| 2180 | 2183 |
: Parent(*adaptor._digraph) {}
|
| 2181 | 2184 |
|
| 2182 |
EdgeMap(const |
|
| 2185 |
EdgeMap(const UndirectorBase<DGR>& adaptor, const V& value) |
|
| 2183 | 2186 |
: Parent(*adaptor._digraph, value) {}
|
| ... | ... |
@@ -2197,7 +2200,10 @@ |
| 2197 | 2200 |
|
| 2198 |
typedef typename ItemSetTraits< |
|
| 2201 |
typedef typename ItemSetTraits<DGR, Node>::ItemNotifier NodeNotifier; |
|
| 2199 | 2202 |
NodeNotifier& notifier(Node) const { return _digraph->notifier(Node()); }
|
| 2200 | 2203 |
|
| 2201 |
typedef typename ItemSetTraits< |
|
| 2204 |
typedef typename ItemSetTraits<DGR, Edge>::ItemNotifier EdgeNotifier; |
|
| 2202 | 2205 |
EdgeNotifier& notifier(Edge) const { return _digraph->notifier(Edge()); }
|
| 2206 |
|
|
| 2207 |
typedef EdgeNotifier ArcNotifier; |
|
| 2208 |
ArcNotifier& notifier(Arc) const { return _digraph->notifier(Edge()); }
|
|
| 2203 | 2209 |
|
| ... | ... |
@@ -2207,5 +2213,5 @@ |
| 2207 | 2213 |
|
| 2208 |
Digraph* _digraph; |
|
| 2209 |
|
|
| 2210 |
|
|
| 2214 |
DGR* _digraph; |
|
| 2215 |
|
|
| 2216 |
void initialize(DGR& digraph) {
|
|
| 2211 | 2217 |
_digraph = &digraph; |
| ... | ... |
@@ -2228,3 +2234,3 @@ |
| 2228 | 2234 |
/// |
| 2229 |
/// \tparam |
|
| 2235 |
/// \tparam DGR The type of the adapted digraph. |
|
| 2230 | 2236 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -2238,3 +2244,3 @@ |
| 2238 | 2244 |
/// of the adapted digraph.) |
| 2239 |
template<typename |
|
| 2245 |
template<typename DGR> |
|
| 2240 | 2246 |
#ifdef DOXYGEN |
| ... | ... |
@@ -2243,8 +2249,8 @@ |
| 2243 | 2249 |
class Undirector : |
| 2244 |
public GraphAdaptorExtender<UndirectorBase< |
|
| 2250 |
public GraphAdaptorExtender<UndirectorBase<DGR> > {
|
|
| 2245 | 2251 |
#endif |
| 2252 |
typedef GraphAdaptorExtender<UndirectorBase<DGR> > Parent; |
|
| 2246 | 2253 |
public: |
| 2247 | 2254 |
/// The type of the adapted digraph. |
| 2248 |
typedef GR Digraph; |
|
| 2249 |
typedef GraphAdaptorExtender<UndirectorBase<GR> > Parent; |
|
| 2255 |
typedef DGR Digraph; |
|
| 2250 | 2256 |
protected: |
| ... | ... |
@@ -2256,4 +2262,4 @@ |
| 2256 | 2262 |
/// Creates an undirected graph from the given digraph. |
| 2257 |
Undirector(Digraph& digraph) {
|
|
| 2258 |
setDigraph(digraph); |
|
| 2263 |
Undirector(DGR& digraph) {
|
|
| 2264 |
initialize(digraph); |
|
| 2259 | 2265 |
} |
| ... | ... |
@@ -2264,5 +2270,6 @@ |
| 2264 | 2270 |
/// digraph to get an arc map of the undirected graph. |
| 2265 |
/// Its value type is inherited from the first arc map type |
|
| 2266 |
/// (\c %ForwardMap). |
|
| 2267 |
|
|
| 2271 |
/// Its value type is inherited from the first arc map type (\c FW). |
|
| 2272 |
/// \tparam FW The type of the "foward" arc map. |
|
| 2273 |
/// \tparam BK The type of the "backward" arc map. |
|
| 2274 |
template <typename FW, typename BK> |
|
| 2268 | 2275 |
class CombinedArcMap {
|
| ... | ... |
@@ -2273,13 +2280,13 @@ |
| 2273 | 2280 |
/// The value type of the map |
| 2274 |
typedef typename ForwardMap::Value Value; |
|
| 2275 |
|
|
| 2276 |
typedef typename MapTraits<ForwardMap>::ReferenceMapTag ReferenceMapTag; |
|
| 2277 |
|
|
| 2278 |
typedef typename MapTraits<ForwardMap>::ReturnValue ReturnValue; |
|
| 2279 |
typedef typename MapTraits<ForwardMap>::ConstReturnValue ConstReturnValue; |
|
| 2280 |
typedef typename MapTraits<ForwardMap>::ReturnValue Reference; |
|
| 2281 |
typedef typename MapTraits<ForwardMap>::ConstReturnValue ConstReference; |
|
| 2281 |
typedef typename FW::Value Value; |
|
| 2282 |
|
|
| 2283 |
typedef typename MapTraits<FW>::ReferenceMapTag ReferenceMapTag; |
|
| 2284 |
|
|
| 2285 |
typedef typename MapTraits<FW>::ReturnValue ReturnValue; |
|
| 2286 |
typedef typename MapTraits<FW>::ConstReturnValue ConstReturnValue; |
|
| 2287 |
typedef typename MapTraits<FW>::ReturnValue Reference; |
|
| 2288 |
typedef typename MapTraits<FW>::ConstReturnValue ConstReference; |
|
| 2282 | 2289 |
|
| 2283 | 2290 |
/// Constructor |
| 2284 |
CombinedArcMap( |
|
| 2291 |
CombinedArcMap(FW& forward, BK& backward) |
|
| 2285 | 2292 |
: _forward(&forward), _backward(&backward) {}
|
| ... | ... |
@@ -2315,4 +2322,4 @@ |
| 2315 | 2322 |
|
| 2316 |
ForwardMap* _forward; |
|
| 2317 |
BackwardMap* _backward; |
|
| 2323 |
FW* _forward; |
|
| 2324 |
BK* _backward; |
|
| 2318 | 2325 |
|
| ... | ... |
@@ -2323,27 +2330,24 @@ |
| 2323 | 2330 |
/// This function just returns a combined arc map. |
| 2324 |
template <typename ForwardMap, typename BackwardMap> |
|
| 2325 |
static CombinedArcMap<ForwardMap, BackwardMap> |
|
| 2326 |
combinedArcMap(ForwardMap& forward, BackwardMap& backward) {
|
|
| 2327 |
return CombinedArcMap<ForwardMap, BackwardMap>(forward, backward); |
|
| 2331 |
template <typename FW, typename BK> |
|
| 2332 |
static CombinedArcMap<FW, BK> |
|
| 2333 |
combinedArcMap(FW& forward, BK& backward) {
|
|
| 2334 |
return CombinedArcMap<FW, BK>(forward, backward); |
|
| 2328 | 2335 |
} |
| 2329 | 2336 |
|
| 2330 |
template <typename ForwardMap, typename BackwardMap> |
|
| 2331 |
static CombinedArcMap<const ForwardMap, BackwardMap> |
|
| 2332 |
combinedArcMap(const ForwardMap& forward, BackwardMap& backward) {
|
|
| 2333 |
return CombinedArcMap<const ForwardMap, |
|
| 2334 |
|
|
| 2337 |
template <typename FW, typename BK> |
|
| 2338 |
static CombinedArcMap<const FW, BK> |
|
| 2339 |
combinedArcMap(const FW& forward, BK& backward) {
|
|
| 2340 |
return CombinedArcMap<const FW, BK>(forward, backward); |
|
| 2335 | 2341 |
} |
| 2336 | 2342 |
|
| 2337 |
template <typename ForwardMap, typename BackwardMap> |
|
| 2338 |
static CombinedArcMap<ForwardMap, const BackwardMap> |
|
| 2339 |
combinedArcMap(ForwardMap& forward, const BackwardMap& backward) {
|
|
| 2340 |
return CombinedArcMap<ForwardMap, |
|
| 2341 |
|
|
| 2343 |
template <typename FW, typename BK> |
|
| 2344 |
static CombinedArcMap<FW, const BK> |
|
| 2345 |
combinedArcMap(FW& forward, const BK& backward) {
|
|
| 2346 |
return CombinedArcMap<FW, const BK>(forward, backward); |
|
| 2342 | 2347 |
} |
| 2343 | 2348 |
|
| 2344 |
template <typename ForwardMap, typename BackwardMap> |
|
| 2345 |
static CombinedArcMap<const ForwardMap, const BackwardMap> |
|
| 2346 |
combinedArcMap(const ForwardMap& forward, const BackwardMap& backward) {
|
|
| 2347 |
return CombinedArcMap<const ForwardMap, |
|
| 2348 |
|
|
| 2349 |
template <typename FW, typename BK> |
|
| 2350 |
static CombinedArcMap<const FW, const BK> |
|
| 2351 |
combinedArcMap(const FW& forward, const BK& backward) {
|
|
| 2352 |
return CombinedArcMap<const FW, const BK>(forward, backward); |
|
| 2349 | 2353 |
} |
| ... | ... |
@@ -2357,5 +2361,5 @@ |
| 2357 | 2361 |
/// \relates Undirector |
| 2358 |
template<typename GR> |
|
| 2359 |
Undirector<const GR> undirector(const GR& digraph) {
|
|
| 2360 |
|
|
| 2362 |
template<typename DGR> |
|
| 2363 |
Undirector<const DGR> undirector(const DGR& digraph) {
|
|
| 2364 |
return Undirector<const DGR>(digraph); |
|
| 2361 | 2365 |
} |
| ... | ... |
@@ -2363,3 +2367,3 @@ |
| 2363 | 2367 |
|
| 2364 |
template <typename |
|
| 2368 |
template <typename GR, typename DM> |
|
| 2365 | 2369 |
class OrienterBase {
|
| ... | ... |
@@ -2367,7 +2371,7 @@ |
| 2367 | 2371 |
|
| 2368 |
typedef _Graph Graph; |
|
| 2369 |
typedef _DirectionMap DirectionMap; |
|
| 2370 |
|
|
| 2371 |
typedef typename Graph::Node Node; |
|
| 2372 |
typedef |
|
| 2372 |
typedef GR Graph; |
|
| 2373 |
typedef DM DirectionMap; |
|
| 2374 |
|
|
| 2375 |
typedef typename GR::Node Node; |
|
| 2376 |
typedef typename GR::Edge Arc; |
|
| 2373 | 2377 |
|
| ... | ... |
@@ -2450,18 +2454,18 @@ |
| 2450 | 2454 |
|
| 2451 |
typedef typename ItemSetTraits< |
|
| 2455 |
typedef typename ItemSetTraits<GR, Node>::ItemNotifier NodeNotifier; |
|
| 2452 | 2456 |
NodeNotifier& notifier(Node) const { return _graph->notifier(Node()); }
|
| 2453 | 2457 |
|
| 2454 |
typedef typename ItemSetTraits< |
|
| 2458 |
typedef typename ItemSetTraits<GR, Arc>::ItemNotifier ArcNotifier; |
|
| 2455 | 2459 |
ArcNotifier& notifier(Arc) const { return _graph->notifier(Arc()); }
|
| 2456 | 2460 |
|
| 2457 |
template <typename _Value> |
|
| 2458 |
class NodeMap : public _Graph::template NodeMap<_Value> {
|
|
| 2461 |
template <typename V> |
|
| 2462 |
class NodeMap : public GR::template NodeMap<V> {
|
|
| 2463 |
typedef typename GR::template NodeMap<V> Parent; |
|
| 2464 |
|
|
| 2459 | 2465 |
public: |
| 2460 | 2466 |
|
| 2461 |
typedef typename _Graph::template NodeMap<_Value> Parent; |
|
| 2462 |
|
|
| 2463 |
explicit NodeMap(const OrienterBase& adapter) |
|
| 2467 |
explicit NodeMap(const OrienterBase<GR, DM>& adapter) |
|
| 2464 | 2468 |
: Parent(*adapter._graph) {}
|
| 2465 | 2469 |
|
| 2466 |
NodeMap(const OrienterBase& adapter, const |
|
| 2470 |
NodeMap(const OrienterBase<GR, DM>& adapter, const V& value) |
|
| 2467 | 2471 |
: Parent(*adapter._graph, value) {}
|
| ... | ... |
@@ -2481,12 +2485,12 @@ |
| 2481 | 2485 |
|
| 2482 |
template <typename _Value> |
|
| 2483 |
class ArcMap : public _Graph::template EdgeMap<_Value> {
|
|
| 2486 |
template <typename V> |
|
| 2487 |
class ArcMap : public GR::template EdgeMap<V> {
|
|
| 2488 |
typedef typename Graph::template EdgeMap<V> Parent; |
|
| 2489 |
|
|
| 2484 | 2490 |
public: |
| 2485 | 2491 |
|
| 2486 |
typedef typename Graph::template EdgeMap<_Value> Parent; |
|
| 2487 |
|
|
| 2488 |
explicit ArcMap(const OrienterBase& adapter) |
|
| 2492 |
explicit ArcMap(const OrienterBase<GR, DM>& adapter) |
|
| 2489 | 2493 |
: Parent(*adapter._graph) { }
|
| 2490 | 2494 |
|
| 2491 |
ArcMap(const OrienterBase& adapter, const |
|
| 2495 |
ArcMap(const OrienterBase<GR, DM>& adapter, const V& value) |
|
| 2492 | 2496 |
: Parent(*adapter._graph, value) { }
|
| ... | ... |
@@ -2509,5 +2513,6 @@ |
| 2509 | 2513 |
Graph* _graph; |
| 2510 |
DirectionMap* _direction; |
|
| 2511 |
|
|
| 2512 |
|
|
| 2514 |
DM* _direction; |
|
| 2515 |
|
|
| 2516 |
void initialize(GR& graph, DM& direction) {
|
|
| 2517 |
_graph = &graph; |
|
| 2513 | 2518 |
_direction = &direction; |
| ... | ... |
@@ -2515,6 +2520,2 @@ |
| 2515 | 2520 |
|
| 2516 |
void setGraph(Graph& graph) {
|
|
| 2517 |
_graph = &graph; |
|
| 2518 |
} |
|
| 2519 |
|
|
| 2520 | 2521 |
}; |
| ... | ... |
@@ -2558,2 +2559,3 @@ |
| 2558 | 2559 |
#endif |
| 2560 |
typedef DigraphAdaptorExtender<OrienterBase<GR, DM> > Parent; |
|
| 2559 | 2561 |
public: |
| ... | ... |
@@ -2565,6 +2567,7 @@ |
| 2565 | 2567 |
|
| 2566 |
typedef DigraphAdaptorExtender<OrienterBase<GR, DM> > Parent; |
|
| 2567 | 2568 |
typedef typename Parent::Arc Arc; |
| 2569 |
|
|
| 2568 | 2570 |
protected: |
| 2569 | 2571 |
Orienter() { }
|
| 2572 |
|
|
| 2570 | 2573 |
public: |
| ... | ... |
@@ -2574,5 +2577,4 @@ |
| 2574 | 2577 |
/// Constructor of the adaptor. |
| 2575 |
Orienter(Graph& graph, DirectionMap& direction) {
|
|
| 2576 |
setGraph(graph); |
|
| 2577 |
|
|
| 2578 |
Orienter(GR& graph, DM& direction) {
|
|
| 2579 |
Parent::initialize(graph, direction); |
|
| 2578 | 2580 |
} |
| ... | ... |
@@ -2596,4 +2598,4 @@ |
| 2596 | 2598 |
Orienter<const GR, DM> |
| 2597 |
orienter(const GR& graph, DM& direction_map) {
|
|
| 2598 |
return Orienter<const GR, DM>(graph, direction_map); |
|
| 2599 |
orienter(const GR& graph, DM& direction) {
|
|
| 2600 |
return Orienter<const GR, DM>(graph, direction); |
|
| 2599 | 2601 |
} |
| ... | ... |
@@ -2602,4 +2604,4 @@ |
| 2602 | 2604 |
Orienter<const GR, const DM> |
| 2603 |
orienter(const GR& graph, const DM& direction_map) {
|
|
| 2604 |
return Orienter<const GR, const DM>(graph, direction_map); |
|
| 2605 |
orienter(const GR& graph, const DM& direction) {
|
|
| 2606 |
return Orienter<const GR, const DM>(graph, direction); |
|
| 2605 | 2607 |
} |
| ... | ... |
@@ -2608,6 +2610,3 @@ |
| 2608 | 2610 |
|
| 2609 |
template<typename Digraph, |
|
| 2610 |
typename CapacityMap, |
|
| 2611 |
typename FlowMap, |
|
| 2612 |
typename Tolerance> |
|
| 2611 |
template <typename DGR, typename CM, typename FM, typename TL> |
|
| 2613 | 2612 |
class ResForwardFilter {
|
| ... | ... |
@@ -2615,3 +2614,3 @@ |
| 2615 | 2614 |
|
| 2616 |
typedef typename |
|
| 2615 |
typedef typename DGR::Arc Key; |
|
| 2617 | 2616 |
typedef bool Value; |
| ... | ... |
@@ -2620,12 +2619,13 @@ |
| 2620 | 2619 |
|
| 2621 |
const CapacityMap* _capacity; |
|
| 2622 |
const FlowMap* _flow; |
|
| 2623 |
|
|
| 2620 |
const CM* _capacity; |
|
| 2621 |
const FM* _flow; |
|
| 2622 |
TL _tolerance; |
|
| 2623 |
|
|
| 2624 | 2624 |
public: |
| 2625 | 2625 |
|
| 2626 |
ResForwardFilter(const CapacityMap& capacity, const FlowMap& flow, |
|
| 2627 |
const Tolerance& tolerance = Tolerance()) |
|
| 2626 |
ResForwardFilter(const CM& capacity, const FM& flow, |
|
| 2627 |
const TL& tolerance = TL()) |
|
| 2628 | 2628 |
: _capacity(&capacity), _flow(&flow), _tolerance(tolerance) { }
|
| 2629 | 2629 |
|
| 2630 |
bool operator[](const typename |
|
| 2630 |
bool operator[](const typename DGR::Arc& a) const {
|
|
| 2631 | 2631 |
return _tolerance.positive((*_capacity)[a] - (*_flow)[a]); |
| ... | ... |
@@ -2634,6 +2634,3 @@ |
| 2634 | 2634 |
|
| 2635 |
template<typename Digraph, |
|
| 2636 |
typename CapacityMap, |
|
| 2637 |
typename FlowMap, |
|
| 2638 |
typename Tolerance> |
|
| 2635 |
template<typename DGR,typename CM, typename FM, typename TL> |
|
| 2639 | 2636 |
class ResBackwardFilter {
|
| ... | ... |
@@ -2641,3 +2638,3 @@ |
| 2641 | 2638 |
|
| 2642 |
typedef typename |
|
| 2639 |
typedef typename DGR::Arc Key; |
|
| 2643 | 2640 |
typedef bool Value; |
| ... | ... |
@@ -2646,5 +2643,5 @@ |
| 2646 | 2643 |
|
| 2647 |
const CapacityMap* _capacity; |
|
| 2648 |
const FlowMap* _flow; |
|
| 2649 |
|
|
| 2644 |
const CM* _capacity; |
|
| 2645 |
const FM* _flow; |
|
| 2646 |
TL _tolerance; |
|
| 2650 | 2647 |
|
| ... | ... |
@@ -2652,7 +2649,7 @@ |
| 2652 | 2649 |
|
| 2653 |
ResBackwardFilter(const CapacityMap& capacity, const FlowMap& flow, |
|
| 2654 |
const Tolerance& tolerance = Tolerance()) |
|
| 2650 |
ResBackwardFilter(const CM& capacity, const FM& flow, |
|
| 2651 |
const TL& tolerance = TL()) |
|
| 2655 | 2652 |
: _capacity(&capacity), _flow(&flow), _tolerance(tolerance) { }
|
| 2656 | 2653 |
|
| 2657 |
bool operator[](const typename |
|
| 2654 |
bool operator[](const typename DGR::Arc& a) const {
|
|
| 2658 | 2655 |
return _tolerance.positive((*_flow)[a]); |
| ... | ... |
@@ -2683,3 +2680,3 @@ |
| 2683 | 2680 |
/// |
| 2684 |
/// \tparam |
|
| 2681 |
/// \tparam DGR The type of the adapted digraph. |
|
| 2685 | 2682 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -2705,15 +2702,16 @@ |
| 2705 | 2702 |
#ifdef DOXYGEN |
| 2706 |
template<typename |
|
| 2703 |
template<typename DGR, typename CM, typename FM, typename TL> |
|
| 2707 | 2704 |
class ResidualDigraph |
| 2708 | 2705 |
#else |
| 2709 |
template<typename GR, |
|
| 2710 |
typename CM = typename GR::template ArcMap<int>, |
|
| 2706 |
template<typename DGR, |
|
| 2707 |
typename CM = typename DGR::template ArcMap<int>, |
|
| 2711 | 2708 |
typename FM = CM, |
| 2712 | 2709 |
typename TL = Tolerance<typename CM::Value> > |
| 2713 |
class ResidualDigraph : |
|
| 2714 |
public FilterArcs< |
|
| 2715 |
Undirector<const GR>, |
|
| 2716 |
typename Undirector<const GR>::template CombinedArcMap< |
|
| 2717 |
_adaptor_bits::ResForwardFilter<const GR, CM, FM, TL>, |
|
| 2718 |
_adaptor_bits::ResBackwardFilter<const GR, CM, FM, TL> > > |
|
| 2710 |
class ResidualDigraph |
|
| 2711 |
: public SubDigraph< |
|
| 2712 |
Undirector<const DGR>, |
|
| 2713 |
ConstMap<typename DGR::Node, Const<bool, true> >, |
|
| 2714 |
typename Undirector<const DGR>::template CombinedArcMap< |
|
| 2715 |
_adaptor_bits::ResForwardFilter<const DGR, CM, FM, TL>, |
|
| 2716 |
_adaptor_bits::ResBackwardFilter<const DGR, CM, FM, TL> > > |
|
| 2719 | 2717 |
#endif |
| ... | ... |
@@ -2723,3 +2721,3 @@ |
| 2723 | 2721 |
/// The type of the underlying digraph. |
| 2724 |
typedef |
|
| 2722 |
typedef DGR Digraph; |
|
| 2725 | 2723 |
/// The type of the capacity map. |
| ... | ... |
@@ -2738,7 +2736,9 @@ |
| 2738 | 2736 |
|
| 2739 |
typedef _adaptor_bits::ResForwardFilter<const Digraph, CapacityMap, |
|
| 2740 |
FlowMap, Tolerance> ForwardFilter; |
|
| 2741 |
|
|
| 2742 |
typedef _adaptor_bits::ResBackwardFilter<const Digraph, CapacityMap, |
|
| 2743 |
|
|
| 2737 |
typedef ConstMap<typename DGR::Node, Const<bool, true> > NodeFilter; |
|
| 2738 |
|
|
| 2739 |
typedef _adaptor_bits::ResForwardFilter<const DGR, CM, |
|
| 2740 |
FM, TL> ForwardFilter; |
|
| 2741 |
|
|
| 2742 |
typedef _adaptor_bits::ResBackwardFilter<const DGR, CM, |
|
| 2743 |
FM, TL> BackwardFilter; |
|
| 2744 | 2744 |
|
| ... | ... |
@@ -2747,3 +2747,3 @@ |
| 2747 | 2747 |
|
| 2748 |
typedef |
|
| 2748 |
typedef SubDigraph<Undirected, NodeFilter, ArcFilter> Parent; |
|
| 2749 | 2749 |
|
| ... | ... |
@@ -2753,2 +2753,3 @@ |
| 2753 | 2753 |
Undirected _graph; |
| 2754 |
NodeFilter _node_filter; |
|
| 2754 | 2755 |
ForwardFilter _forward_filter; |
| ... | ... |
@@ -2763,5 +2764,6 @@ |
| 2763 | 2764 |
/// digraph, the capacity map, the flow map, and a tolerance object. |
| 2764 |
ResidualDigraph(const Digraph& digraph, const CapacityMap& capacity, |
|
| 2765 |
FlowMap& flow, const Tolerance& tolerance = Tolerance()) |
|
| 2766 |
|
|
| 2765 |
ResidualDigraph(const DGR& digraph, const CM& capacity, |
|
| 2766 |
FM& flow, const TL& tolerance = Tolerance()) |
|
| 2767 |
: Parent(), _capacity(&capacity), _flow(&flow), |
|
| 2768 |
_graph(digraph), _node_filter(), |
|
| 2767 | 2769 |
_forward_filter(capacity, flow, tolerance), |
| ... | ... |
@@ -2770,4 +2772,3 @@ |
| 2770 | 2772 |
{
|
| 2771 |
Parent::setDigraph(_graph); |
|
| 2772 |
Parent::setArcFilterMap(_arc_filter); |
|
| 2773 |
Parent::initialize(_graph, _node_filter, _arc_filter); |
|
| 2773 | 2774 |
} |
| ... | ... |
@@ -2847,3 +2848,4 @@ |
| 2847 | 2848 |
/// Constructor |
| 2848 |
ResidualCapacity(const |
|
| 2849 |
ResidualCapacity(const ResidualDigraph<DGR, CM, FM, TL>& adaptor) |
|
| 2850 |
: _adaptor(&adaptor) {}
|
|
| 2849 | 2851 |
|
| ... | ... |
@@ -2867,9 +2869,9 @@ |
| 2867 | 2869 |
/// |
| 2868 |
/// This function just returns a (read-only) \ref |
|
| 2870 |
/// This function just returns a (read-only) \ref ResidualDigraph adaptor. |
|
| 2869 | 2871 |
/// \ingroup graph_adaptors |
| 2870 |
/// \relates Residual |
|
| 2871 |
template<typename GR, typename CM, typename FM> |
|
| 2872 |
ResidualDigraph<GR, CM, FM> |
|
| 2873 |
residualDigraph(const GR& digraph, const CM& capacity_map, FM& flow_map) {
|
|
| 2874 |
|
|
| 2872 |
/// \relates ResidualDigraph |
|
| 2873 |
template<typename DGR, typename CM, typename FM> |
|
| 2874 |
ResidualDigraph<DGR, CM, FM> |
|
| 2875 |
residualDigraph(const DGR& digraph, const CM& capacity_map, FM& flow_map) {
|
|
| 2876 |
return ResidualDigraph<DGR, CM, FM> (digraph, capacity_map, flow_map); |
|
| 2875 | 2877 |
} |
| ... | ... |
@@ -2877,12 +2879,13 @@ |
| 2877 | 2879 |
|
| 2878 |
template <typename |
|
| 2880 |
template <typename DGR> |
|
| 2879 | 2881 |
class SplitNodesBase {
|
| 2882 |
typedef DigraphAdaptorBase<const DGR> Parent; |
|
| 2883 |
|
|
| 2880 | 2884 |
public: |
| 2881 | 2885 |
|
| 2882 |
typedef _Digraph Digraph; |
|
| 2883 |
typedef DigraphAdaptorBase<const _Digraph> Parent; |
|
| 2886 |
typedef DGR Digraph; |
|
| 2884 | 2887 |
typedef SplitNodesBase Adaptor; |
| 2885 | 2888 |
|
| 2886 |
typedef typename Digraph::Node DigraphNode; |
|
| 2887 |
typedef typename Digraph::Arc DigraphArc; |
|
| 2889 |
typedef typename DGR::Node DigraphNode; |
|
| 2890 |
typedef typename DGR::Arc DigraphArc; |
|
| 2888 | 2891 |
|
| ... | ... |
@@ -3150,9 +3153,9 @@ |
| 3150 | 3153 |
|
| 3151 |
template <typename |
|
| 3154 |
template <typename V> |
|
| 3152 | 3155 |
class NodeMapBase |
| 3153 |
: public MapTraits<typename Parent::template NodeMap<_Value> > {
|
|
| 3154 |
typedef typename Parent::template NodeMap<_Value> NodeImpl; |
|
| 3156 |
: public MapTraits<typename Parent::template NodeMap<V> > {
|
|
| 3157 |
typedef typename Parent::template NodeMap<V> NodeImpl; |
|
| 3155 | 3158 |
public: |
| 3156 | 3159 |
typedef Node Key; |
| 3157 |
typedef |
|
| 3160 |
typedef V Value; |
|
| 3158 | 3161 |
typedef typename MapTraits<NodeImpl>::ReferenceMapTag ReferenceMapTag; |
| ... | ... |
@@ -3163,5 +3166,5 @@ |
| 3163 | 3166 |
|
| 3164 |
NodeMapBase(const |
|
| 3167 |
NodeMapBase(const SplitNodesBase<DGR>& adaptor) |
|
| 3165 | 3168 |
: _in_map(*adaptor._digraph), _out_map(*adaptor._digraph) {}
|
| 3166 |
NodeMapBase(const |
|
| 3169 |
NodeMapBase(const SplitNodesBase<DGR>& adaptor, const V& value) |
|
| 3167 | 3170 |
: _in_map(*adaptor._digraph, value), |
| ... | ... |
@@ -3169,4 +3172,4 @@ |
| 3169 | 3172 |
|
| 3170 |
void set(const Node& key, const Value& val) {
|
|
| 3171 |
if (Adaptor::inNode(key)) { _in_map.set(key, val); }
|
|
| 3173 |
void set(const Node& key, const V& val) {
|
|
| 3174 |
if (SplitNodesBase<DGR>::inNode(key)) { _in_map.set(key, val); }
|
|
| 3172 | 3175 |
else {_out_map.set(key, val); }
|
| ... | ... |
@@ -3175,3 +3178,3 @@ |
| 3175 | 3178 |
ReturnValue operator[](const Node& key) {
|
| 3176 |
if ( |
|
| 3179 |
if (SplitNodesBase<DGR>::inNode(key)) { return _in_map[key]; }
|
|
| 3177 | 3180 |
else { return _out_map[key]; }
|
| ... | ... |
@@ -3188,10 +3191,10 @@ |
| 3188 | 3191 |
|
| 3189 |
template <typename |
|
| 3192 |
template <typename V> |
|
| 3190 | 3193 |
class ArcMapBase |
| 3191 |
: public MapTraits<typename Parent::template ArcMap<_Value> > {
|
|
| 3192 |
typedef typename Parent::template ArcMap<_Value> ArcImpl; |
|
| 3193 |
|
|
| 3194 |
: public MapTraits<typename Parent::template ArcMap<V> > {
|
|
| 3195 |
typedef typename Parent::template ArcMap<V> ArcImpl; |
|
| 3196 |
typedef typename Parent::template NodeMap<V> NodeImpl; |
|
| 3194 | 3197 |
public: |
| 3195 | 3198 |
typedef Arc Key; |
| 3196 |
typedef |
|
| 3199 |
typedef V Value; |
|
| 3197 | 3200 |
typedef typename MapTraits<ArcImpl>::ReferenceMapTag ReferenceMapTag; |
| ... | ... |
@@ -3202,5 +3205,5 @@ |
| 3202 | 3205 |
|
| 3203 |
ArcMapBase(const |
|
| 3206 |
ArcMapBase(const SplitNodesBase<DGR>& adaptor) |
|
| 3204 | 3207 |
: _arc_map(*adaptor._digraph), _node_map(*adaptor._digraph) {}
|
| 3205 |
ArcMapBase(const |
|
| 3208 |
ArcMapBase(const SplitNodesBase<DGR>& adaptor, const V& value) |
|
| 3206 | 3209 |
: _arc_map(*adaptor._digraph, value), |
| ... | ... |
@@ -3208,7 +3211,7 @@ |
| 3208 | 3211 |
|
| 3209 |
void set(const Arc& key, const Value& val) {
|
|
| 3210 |
if (Adaptor::origArc(key)) {
|
|
| 3211 |
|
|
| 3212 |
void set(const Arc& key, const V& val) {
|
|
| 3213 |
if (SplitNodesBase<DGR>::origArc(key)) {
|
|
| 3214 |
_arc_map.set(static_cast<const DigraphArc&>(key), val); |
|
| 3212 | 3215 |
} else {
|
| 3213 |
_node_map.set( |
|
| 3216 |
_node_map.set(static_cast<const DigraphNode&>(key), val); |
|
| 3214 | 3217 |
} |
| ... | ... |
@@ -3217,6 +3220,6 @@ |
| 3217 | 3220 |
ReturnValue operator[](const Arc& key) {
|
| 3218 |
if (Adaptor::origArc(key)) {
|
|
| 3219 |
return _arc_map[key._item.first()]; |
|
| 3221 |
if (SplitNodesBase<DGR>::origArc(key)) {
|
|
| 3222 |
return _arc_map[static_cast<const DigraphArc&>(key)]; |
|
| 3220 | 3223 |
} else {
|
| 3221 |
return _node_map[ |
|
| 3224 |
return _node_map[static_cast<const DigraphNode&>(key)]; |
|
| 3222 | 3225 |
} |
| ... | ... |
@@ -3225,6 +3228,6 @@ |
| 3225 | 3228 |
ConstReturnValue operator[](const Arc& key) const {
|
| 3226 |
if (Adaptor::origArc(key)) {
|
|
| 3227 |
return _arc_map[key._item.first()]; |
|
| 3229 |
if (SplitNodesBase<DGR>::origArc(key)) {
|
|
| 3230 |
return _arc_map[static_cast<const DigraphArc&>(key)]; |
|
| 3228 | 3231 |
} else {
|
| 3229 |
return _node_map[ |
|
| 3232 |
return _node_map[static_cast<const DigraphNode&>(key)]; |
|
| 3230 | 3233 |
} |
| ... | ... |
@@ -3239,14 +3242,14 @@ |
| 3239 | 3242 |
|
| 3240 |
template <typename |
|
| 3243 |
template <typename V> |
|
| 3241 | 3244 |
class NodeMap |
| 3242 |
: public SubMapExtender<Adaptor, NodeMapBase<_Value> > |
|
| 3243 |
{
|
|
| 3245 |
: public SubMapExtender<SplitNodesBase<DGR>, NodeMapBase<V> > {
|
|
| 3246 |
typedef SubMapExtender<SplitNodesBase<DGR>, NodeMapBase<V> > Parent; |
|
| 3247 |
|
|
| 3244 | 3248 |
public: |
| 3245 |
typedef _Value Value; |
|
| 3246 |
typedef SubMapExtender<Adaptor, NodeMapBase<Value> > Parent; |
|
| 3247 |
|
|
| 3248 |
NodeMap(const Adaptor& adaptor) |
|
| 3249 |
typedef V Value; |
|
| 3250 |
|
|
| 3251 |
NodeMap(const SplitNodesBase<DGR>& adaptor) |
|
| 3249 | 3252 |
: Parent(adaptor) {}
|
| 3250 | 3253 |
|
| 3251 |
NodeMap(const |
|
| 3254 |
NodeMap(const SplitNodesBase<DGR>& adaptor, const V& value) |
|
| 3252 | 3255 |
: Parent(adaptor, value) {}
|
| ... | ... |
@@ -3265,14 +3268,14 @@ |
| 3265 | 3268 |
|
| 3266 |
template <typename |
|
| 3269 |
template <typename V> |
|
| 3267 | 3270 |
class ArcMap |
| 3268 |
: public SubMapExtender<Adaptor, ArcMapBase<_Value> > |
|
| 3269 |
{
|
|
| 3271 |
: public SubMapExtender<SplitNodesBase<DGR>, ArcMapBase<V> > {
|
|
| 3272 |
typedef SubMapExtender<SplitNodesBase<DGR>, ArcMapBase<V> > Parent; |
|
| 3273 |
|
|
| 3270 | 3274 |
public: |
| 3271 |
typedef _Value Value; |
|
| 3272 |
typedef SubMapExtender<Adaptor, ArcMapBase<Value> > Parent; |
|
| 3273 |
|
|
| 3274 |
ArcMap(const Adaptor& adaptor) |
|
| 3275 |
typedef V Value; |
|
| 3276 |
|
|
| 3277 |
ArcMap(const SplitNodesBase<DGR>& adaptor) |
|
| 3275 | 3278 |
: Parent(adaptor) {}
|
| 3276 | 3279 |
|
| 3277 |
ArcMap(const |
|
| 3280 |
ArcMap(const SplitNodesBase<DGR>& adaptor, const V& value) |
|
| 3278 | 3281 |
: Parent(adaptor, value) {}
|
| ... | ... |
@@ -3295,5 +3298,5 @@ |
| 3295 | 3298 |
|
| 3296 |
Digraph* _digraph; |
|
| 3297 |
|
|
| 3298 |
|
|
| 3299 |
DGR* _digraph; |
|
| 3300 |
|
|
| 3301 |
void initialize(Digraph& digraph) {
|
|
| 3299 | 3302 |
_digraph = &digraph; |
| ... | ... |
@@ -3324,3 +3327,3 @@ |
| 3324 | 3327 |
/// |
| 3325 |
/// \tparam |
|
| 3328 |
/// \tparam DGR The type of the adapted digraph. |
|
| 3326 | 3329 |
/// It must conform to the \ref concepts::Digraph "Digraph" concept. |
| ... | ... |
@@ -3330,3 +3333,3 @@ |
| 3330 | 3333 |
/// type of the adapted digraph. |
| 3331 |
template <typename |
|
| 3334 |
template <typename DGR> |
|
| 3332 | 3335 |
#ifdef DOXYGEN |
| ... | ... |
@@ -3335,10 +3338,11 @@ |
| 3335 | 3338 |
class SplitNodes |
| 3336 |
: public DigraphAdaptorExtender<SplitNodesBase<const |
|
| 3339 |
: public DigraphAdaptorExtender<SplitNodesBase<const DGR> > {
|
|
| 3337 | 3340 |
#endif |
| 3341 |
typedef DigraphAdaptorExtender<SplitNodesBase<const DGR> > Parent; |
|
| 3342 |
|
|
| 3338 | 3343 |
public: |
| 3339 |
typedef GR Digraph; |
|
| 3340 |
typedef DigraphAdaptorExtender<SplitNodesBase<const GR> > Parent; |
|
| 3341 |
|
|
| 3342 |
typedef typename Digraph::Node DigraphNode; |
|
| 3343 |
typedef |
|
| 3344 |
typedef DGR Digraph; |
|
| 3345 |
|
|
| 3346 |
typedef typename DGR::Node DigraphNode; |
|
| 3347 |
typedef typename DGR::Arc DigraphArc; |
|
| 3344 | 3348 |
|
| ... | ... |
@@ -3350,4 +3354,4 @@ |
| 3350 | 3354 |
/// Constructor of the adaptor. |
| 3351 |
SplitNodes(const Digraph& g) {
|
|
| 3352 |
Parent::setDigraph(g); |
|
| 3355 |
SplitNodes(const DGR& g) {
|
|
| 3356 |
Parent::initialize(g); |
|
| 3353 | 3357 |
} |
| ... | ... |
@@ -3420,5 +3424,6 @@ |
| 3420 | 3424 |
/// to get a node map of the split digraph. |
| 3421 |
/// Its value type is inherited from the first node map type |
|
| 3422 |
/// (\c InNodeMap). |
|
| 3423 |
|
|
| 3425 |
/// Its value type is inherited from the first node map type (\c IN). |
|
| 3426 |
/// \tparam IN The type of the node map for the in-nodes. |
|
| 3427 |
/// \tparam OUT The type of the node map for the out-nodes. |
|
| 3428 |
template <typename IN, typename OUT> |
|
| 3424 | 3429 |
class CombinedNodeMap {
|
| ... | ... |
@@ -3429,12 +3434,12 @@ |
| 3429 | 3434 |
/// The value type of the map |
| 3430 |
typedef typename InNodeMap::Value Value; |
|
| 3431 |
|
|
| 3432 |
typedef typename MapTraits<InNodeMap>::ReferenceMapTag ReferenceMapTag; |
|
| 3433 |
typedef typename MapTraits<InNodeMap>::ReturnValue ReturnValue; |
|
| 3434 |
typedef typename MapTraits<InNodeMap>::ConstReturnValue ConstReturnValue; |
|
| 3435 |
typedef typename MapTraits<InNodeMap>::ReturnValue Reference; |
|
| 3436 |
typedef typename |
|
| 3435 |
typedef typename IN::Value Value; |
|
| 3436 |
|
|
| 3437 |
typedef typename MapTraits<IN>::ReferenceMapTag ReferenceMapTag; |
|
| 3438 |
typedef typename MapTraits<IN>::ReturnValue ReturnValue; |
|
| 3439 |
typedef typename MapTraits<IN>::ConstReturnValue ConstReturnValue; |
|
| 3440 |
typedef typename MapTraits<IN>::ReturnValue Reference; |
|
| 3441 |
typedef typename MapTraits<IN>::ConstReturnValue ConstReference; |
|
| 3437 | 3442 |
|
| 3438 | 3443 |
/// Constructor |
| 3439 |
CombinedNodeMap( |
|
| 3444 |
CombinedNodeMap(IN& in_map, OUT& out_map) |
|
| 3440 | 3445 |
: _in_map(in_map), _out_map(out_map) {}
|
| ... | ... |
@@ -3443,3 +3448,3 @@ |
| 3443 | 3448 |
Value operator[](const Key& key) const {
|
| 3444 |
if ( |
|
| 3449 |
if (SplitNodesBase<const DGR>::inNode(key)) {
|
|
| 3445 | 3450 |
return _in_map[key]; |
| ... | ... |
@@ -3452,3 +3457,3 @@ |
| 3452 | 3457 |
Value& operator[](const Key& key) {
|
| 3453 |
if ( |
|
| 3458 |
if (SplitNodesBase<const DGR>::inNode(key)) {
|
|
| 3454 | 3459 |
return _in_map[key]; |
| ... | ... |
@@ -3461,3 +3466,3 @@ |
| 3461 | 3466 |
void set(const Key& key, const Value& value) {
|
| 3462 |
if ( |
|
| 3467 |
if (SplitNodesBase<const DGR>::inNode(key)) {
|
|
| 3463 | 3468 |
_in_map.set(key, value); |
| ... | ... |
@@ -3470,4 +3475,4 @@ |
| 3470 | 3475 |
|
| 3471 |
InNodeMap& _in_map; |
|
| 3472 |
OutNodeMap& _out_map; |
|
| 3476 |
IN& _in_map; |
|
| 3477 |
OUT& _out_map; |
|
| 3473 | 3478 |
|
| ... | ... |
@@ -3479,25 +3484,24 @@ |
| 3479 | 3484 |
/// This function just returns a combined node map. |
| 3480 |
template <typename InNodeMap, typename OutNodeMap> |
|
| 3481 |
static CombinedNodeMap<InNodeMap, OutNodeMap> |
|
| 3482 |
combinedNodeMap(InNodeMap& in_map, OutNodeMap& out_map) {
|
|
| 3483 |
return CombinedNodeMap<InNodeMap, OutNodeMap>(in_map, out_map); |
|
| 3485 |
template <typename IN, typename OUT> |
|
| 3486 |
static CombinedNodeMap<IN, OUT> |
|
| 3487 |
combinedNodeMap(IN& in_map, OUT& out_map) {
|
|
| 3488 |
return CombinedNodeMap<IN, OUT>(in_map, out_map); |
|
| 3484 | 3489 |
} |
| 3485 | 3490 |
|
| 3486 |
template <typename InNodeMap, typename OutNodeMap> |
|
| 3487 |
static CombinedNodeMap<const InNodeMap, OutNodeMap> |
|
| 3488 |
combinedNodeMap(const InNodeMap& in_map, OutNodeMap& out_map) {
|
|
| 3489 |
return CombinedNodeMap<const InNodeMap, OutNodeMap>(in_map, out_map); |
|
| 3491 |
template <typename IN, typename OUT> |
|
| 3492 |
static CombinedNodeMap<const IN, OUT> |
|
| 3493 |
combinedNodeMap(const IN& in_map, OUT& out_map) {
|
|
| 3494 |
return CombinedNodeMap<const IN, OUT>(in_map, out_map); |
|
| 3490 | 3495 |
} |
| 3491 | 3496 |
|
| 3492 |
template <typename InNodeMap, typename OutNodeMap> |
|
| 3493 |
static CombinedNodeMap<InNodeMap, const OutNodeMap> |
|
| 3494 |
combinedNodeMap(InNodeMap& in_map, const OutNodeMap& out_map) {
|
|
| 3495 |
return CombinedNodeMap<InNodeMap, const OutNodeMap>(in_map, out_map); |
|
| 3497 |
template <typename IN, typename OUT> |
|
| 3498 |
static CombinedNodeMap<IN, const OUT> |
|
| 3499 |
combinedNodeMap(IN& in_map, const OUT& out_map) {
|
|
| 3500 |
return CombinedNodeMap<IN, const OUT>(in_map, out_map); |
|
| 3496 | 3501 |
} |
| 3497 | 3502 |
|
| 3498 |
template <typename InNodeMap, typename OutNodeMap> |
|
| 3499 |
static CombinedNodeMap<const InNodeMap, const OutNodeMap> |
|
| 3500 |
combinedNodeMap(const InNodeMap& in_map, const OutNodeMap& out_map) {
|
|
| 3501 |
return CombinedNodeMap<const InNodeMap, |
|
| 3502 |
|
|
| 3503 |
template <typename IN, typename OUT> |
|
| 3504 |
static CombinedNodeMap<const IN, const OUT> |
|
| 3505 |
combinedNodeMap(const IN& in_map, const OUT& out_map) {
|
|
| 3506 |
return CombinedNodeMap<const IN, const OUT>(in_map, out_map); |
|
| 3503 | 3507 |
} |
| ... | ... |
@@ -3509,5 +3513,6 @@ |
| 3509 | 3513 |
/// original digraph to get an arc map of the split digraph. |
| 3510 |
/// Its value type is inherited from the original arc map type |
|
| 3511 |
/// (\c ArcMap). |
|
| 3512 |
|
|
| 3514 |
/// Its value type is inherited from the original arc map type (\c AM). |
|
| 3515 |
/// \tparam AM The type of the arc map. |
|
| 3516 |
/// \tparam NM the type of the node map. |
|
| 3517 |
template <typename AM, typename NM> |
|
| 3513 | 3518 |
class CombinedArcMap {
|
| ... | ... |
@@ -3518,12 +3523,12 @@ |
| 3518 | 3523 |
/// The value type of the map |
| 3519 |
typedef typename ArcMap::Value Value; |
|
| 3520 |
|
|
| 3521 |
typedef typename MapTraits<ArcMap>::ReferenceMapTag ReferenceMapTag; |
|
| 3522 |
typedef typename MapTraits<ArcMap>::ReturnValue ReturnValue; |
|
| 3523 |
typedef typename MapTraits<ArcMap>::ConstReturnValue ConstReturnValue; |
|
| 3524 |
typedef typename MapTraits<ArcMap>::ReturnValue Reference; |
|
| 3525 |
typedef typename |
|
| 3524 |
typedef typename AM::Value Value; |
|
| 3525 |
|
|
| 3526 |
typedef typename MapTraits<AM>::ReferenceMapTag ReferenceMapTag; |
|
| 3527 |
typedef typename MapTraits<AM>::ReturnValue ReturnValue; |
|
| 3528 |
typedef typename MapTraits<AM>::ConstReturnValue ConstReturnValue; |
|
| 3529 |
typedef typename MapTraits<AM>::ReturnValue Reference; |
|
| 3530 |
typedef typename MapTraits<AM>::ConstReturnValue ConstReference; |
|
| 3526 | 3531 |
|
| 3527 | 3532 |
/// Constructor |
| 3528 |
CombinedArcMap( |
|
| 3533 |
CombinedArcMap(AM& arc_map, NM& node_map) |
|
| 3529 | 3534 |
: _arc_map(arc_map), _node_map(node_map) {}
|
| ... | ... |
@@ -3532,3 +3537,3 @@ |
| 3532 | 3537 |
Value operator[](const Key& arc) const {
|
| 3533 |
if ( |
|
| 3538 |
if (SplitNodesBase<const DGR>::origArc(arc)) {
|
|
| 3534 | 3539 |
return _arc_map[arc]; |
| ... | ... |
@@ -3541,3 +3546,3 @@ |
| 3541 | 3546 |
Value& operator[](const Key& arc) {
|
| 3542 |
if ( |
|
| 3547 |
if (SplitNodesBase<const DGR>::origArc(arc)) {
|
|
| 3543 | 3548 |
return _arc_map[arc]; |
| ... | ... |
@@ -3550,3 +3555,3 @@ |
| 3550 | 3555 |
void set(const Arc& arc, const Value& val) {
|
| 3551 |
if ( |
|
| 3556 |
if (SplitNodesBase<const DGR>::origArc(arc)) {
|
|
| 3552 | 3557 |
_arc_map.set(arc, val); |
| ... | ... |
@@ -3558,4 +3563,6 @@ |
| 3558 | 3563 |
private: |
| 3559 |
ArcMap& _arc_map; |
|
| 3560 |
NodeMap& _node_map; |
|
| 3564 |
|
|
| 3565 |
AM& _arc_map; |
|
| 3566 |
NM& _node_map; |
|
| 3567 |
|
|
| 3561 | 3568 |
}; |
| ... | ... |
@@ -3596,8 +3603,10 @@ |
| 3596 | 3603 |
/// \relates SplitNodes |
| 3597 |
template<typename GR> |
|
| 3598 |
SplitNodes<GR> |
|
| 3599 |
splitNodes(const GR& digraph) {
|
|
| 3600 |
return SplitNodes<GR>(digraph); |
|
| 3604 |
template<typename DGR> |
|
| 3605 |
SplitNodes<DGR> |
|
| 3606 |
splitNodes(const DGR& digraph) {
|
|
| 3607 |
return SplitNodes<DGR>(digraph); |
|
| 3601 | 3608 |
} |
| 3602 | 3609 |
|
| 3610 |
#undef LEMON_SCOPE_FIX |
|
| 3611 |
|
|
| 3603 | 3612 |
} //namespace lemon |
Changeset was too big and was cut off... Show full diff
0 comments (0 inline)