Changes in / [1297:c0c2f5c87aa6:1298:a78e5b779b69] in lemon
- Files:
-
- 7 added
- 3 deleted
- 146 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1185 r1264 62 62 FIND_PACKAGE(Doxygen) 63 63 FIND_PACKAGE(Ghostscript) 64 FIND_PACKAGE(GLPK 4.33) 65 FIND_PACKAGE(CPLEX) 66 FIND_PACKAGE(COIN) 64 65 SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.") 66 SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.") 67 SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.") 68 SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.") 69 70 IF(LEMON_ENABLE_GLPK) 71 FIND_PACKAGE(GLPK 4.33) 72 ENDIF(LEMON_ENABLE_GLPK) 73 IF(LEMON_ENABLE_ILOG) 74 FIND_PACKAGE(ILOG) 75 ENDIF(LEMON_ENABLE_ILOG) 76 IF(LEMON_ENABLE_COIN) 77 FIND_PACKAGE(COIN) 78 ENDIF(LEMON_ENABLE_COIN) 79 IF(LEMON_ENABLE_SOPLEX) 80 FIND_PACKAGE(SOPLEX) 81 ENDIF(LEMON_ENABLE_SOPLEX) 82 83 IF(GLPK_FOUND) 84 SET(LEMON_HAVE_LP TRUE) 85 SET(LEMON_HAVE_MIP TRUE) 86 SET(LEMON_HAVE_GLPK TRUE) 87 ENDIF(GLPK_FOUND) 88 IF(ILOG_FOUND) 89 SET(LEMON_HAVE_LP TRUE) 90 SET(LEMON_HAVE_MIP TRUE) 91 SET(LEMON_HAVE_CPLEX TRUE) 92 ENDIF(ILOG_FOUND) 93 IF(COIN_FOUND) 94 SET(LEMON_HAVE_LP TRUE) 95 SET(LEMON_HAVE_MIP TRUE) 96 SET(LEMON_HAVE_CLP TRUE) 97 SET(LEMON_HAVE_CBC TRUE) 98 ENDIF(COIN_FOUND) 99 IF(SOPLEX_FOUND) 100 SET(LEMON_HAVE_LP TRUE) 101 SET(LEMON_HAVE_SOPLEX TRUE) 102 ENDIF(SOPLEX_FOUND) 103 104 IF(ILOG_FOUND) 105 SET(DEFAULT_LP "CPLEX") 106 SET(DEFAULT_MIP "CPLEX") 107 ELSEIF(COIN_FOUND) 108 SET(DEFAULT_LP "CLP") 109 SET(DEFAULT_MIP "CBC") 110 ELSEIF(GLPK_FOUND) 111 SET(DEFAULT_LP "GLPK") 112 SET(DEFAULT_MIP "GLPK") 113 ELSEIF(SOPLEX_FOUND) 114 SET(DEFAULT_LP "SOPLEX") 115 ENDIF() 116 117 IF(NOT LEMON_DEFAULT_LP OR 118 (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR 119 (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR 120 (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR 121 (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX"))) 122 SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING 123 "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE) 124 ENDIF() 125 IF(NOT LEMON_DEFAULT_MIP OR 126 (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR 127 (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR 128 (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK"))) 129 SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING 130 "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE) 131 ENDIF() 132 67 133 68 134 IF(DEFINED ENV{LEMON_CXX_WARNING}) -
INSTALL
r1208 r1233 135 135 136 136 137 -DLEMON_ENABLE_GLPK=NO 138 -DLEMON_ENABLE_COIN=NO 139 -DLEMON_ENABLE_ILOG=NO 140 141 Enable optional third party libraries. They are all enabled by default. 142 143 -DLEMON_DEFAULT_LP=GLPK 144 145 Sets the default LP solver backend. The supported values are 146 CPLEX, CLP and GLPK. By default, it is set to the first one which 147 is enabled and succesfully discovered. 148 149 -DLEMON_DEFAULT_MIP=GLPK 150 151 Sets the default MIP solver backend. The supported values are 152 CPLEX, CBC and GLPK. By default, it is set to the first one which 153 is enabled and succesfully discovered. 154 137 155 -DGLPK_ROOT_DIR=DIRECTORY 138 156 -DCOIN_ROOT_DIR=DIRECTORY 139 -D CPLEX_ROOT_DIR=DIRECTORY157 -DILOG_ROOT_DIR=DIRECTORY 140 158 141 Install root directory prefixes of optional third party libraries.159 Root directory prefixes of optional third party libraries. 142 160 143 161 Makefile Variables -
NEWS
r962 r1281 1 2013-08-10 Version 1.3 released 2 3 This is major feature release 4 5 * New data structures 6 7 #69 : Bipartite graph concepts and implementations 8 9 * New algorithms 10 11 #177: Port Edmonds-Karp algorithm 12 #380, #405: Heuristic algorithm for the max clique problem 13 #386: Heuristic algorithms for symmetric TSP 14 ----: Nagamochi-Ibaraki algorithm [5087694945e4] 15 #397, #56: Max. cardinality search 16 17 * Other new features 18 19 #223: Thread safe graph and graph map implementations 20 #442: Different TimeStamp print formats 21 #457: File export functionality to LpBase 22 #362: Bidirectional iterator support for radixSort() 23 24 * Implementation improvements 25 26 ----: Network Simplex 27 #391: Better update process, pivot rule and arc mixing 28 #435: Improved Altering List pivot rule 29 #417: Various fine tunings in CostScaling 30 #438: Optional iteration limit in HowardMmc 31 #436: Ensure strongly polynomial running time for CycleCanceling 32 while keeping the same performance 33 ----: Make the CBC interface be compatible with latest CBC releases 34 [ee581a0ecfbf] 35 36 * CMAKE has become the default build environment (#434) 37 38 ----: Autotool support has been dropped 39 ----: Improved LP/MIP configuration 40 #465: Enable/disable options for LP/MIP backends 41 #446: Better CPLEX discovery 42 #460: Add cmake config to find SoPlex 43 ----: Allow CPACK configuration on all platforms 44 #390: Add 'Maintainer' CMAKE build type 45 #388: Add 'check' target. 46 #401: Add contrib dir 47 #389: Better version string setting in CMAKE 48 #433: Support shared library build 49 #416: Support testing with valgrind 50 51 * Doc improvements 52 53 #395: SOURCE_BROWSER Doxygen switch is configurable from CMAKE 54 update-external-tags CMAKE target 55 #455: Optionally use MathJax for rendering the math formulae 56 #402, #437, #459, #456, #463: Various doc improvements 57 58 * Bugfixes (compared to release 1.2): 59 60 #432: Add missing doc/template.h and doc/references.bib to release 61 tarball 62 ----: Intel C++ compatibility fixes 63 #441: Fix buggy reinitialization in _solver_bits::VarIndex::clear() 64 #444: Bugfix in path copy constructors and assignment operators 65 #447: Bugfix in AllArcLookUp<> 66 #448: Bugfix in adaptor_test.cc 67 #449: Fix clang compilation warnings and errors 68 #440: Fix a bug + remove redundant typedefs in dimacs-solver 69 #453: Avoid GCC 4.7 compiler warnings 70 #445: Fix missing initialization in CplexEnv::CplexEnv() 71 #428: Add missing lemon/lemon.pc.cmake to the release tarball 72 #393: Create and install lemon.pc 73 #429: Fix VS warnings 74 #430: Fix LpBase::Constr two-side limit bug 75 #392: Bug fix in Dfs::start(s,t) 76 #414: Fix wrong initialization in Preflow 77 #418: Better Win CodeBlock/MinGW support 78 #419: Build environment improvements 79 - Build of mip_test and lp_test precede the running of the tests 80 - Also search for coin libs under ${COIN_ROOT_DIR}/lib/coin 81 - Do not look for COIN_VOL libraries 82 #382: Allow lgf file without Arc maps 83 #417: Bug fix in CostScaling 84 #366: Fix Pred[Matrix]MapPath::empty() 85 #371: Bug fix in (di)graphCopy() 86 The target graph is cleared before adding nodes and arcs/edges. 87 #364: Add missing UndirectedTags 88 #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex 89 #372: Fix a critical bug in preflow 90 #461: Bugfix in assert.h 91 #470: Fix compilation issues related to various gcc versions 92 #446: Fix #define indicating CPLEX availability 93 #294: Add explicit namespace to 94 ignore_unused_variable_warning() usages 95 #420: Bugfix in IterableValueMap 96 #439: Bugfix in biNodeConnected() 97 98 1 99 2010-03-19 Version 1.2 released 2 100 -
cmake/FindCOIN.cmake
r1120 r1232 109 109 COIN_BZ2_LIBRARY 110 110 ) 111 112 IF(COIN_FOUND)113 SET(LEMON_HAVE_LP TRUE)114 SET(LEMON_HAVE_MIP TRUE)115 SET(LEMON_HAVE_CLP TRUE)116 SET(LEMON_HAVE_CBC TRUE)117 ENDIF(COIN_FOUND) -
cmake/FindGLPK.cmake
r685 r1232 54 54 55 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) -
doc/CMakeLists.txt
r1209 r1251 7 7 SET(LEMON_DOC_USE_MATHJAX "NO" CACHE STRING "Use MathJax to display math formulae (YES/NO).") 8 8 SET(LEMON_DOC_MATHJAX_RELPATH "http://www.mathjax.org/mathjax" CACHE STRING "MathJax library location.") 9 10 SET(LEMON_DOC_LIBSTDC++_URL 11 "http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/api" 12 CACHE STRING "GCC libstdc++ doxygen doc url.") 13 9 14 10 15 CONFIGURE_FILE( … … 35 40 COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images 36 41 COMMAND ${CMAKE_COMMAND} -E make_directory gen-images 37 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps 38 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps 39 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps 40 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps 41 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps 42 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/matching.eps 43 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps 44 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps 45 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps 46 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps 47 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps 48 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps 49 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/planar.png ${CMAKE_CURRENT_SOURCE_DIR}/images/planar.eps 50 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps 51 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/tsp.png ${CMAKE_CURRENT_SOURCE_DIR}/images/tsp.eps 42 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r20 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps 43 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/adaptors2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/adaptors2.eps 44 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps 45 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps 46 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps 47 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps 48 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r32 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps 49 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r24 -sOutputFile=gen-images/matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/matching.eps 50 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r24 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps 51 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r40 -sOutputFile=gen-images/planar.png ${CMAKE_CURRENT_SOURCE_DIR}/images/planar.eps 52 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r24 -sOutputFile=gen-images/tsp.png ${CMAKE_CURRENT_SOURCE_DIR}/images/tsp.eps 53 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r8 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps 54 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r8 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps 55 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r8 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps 56 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r8 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps 57 COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r8 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps 52 58 COMMAND ${CMAKE_COMMAND} -E remove_directory html 53 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox54 59 COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile 55 60 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} … … 76 81 IF(WGET_FOUND) 77 82 ADD_CUSTOM_TARGET(update-external-tags 78 COMMAND ${WGET_EXECUTABLE} -N http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag83 COMMAND ${WGET_EXECUTABLE} -N ${LEMON_DOC_LIBSTDC++_URL}/libstdc++.tag 79 84 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 80 85 ) -
doc/Doxyfile.in
r1208 r1251 78 78 FILE_VERSION_FILTER = 79 79 LAYOUT_FILE = "@abs_top_srcdir@/doc/DoxygenLayout.xml" 80 CITE_BIB_FILES = "@abs_top_srcdir@/doc/references.bib" 80 81 #--------------------------------------------------------------------------- 81 82 # configuration options related to warning and progress messages … … 99 100 "@abs_top_srcdir@/tools" \ 100 101 "@abs_top_srcdir@/test/test_tools.h" \ 101 "@abs_top_builddir@/doc/mainpage.dox" \ 102 "@abs_top_builddir@/doc/references.dox" 102 "@abs_top_builddir@/doc/mainpage.dox" 103 103 INPUT_ENCODING = UTF-8 104 104 FILE_PATTERNS = *.h \ … … 254 254 # Configuration::additions related to external references 255 255 #--------------------------------------------------------------------------- 256 TAGFILES = "@abs_top_builddir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/"256 TAGFILES = "@abs_top_builddir@/doc/libstdc++.tag = @LEMON_DOC_LIBSTDC++_URL@" 257 257 GENERATE_TAGFILE = html/lemon.tag 258 258 ALLEXTERNALS = NO -
doc/DoxygenLayout.xml
r1036 r1251 18 18 <tab type="globals" visible="yes" title="" intro=""/> 19 19 </tab> 20 <tab type="dirs" visible="yes" title="" intro=""/>21 20 <tab type="examples" visible="yes" title="" intro=""/> 22 21 <tab type="pages" visible="yes" title="" intro=""/> -
doc/coding_style.dox
r1023 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
doc/dirs.dox
r1031 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
doc/groups.dox
r1206 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 113 113 detailed documentation of particular adaptors. 114 114 115 Since the adaptor classes conform to the \ref graph_concepts "graph concepts", 116 an adaptor can even be applied to another one. 117 The following image illustrates a situation when a \ref SubDigraph adaptor 118 is applied on a digraph and \ref Undirector is applied on the subgraph. 119 120 \image html adaptors2.png 121 \image latex adaptors2.eps "Using graph adaptors" width=\textwidth 122 115 123 The behavior of graph adaptors can be very different. Some of them keep 116 124 capabilities of the original graph while in other cases this would be … … 310 318 This group contains the common graph search algorithms, namely 311 319 \e breadth-first \e search (BFS) and \e depth-first \e search (DFS) 312 \ refclrs01algorithms.320 \cite clrs01algorithms. 313 321 */ 314 322 … … 319 327 320 328 This group contains the algorithms for finding shortest paths in digraphs 321 \ refclrs01algorithms.329 \cite clrs01algorithms. 322 330 323 331 - \ref Dijkstra algorithm for finding shortest paths from a source node … … 341 349 342 350 This group contains the algorithms for finding minimum cost spanning 343 trees and arborescences \ refclrs01algorithms.351 trees and arborescences \cite clrs01algorithms. 344 352 */ 345 353 … … 350 358 351 359 This group contains the algorithms for finding maximum flows and 352 feasible circulations \ ref clrs01algorithms, \refamo93networkflows.360 feasible circulations \cite clrs01algorithms, \cite amo93networkflows. 353 361 354 362 The \e maximum \e flow \e problem is to find a flow of maximum value between … … 366 374 LEMON contains several algorithms for solving maximum flow problems: 367 375 - \ref EdmondsKarp Edmonds-Karp algorithm 368 \ refedmondskarp72theoretical.376 \cite edmondskarp72theoretical. 369 377 - \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm 370 \ refgoldberg88newapproach.378 \cite goldberg88newapproach. 371 379 - \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees 372 \ ref dinic70algorithm, \refsleator83dynamic.380 \cite dinic70algorithm, \cite sleator83dynamic. 373 381 - \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees 374 \ ref goldberg88newapproach, \refsleator83dynamic.382 \cite goldberg88newapproach, \cite sleator83dynamic. 375 383 376 384 In most cases the \ref Preflow algorithm provides the … … 392 400 393 401 This group contains the algorithms for finding minimum cost flows and 394 circulations \ refamo93networkflows. For more information about this395 problem and its dual solution, see \ref min_cost_flow402 circulations \cite amo93networkflows. For more information about this 403 problem and its dual solution, see: \ref min_cost_flow 396 404 "Minimum Cost Flow Problem". 397 405 398 406 LEMON contains several algorithms for this problem. 399 407 - \ref NetworkSimplex Primal Network Simplex algorithm with various 400 pivot strategies \ ref dantzig63linearprog, \refkellyoneill91netsimplex.408 pivot strategies \cite dantzig63linearprog, \cite kellyoneill91netsimplex. 401 409 - \ref CostScaling Cost Scaling algorithm based on push/augment and 402 relabel operations \ ref goldberg90approximation, \refgoldberg97efficient,403 \ refbunnagel98efficient.410 relabel operations \cite goldberg90approximation, \cite goldberg97efficient, 411 \cite bunnagel98efficient. 404 412 - \ref CapacityScaling Capacity Scaling algorithm based on the successive 405 shortest path method \ refedmondskarp72theoretical.413 shortest path method \cite edmondskarp72theoretical. 406 414 - \ref CycleCanceling Cycle-Canceling algorithms, two of which are 407 strongly polynomial \ ref klein67primal, \refgoldberg89cyclecanceling.415 strongly polynomial \cite klein67primal, \cite goldberg89cyclecanceling. 408 416 409 417 In general, \ref NetworkSimplex and \ref CostScaling are the most efficient … … 415 423 However, other algorithms could be faster in special cases. 416 424 For example, if the total supply and/or capacities are rather small, 417 \ref CapacityScaling is usually the fastest algorithm (without effective scaling). 425 \ref CapacityScaling is usually the fastest algorithm 426 (without effective scaling). 418 427 419 428 These classes are intended to be used with integer-valued input data … … 421 430 which is capable of handling real-valued arc costs (other numerical 422 431 data are required to be integer). 432 433 For more details about these implementations and for a comprehensive 434 experimental study, see the paper \cite KiralyKovacs12MCF. 435 It also compares these codes to other publicly available 436 minimum cost flow solvers. 423 437 */ 424 438 … … 459 473 460 474 This group contains the algorithms for finding minimum mean cycles 461 \ ref amo93networkflows, \refkarp78characterization.475 \cite amo93networkflows, \cite karp78characterization. 462 476 463 477 The \e minimum \e mean \e cycle \e problem is to find a directed cycle … … 475 489 476 490 LEMON contains three algorithms for solving the minimum mean cycle problem: 477 - \ref KarpMmc Karp's original algorithm \ refkarp78characterization.491 - \ref KarpMmc Karp's original algorithm \cite karp78characterization. 478 492 - \ref HartmannOrlinMmc Hartmann-Orlin's algorithm, which is an improved 479 version of Karp's algorithm \ refhartmann93finding.493 version of Karp's algorithm \cite hartmann93finding. 480 494 - \ref HowardMmc Howard's policy iteration algorithm 481 \ ref dasdan98minmeancycle, \refdasdan04experimental.495 \cite dasdan98minmeancycle, \cite dasdan04experimental. 482 496 483 497 In practice, the \ref HowardMmc "Howard" algorithm turned out to be by far the … … 485 499 time is exponential. 486 500 Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms 487 run in time O(ne) and use space O(n<sup>2</sup>+e), but the latter one is 488 typically faster due to the applied early termination scheme. 501 run in time O(nm) and use space O(n<sup>2</sup>+m). 489 502 */ 490 503 … … 559 572 \image latex planar.eps "Plane graph" width=\textwidth 560 573 */ 561 574 562 575 /** 563 576 @defgroup tsp Traveling Salesman Problem … … 636 649 high-level interface. 637 650 638 The currently supported solvers are \ ref glpk, \ref clp, \refcbc,639 \ ref cplex, \refsoplex.651 The currently supported solvers are \cite glpk, \cite clp, \cite cbc, 652 \cite cplex, \cite soplex. 640 653 */ 641 654 … … 724 737 This group contains general \c EPS drawing methods and special 725 738 graph exporting tools. 739 740 \image html graph_to_eps.png 726 741 */ 727 742 -
doc/images/bipartite_partitions.eps
r634 r1213 1 1 %!PS-Adobe-2.0 EPSF-2.0 2 2 %%Creator: LEMON, graphToEps() 3 %%CreationDate: Tue Nov 15 16:51:43 20053 %%CreationDate: Fri Mar 8 00:18:43 2013 4 4 %%BoundingBox: 0 0 842 596 5 5 %%EndComments … … 54 54 %Edges: 55 55 gsave 56 513.857 -446.322 296.569 -487.43 79.2808 -528.539 0 0 0 2lb57 513.857 -446.322 575.52 -315.65 5 637.183 -184.989 0 0 0 2lb58 393.468 566.711 494.771 434.577 596.074 302.442 0 0 0 2lb59 393.468 566.711 155.625 579.925 -82.2171 593.138 0 0 0 2lb60 393.468 566.711 251.056 450.726 108.644 334.741 0 0 0 2lb61 869.153 52.8539 732.613 177.648 596.074 302.442 0 0 0 2lb62 869.153 52.8539 753.168 -66.0676 637.183 -184.989 0 0 0 2lb63 -82.2171 593.138 -91.0261 346.487 -99.8351 99.8351 0 0 0 2lb64 -663.61 546.157 -753.168 394.936 -842.726 243.715 0 0 0 2lb65 -663.61 546.157 -574.052 437.513 -484.494 328.869 0 0 0 2lb66 -1077.63 161.498 -960.178 202.606 -842.726 243.715 0 0 0 2lb67 -1077.63 161.498 -968.987 66.0674 -860.344 -29.3633 0 0 0 2lb68 -1177.47 -234.906 -1029.18 -381.722 -880.898 -528.539 0 0 0 2lb69 -1177.47 -234.906 -1018.91 -132.135 -860.344 -29.3633 0 0 0 2lb70 -880.898 -528.539 -744.359 -387.595 -607.82 -246.651 0 0 0 2lb71 -499.175 -499.175 -355.295 -475.685 -211.415 -452.194 0 0 0 2lb72 -499.175 -499.175 -553.498 -372.913 -607.82 -246.651 0 0 0 2lb73 -499.175 -499.175 -386.587 -315.087 -274 -131 0 0 0 2lb74 79.2808 -528.539 -66.0671 -490.366 -211.415 -452.194 0 0 0 2lb75 637.183 -184.989 421.363 -253.993 205.543 -322.996 0 0 0 2lb76 205.543 -322.996 162.966 -226.097 120.389 -129.198 0 0 0 2lb77 399.34 88.0898 259.865 -20.5541 120.389 -129.198 0 0 0 2lb78 399.34 88.0898 253.992 211.415 108.644 334.741 0 0 0 2lb79 -842.726 243.715 -471.281 171.775 -99.8351 99.8351 0 0 0 2lb80 -842.726 243.715 -558.363 56.3575 -274 -131 0 0 0 2lb81 -860.344 -29.3633 -734.082 -138.007 -607.82 -246.651 0 0 0 2lb82 -211.415 -452.194 -45.513 -290.696 120.389 -129.198 0 0 0 2lb83 -99.8351 99.8351 4.40445 217.288 108.644 334.741 0 0 0 2lb84 -99.8351 99.8351 -292.165 214.352 -484.494 328.869 0 0 0 2lb85 120.389 -129.198 -76.8055 -130.099 -274 -131 0 0 0 2lb56 513.857 -446.322 296.569 -487.43 79.2808 -528.539 0 0 0 7.00153 lb 57 513.857 -446.322 575.52 -315.656 637.183 -184.989 0 0 0 7.00153 lb 58 393.468 566.711 494.771 434.577 596.074 302.442 0 0 0 7.00153 lb 59 393.468 566.711 155.625 579.925 -82.2171 593.138 0 0 0 7.00153 lb 60 393.468 566.711 251.056 450.726 108.644 334.741 0 0 0 7.00153 lb 61 869.153 52.8539 732.613 177.648 596.074 302.442 0 0 0 7.00153 lb 62 869.153 52.8539 753.168 -66.0676 637.183 -184.989 0 0 0 7.00153 lb 63 -82.2171 593.138 -91.0261 346.487 -99.8351 99.8351 0 0 0 7.00153 lb 64 -663.61 546.157 -753.168 394.936 -842.726 243.715 0 0 0 7.00153 lb 65 -663.61 546.157 -574.052 437.513 -484.494 328.869 0 0 0 7.00153 lb 66 -1077.63 161.498 -960.178 202.606 -842.726 243.715 0 0 0 7.00153 lb 67 -1077.63 161.498 -968.987 66.0674 -860.344 -29.3633 0 0 0 7.00153 lb 68 -1177.47 -234.906 -1029.18 -381.722 -880.898 -528.539 0 0 0 7.00153 lb 69 -1177.47 -234.906 -1018.91 -132.135 -860.344 -29.3633 0 0 0 7.00153 lb 70 -880.898 -528.539 -744.359 -387.595 -607.82 -246.651 0 0 0 7.00153 lb 71 -499.175 -499.175 -355.295 -475.685 -211.415 -452.194 0 0 0 7.00153 lb 72 -499.175 -499.175 -553.498 -372.913 -607.82 -246.651 0 0 0 7.00153 lb 73 -499.175 -499.175 -386.587 -315.087 -274 -131 0 0 0 7.00153 lb 74 79.2808 -528.539 -66.0671 -490.366 -211.415 -452.194 0 0 0 7.00153 lb 75 637.183 -184.989 421.363 -253.993 205.543 -322.996 0 0 0 7.00153 lb 76 205.543 -322.996 162.966 -226.097 120.389 -129.198 0 0 0 7.00153 lb 77 399.34 88.0898 259.865 -20.5541 120.389 -129.198 0 0 0 7.00153 lb 78 399.34 88.0898 253.992 211.415 108.644 334.741 0 0 0 7.00153 lb 79 -842.726 243.715 -471.281 171.775 -99.8351 99.8351 0 0 0 7.00153 lb 80 -842.726 243.715 -558.363 56.3575 -274 -131 0 0 0 7.00153 lb 81 -860.344 -29.3633 -734.082 -138.007 -607.82 -246.651 0 0 0 7.00153 lb 82 -211.415 -452.194 -45.513 -290.696 120.389 -129.198 0 0 0 7.00153 lb 83 -99.8351 99.8351 4.40445 217.288 108.644 334.741 0 0 0 7.00153 lb 84 -99.8351 99.8351 -292.165 214.352 -484.494 328.869 0 0 0 7.00153 lb 85 120.389 -129.198 -76.8055 -130.099 -274 -131 0 0 0 7.00153 lb 86 86 grestore 87 87 %Nodes: 88 88 gsave 89 -274 -131 2 01 0 0 nc90 -607.82 -246.651 2 01 0 0 nc91 -484.494 328.869 2 00 0 1 nc92 108.644 334.741 2 00 0 1 nc93 120.389 -129.198 2 00 0 1 nc94 -99.8351 99.8351 2 01 0 0 nc95 -211.415 -452.194 2 01 0 0 nc96 -860.344 -29.3633 2 00 0 1 nc97 -842.726 243.715 2 00 0 1 nc98 399.34 88.0898 2 01 0 0 nc99 205.543 -322.996 2 01 0 0 nc100 637.183 -184.989 2 00 0 1 nc101 79.2808 -528.539 2 00 0 1 nc102 -499.175 -499.175 2 00 0 1 nc103 -880.898 -528.539 2 00 0 1 nc104 -1177.47 -234.906 2 01 0 0 nc105 -1077.63 161.498 2 01 0 0 nc106 -663.61 546.157 2 01 0 0 nc107 -82.2171 593.138 2 00 0 1 nc108 596.074 302.442 2 00 0 1 nc109 869.153 52.8539 2 01 0 0 nc110 393.468 566.711 2 01 0 0 nc111 513.857 -446.322 2 01 0 0 nc89 -274 -131 23.3384 1 0 0 nc 90 -607.82 -246.651 23.3384 1 0 0 nc 91 -484.494 328.869 23.3384 0 0 1 nc 92 108.644 334.741 23.3384 0 0 1 nc 93 120.389 -129.198 23.3384 0 0 1 nc 94 -99.8351 99.8351 23.3384 1 0 0 nc 95 -211.415 -452.194 23.3384 1 0 0 nc 96 -860.344 -29.3633 23.3384 0 0 1 nc 97 -842.726 243.715 23.3384 0 0 1 nc 98 399.34 88.0898 23.3384 1 0 0 nc 99 205.543 -322.996 23.3384 1 0 0 nc 100 637.183 -184.989 23.3384 0 0 1 nc 101 79.2808 -528.539 23.3384 0 0 1 nc 102 -499.175 -499.175 23.3384 0 0 1 nc 103 -880.898 -528.539 23.3384 0 0 1 nc 104 -1177.47 -234.906 23.3384 1 0 0 nc 105 -1077.63 161.498 23.3384 1 0 0 nc 106 -663.61 546.157 23.3384 1 0 0 nc 107 -82.2171 593.138 23.3384 0 0 1 nc 108 596.074 302.442 23.3384 0 0 1 nc 109 869.153 52.8539 23.3384 1 0 0 nc 110 393.468 566.711 23.3384 1 0 0 nc 111 513.857 -446.322 23.3384 1 0 0 nc 112 112 grestore 113 113 grestore -
doc/images/connected_components.eps
r634 r1213 1 1 %!PS-Adobe-2.0 EPSF-2.0 2 2 %%Creator: LEMON, graphToEps() 3 %%CreationDate: Fri Nov 4 13:47:12 20053 %%CreationDate: Fri Mar 8 00:18:43 2013 4 4 %%BoundingBox: 0 0 842 596 5 5 %%EndComments … … 54 54 %Edges: 55 55 gsave 56 574.035 177.301 622.149 225.748 670.264 274.195 0 0 0 2lb57 694.579 115.483 682.421 194.839 670.264 274.195 0 0 0 2lb58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 0 2lb59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 0 2lb60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 0 2lb61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 0 2lb62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 0 2lb63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 0 2lb64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 0 2lb65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 0 2lb66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 0 2lb67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 0 2lb68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 0 2lb69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 0 2lb70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0 0 2lb71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0 2lb72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0 2lb73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0 2lb74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 0 2lb75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 0 2lb76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 0 2lb77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0 0 0 2lb78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 0 2lb79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 0 2lb80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 0 2lb81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 0 2lb82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 0 2lb83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 0 2lb84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 0 2lb85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 0 2lb86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 0 2lb87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 0 2lb88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 0 0 0 2lb89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 0 2lb90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 0 2lb91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 0 2lb92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 0 2lb93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 0 2lb94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 0 2lb95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 0 2lb96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 0 2lb97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 0 2lb98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 0 2lb99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 0 2lb100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 0 2lb101 -180.397 245.045 -1 42.256 345.099 -132.697 451.748 0 0 0 2lb102 -180.397 245.045 -1 70.838 351.694 -132.697 451.748 0 0 0 2lb103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 0 2lb104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 0 2lb105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 0 2lb106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 0 2lb107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 0 2lb108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 0 2lb109 -689.204 -237.261 - 614.799 -102.648 -567.302 43.6423 0 0 0 2lb110 -689.204 -237.261 -6 41.707 -90.9706 -567.302 43.6423 0 0 0 2lb56 574.035 177.301 622.149 225.748 670.264 274.195 0 0 0 6.25356 lb 57 694.579 115.483 682.421 194.839 670.264 274.195 0 0 0 6.25356 lb 58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 0 6.25356 lb 59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 0 6.25356 lb 60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 0 6.25356 lb 61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 0 6.25356 lb 62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 0 6.25356 lb 63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 0 6.25356 lb 64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 0 6.25356 lb 65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 0 6.25356 lb 66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 0 6.25356 lb 67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 0 6.25356 lb 68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 0 6.25356 lb 69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 0 6.25356 lb 70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0 0 6.25356 lb 71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0 6.25356 lb 72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0 6.25356 lb 73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0 6.25356 lb 74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 0 6.25356 lb 75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 0 6.25356 lb 76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 0 6.25356 lb 77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0 0 0 6.25356 lb 78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 0 6.25356 lb 79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 0 6.25356 lb 80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 0 6.25356 lb 81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 0 6.25356 lb 82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 0 6.25356 lb 83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 0 6.25356 lb 84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 0 6.25356 lb 85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 0 6.25356 lb 86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 0 6.25356 lb 87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 0 6.25356 lb 88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 0 0 0 6.25356 lb 89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 0 6.25356 lb 90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 0 6.25356 lb 91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 0 6.25356 lb 92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 0 6.25356 lb 93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 0 6.25356 lb 94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 0 6.25356 lb 95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 0 6.25356 lb 96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 0 6.25356 lb 97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 0 6.25356 lb 98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 0 6.25356 lb 99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 0 6.25356 lb 100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 0 6.25356 lb 101 -180.397 245.045 -113.509 338.465 -132.697 451.748 0 0 0 6.25356 lb 102 -180.397 245.045 -199.585 358.328 -132.697 451.748 0 0 0 6.25356 lb 103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 0 6.25356 lb 104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 0 6.25356 lb 105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 0 6.25356 lb 106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 0 6.25356 lb 107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 0 6.25356 lb 108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 0 6.25356 lb 109 -689.204 -237.261 -587.735 -114.393 -567.302 43.6423 0 0 0 6.25356 lb 110 -689.204 -237.261 -668.771 -79.2259 -567.302 43.6423 0 0 0 6.25356 lb 111 111 grestore 112 112 %Nodes: 113 113 gsave 114 -567.302 43.6423 20 0 0 0 nc115 -689.204 -237.261 20 0 0 0 nc116 924.667 409.347 20 1 0 0 nc117 588.113 544.499 20 1 0 0 nc118 670.264 274.195 20 1 0 0 nc119 -371.2 568.349 20 0 1 0 nc120 -132.697 451.748 20 0 1 0 nc121 -416.25 345.746 20 0 1 0 nc122 -180.397 245.045 20 0 1 0 nc123 -13.4452 133.743 20 0 1 0 nc124 -262.548 107.243 20 0 1 0 nc125 201.208 38.3422 20 0 1 0 nc126 116.407 -173.66 20 0 1 0 nc127 -26.6953 -19.9585 20 0 1 0 nc128 -539.894 -262.64 20 0 0 1 nc129 -323.543 -433.964 20 0 0 1 nc130 -309.657 -57.9033 20 0 0 1 nc131 -67.9734 -347.42 20 0 0 1 nc132 415.393 -289.516 20 0 0 1 nc133 730.084 -307.139 20 0 0 1 nc134 526.164 32.7279 20 0 0 1 nc135 762.812 -17.6227 20 0 0 1 nc136 -67.9734 319.727 20 0 0 1 nc137 329.797 314.692 20 0 0 1 nc138 -5.03507 561.41 20 0 0 1 nc139 422.945 521.129 20 0 0 1 nc140 -470.779 158.605 20 0 0 1 nc141 986.873 -115.807 20 0 0 1 nc142 906.312 201.403 20 0 0 1 nc143 -767.847 113.289 20 0 0 1 nc144 -579.033 445.603 20 0 0 1 nc145 -840.856 -246.718 20 0 0 1 nc146 206.221 -205.967 20 1 1 0 nc147 277.311 -252.33 20 1 1 0 nc148 271.13 -175.058 20 1 1 0 nc149 366.947 -110.15 20 1 1 0 nc150 397.855 -196.694 20 1 1 0 nc151 438.037 -88.514 20 1 1 0 nc152 286.584 -48.3327 20 1 1 0 nc153 212.403 -23.6057 20 1 1 0 nc154 280.402 10.3938 20 1 1 0 nc155 694.579 115.483 20 1 0 0 nc156 574.035 177.301 20 1 0 0 nc114 -567.302 43.6423 20.8452 0 0 0 nc 115 -689.204 -237.261 20.8452 0 0 0 nc 116 924.667 409.347 20.8452 1 0 0 nc 117 588.113 544.499 20.8452 1 0 0 nc 118 670.264 274.195 20.8452 1 0 0 nc 119 -371.2 568.349 20.8452 0 1 0 nc 120 -132.697 451.748 20.8452 0 1 0 nc 121 -416.25 345.746 20.8452 0 1 0 nc 122 -180.397 245.045 20.8452 0 1 0 nc 123 -13.4452 133.743 20.8452 0 1 0 nc 124 -262.548 107.243 20.8452 0 1 0 nc 125 201.208 38.3422 20.8452 0 1 0 nc 126 116.407 -173.66 20.8452 0 1 0 nc 127 -26.6953 -19.9585 20.8452 0 1 0 nc 128 -539.894 -262.64 20.8452 0 0 1 nc 129 -323.543 -433.964 20.8452 0 0 1 nc 130 -309.657 -57.9033 20.8452 0 0 1 nc 131 -67.9734 -347.42 20.8452 0 0 1 nc 132 415.393 -289.516 20.8452 0 0 1 nc 133 730.084 -307.139 20.8452 0 0 1 nc 134 526.164 32.7279 20.8452 0 0 1 nc 135 762.812 -17.6227 20.8452 0 0 1 nc 136 -67.9734 319.727 20.8452 0 0 1 nc 137 329.797 314.692 20.8452 0 0 1 nc 138 -5.03507 561.41 20.8452 0 0 1 nc 139 422.945 521.129 20.8452 0 0 1 nc 140 -470.779 158.605 20.8452 0 0 1 nc 141 986.873 -115.807 20.8452 0 0 1 nc 142 906.312 201.403 20.8452 0 0 1 nc 143 -767.847 113.289 20.8452 0 0 1 nc 144 -579.033 445.603 20.8452 0 0 1 nc 145 -840.856 -246.718 20.8452 0 0 1 nc 146 206.221 -205.967 20.8452 1 1 0 nc 147 277.311 -252.33 20.8452 1 1 0 nc 148 271.13 -175.058 20.8452 1 1 0 nc 149 366.947 -110.15 20.8452 1 1 0 nc 150 397.855 -196.694 20.8452 1 1 0 nc 151 438.037 -88.514 20.8452 1 1 0 nc 152 286.584 -48.3327 20.8452 1 1 0 nc 153 212.403 -23.6057 20.8452 1 1 0 nc 154 280.402 10.3938 20.8452 1 1 0 nc 155 694.579 115.483 20.8452 1 0 0 nc 156 574.035 177.301 20.8452 1 0 0 nc 157 157 grestore 158 158 grestore -
doc/images/edge_biconnected_components.eps
r634 r1213 1 1 %!PS-Adobe-2.0 EPSF-2.0 2 2 %%Creator: LEMON, graphToEps() 3 %%CreationDate: Fri Nov 4 13:47:12 20053 %%CreationDate: Fri Mar 8 00:18:43 2013 4 4 %%BoundingBox: 0 0 842 596 5 5 %%EndComments … … 54 54 %Edges: 55 55 gsave 56 574.035 177.301 622.149 225.748 670.264 274.195 1 0 0 2lb57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 2lb58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 1 2lb59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 1 2lb60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 1 2lb61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 1 2lb62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 1 2lb63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 1 2lb64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 1 2lb65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 1 2lb66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 1 2lb67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 1 2lb68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 1 2lb69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 1 2lb70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 1 0 0 2lb71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 1 2lb72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 1 2lb73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 1 2lb74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 1 2lb75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 1 2lb76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 1 2lb77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 1 0 0 2lb78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 1 2lb79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 1 2lb80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 1 2lb81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 1 2lb82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 1 2lb83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 1 2lb84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 1 2lb85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 1 2lb86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 1 2lb87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 1 2lb88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0 0 2lb89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 1 2lb90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 1 2lb91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 1 2lb92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 1 2lb93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 1 2lb94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 1 2lb95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 1 2lb96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 1 2lb97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 1 2lb98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 1 2lb99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 1 2lb100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 1 2lb101 -180.397 245.045 -1 42.256 345.099 -132.697 451.748 0 0 1 2lb102 -180.397 245.045 -1 70.838 351.694 -132.697 451.748 0 0 1 2lb103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 1 2lb104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 1 2lb105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 1 2lb106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 2lb107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 2lb108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 2lb109 -689.204 -237.261 - 614.799 -102.648 -567.302 43.6423 0 0 1 2lb110 -689.204 -237.261 -6 41.707 -90.9706 -567.302 43.6423 0 0 1 2lb56 574.035 177.301 622.149 225.748 670.264 274.195 1 0 0 6.25356 lb 57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 6.25356 lb 58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 1 6.25356 lb 59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 1 6.25356 lb 60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 1 6.25356 lb 61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 1 6.25356 lb 62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 1 6.25356 lb 63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 1 6.25356 lb 64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 1 6.25356 lb 65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 1 6.25356 lb 66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 1 6.25356 lb 67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 1 6.25356 lb 68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 1 6.25356 lb 69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 1 6.25356 lb 70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 1 0 0 6.25356 lb 71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 1 6.25356 lb 72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 1 6.25356 lb 73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 1 6.25356 lb 74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 1 6.25356 lb 75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 1 6.25356 lb 76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 1 6.25356 lb 77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 1 0 0 6.25356 lb 78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 1 6.25356 lb 79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 1 6.25356 lb 80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 1 6.25356 lb 81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 1 6.25356 lb 82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 1 6.25356 lb 83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 1 6.25356 lb 84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 1 6.25356 lb 85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 1 6.25356 lb 86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 1 6.25356 lb 87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 1 6.25356 lb 88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0 0 6.25356 lb 89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 1 6.25356 lb 90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 1 6.25356 lb 91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 1 6.25356 lb 92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 1 6.25356 lb 93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 1 6.25356 lb 94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 1 6.25356 lb 95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 1 6.25356 lb 96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 1 6.25356 lb 97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 1 6.25356 lb 98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 1 6.25356 lb 99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 1 6.25356 lb 100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 1 6.25356 lb 101 -180.397 245.045 -113.509 338.465 -132.697 451.748 0 0 1 6.25356 lb 102 -180.397 245.045 -199.585 358.328 -132.697 451.748 0 0 1 6.25356 lb 103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 1 6.25356 lb 104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 1 6.25356 lb 105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 1 6.25356 lb 106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 6.25356 lb 107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 6.25356 lb 108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 6.25356 lb 109 -689.204 -237.261 -587.735 -114.393 -567.302 43.6423 0 0 1 6.25356 lb 110 -689.204 -237.261 -668.771 -79.2259 -567.302 43.6423 0 0 1 6.25356 lb 111 111 grestore 112 112 %Nodes: 113 113 gsave 114 -567.302 43.6423 20 0 0 0 nc115 -689.204 -237.261 20 0 0 0 nc116 924.667 409.347 20 0 0 1 nc117 588.113 544.499 20 0 0 1 nc118 670.264 274.195 20 0 0 1 nc119 -371.2 568.349 20 1 1 0 nc120 -132.697 451.748 20 1 1 0 nc121 -416.25 345.746 20 1 1 0 nc122 -180.397 245.045 20 1 1 0 nc123 -13.4452 133.743 20 1 1 0 nc124 -262.548 107.243 20 1 1 0 nc125 201.208 38.3422 20 1 1 0 nc126 116.407 -173.66 20 1 1 0 nc127 -26.6953 -19.9585 20 1 1 0 nc128 -539.894 -262.64 20 0 0.5 0 nc129 -323.543 -433.964 20 0 0.5 0 nc130 -309.657 -57.9033 20 0 0.5 0 nc131 -67.9734 -347.42 20 0 0.5 0 nc132 415.393 -289.516 20 0.5 0 0 nc133 730.084 -307.139 20 0.5 0 0 nc134 526.164 32.7279 20 0.5 0 0 nc135 762.812 -17.6227 20 0.5 0 0 nc136 -67.9734 319.727 20 0.5 0 0 nc137 329.797 314.692 20 0.5 0 0 nc138 -5.03507 561.41 20 0.5 0 0 nc139 422.945 521.129 20 0.5 0 0 nc140 -470.779 158.605 20 0 1 1 nc141 986.873 -115.807 20 0.5 0 0 nc142 906.312 201.403 20 0.5 0 0 nc143 -767.847 113.289 20 0 1 1 nc144 -579.033 445.603 20 0 1 1 nc145 -840.856 -246.718 20 1 0 1 nc146 206.221 -205.967 20 0 0 0.5 nc147 277.311 -252.33 20 0 0 0.5 nc148 271.13 -175.058 20 0 0 0.5 nc149 366.947 -110.15 20 0 0 0.5 nc150 397.855 -196.694 20 0 0 0.5 nc151 438.037 -88.514 20 0 0 0.5 nc152 286.584 -48.3327 20 0 0 0.5 nc153 212.403 -23.6057 20 0 0 0.5 nc154 280.402 10.3938 20 0 0 0.5 nc155 694.579 115.483 20 1 0 0 nc156 574.035 177.301 20 0 1 0 nc114 -567.302 43.6423 20.8452 0 0 0 nc 115 -689.204 -237.261 20.8452 0 0 0 nc 116 924.667 409.347 20.8452 0 0 1 nc 117 588.113 544.499 20.8452 0 0 1 nc 118 670.264 274.195 20.8452 0 0 1 nc 119 -371.2 568.349 20.8452 1 1 0 nc 120 -132.697 451.748 20.8452 1 1 0 nc 121 -416.25 345.746 20.8452 1 1 0 nc 122 -180.397 245.045 20.8452 1 1 0 nc 123 -13.4452 133.743 20.8452 1 1 0 nc 124 -262.548 107.243 20.8452 1 1 0 nc 125 201.208 38.3422 20.8452 1 1 0 nc 126 116.407 -173.66 20.8452 1 1 0 nc 127 -26.6953 -19.9585 20.8452 1 1 0 nc 128 -539.894 -262.64 20.8452 0 0.5 0 nc 129 -323.543 -433.964 20.8452 0 0.5 0 nc 130 -309.657 -57.9033 20.8452 0 0.5 0 nc 131 -67.9734 -347.42 20.8452 0 0.5 0 nc 132 415.393 -289.516 20.8452 0.5 0 0 nc 133 730.084 -307.139 20.8452 0.5 0 0 nc 134 526.164 32.7279 20.8452 0.5 0 0 nc 135 762.812 -17.6227 20.8452 0.5 0 0 nc 136 -67.9734 319.727 20.8452 0.5 0 0 nc 137 329.797 314.692 20.8452 0.5 0 0 nc 138 -5.03507 561.41 20.8452 0.5 0 0 nc 139 422.945 521.129 20.8452 0.5 0 0 nc 140 -470.779 158.605 20.8452 0 1 1 nc 141 986.873 -115.807 20.8452 0.5 0 0 nc 142 906.312 201.403 20.8452 0.5 0 0 nc 143 -767.847 113.289 20.8452 0 1 1 nc 144 -579.033 445.603 20.8452 0 1 1 nc 145 -840.856 -246.718 20.8452 1 0 1 nc 146 206.221 -205.967 20.8452 0 0 0.5 nc 147 277.311 -252.33 20.8452 0 0 0.5 nc 148 271.13 -175.058 20.8452 0 0 0.5 nc 149 366.947 -110.15 20.8452 0 0 0.5 nc 150 397.855 -196.694 20.8452 0 0 0.5 nc 151 438.037 -88.514 20.8452 0 0 0.5 nc 152 286.584 -48.3327 20.8452 0 0 0.5 nc 153 212.403 -23.6057 20.8452 0 0 0.5 nc 154 280.402 10.3938 20.8452 0 0 0.5 nc 155 694.579 115.483 20.8452 1 0 0 nc 156 574.035 177.301 20.8452 0 1 0 nc 157 157 grestore 158 158 grestore -
doc/images/node_biconnected_components.eps
r634 r1213 1 1 %!PS-Adobe-2.0 EPSF-2.0 2 2 %%Creator: LEMON, graphToEps() 3 %%CreationDate: Fri Nov 4 13:47:12 20053 %%CreationDate: Fri Mar 8 00:18:43 2013 4 4 %%BoundingBox: 0 0 842 596 5 5 %%EndComments … … 54 54 %Edges: 55 55 gsave 56 574.035 177.301 622.149 225.748 670.264 274.195 0 1 0 5lb57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 5lb58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 1 1 0.5 5lb59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 1 1 0.5 5lb60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 1 1 0.5 5lb61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 1 0.5 1 5lb62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 1 0.5 1 5lb63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0.5 0.5 1 5lb64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0.5 0.5 1 5lb65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0.5 0.5 1 5lb66 366.947 -110.15 319.038 -142.604 271.13 -175.058 1 0.5 1 5lb67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0.5 1 1 5lb68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0.5 1 1 5lb69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0.5 1 1 5lb70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0.5 0 5lb71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0.5 5lb72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0.5 5lb73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0.5 5lb74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0.5 0.5 5lb75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0.5 0.5 5lb76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0.5 0.5 5lb77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0.5 0.5 0 5lb78 422.945 521.129 208.955 541.269 -5.03507 561.41 0.5 0 0.5 5lb79 422.945 521.129 376.371 417.911 329.797 314.692 0.5 0 0.5 5lb80 422.945 521.129 474.554 276.928 526.164 32.7279 0.5 0 0.5 5lb81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0.5 0 0.5 5lb82 329.797 314.692 130.912 317.209 -67.9734 319.727 0.5 0 0.5 5lb83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0.5 0 0.5 5lb84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0.5 0.5 0.5 5lb85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0.5 0.5 0.5 5lb86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0.5 0.5 0.5 5lb87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0.5 0.5 0.5 5lb88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0.5 0.5 5lb89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0.5 1 0.5 5lb90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0.5 1 0.5 5lb91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0.5 1 0.5 5lb92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0.5 1 0.5 5lb93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 1 1 0 5lb94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 1 1 0 5lb95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 1 0 1 5lb96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 1 0 1 5lb97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 1 1 0 5lb98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 1 0 1 5lb99 -262.548 107.243 -221.472 176.144 -180.397 245.045 1 0 1 5lb100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 1 0 1 5lb101 -180.397 245.045 -1 40.307 344.649 -132.697 451.748 0 1 1 5lb102 -180.397 245.045 -1 72.787 352.144 -132.697 451.748 0 1 1 5lb103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0.5 0 0 5lb104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0.5 0 0 5lb105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0.5 0 0 5lb106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 5lb107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 5lb108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 5lb109 -689.204 -237.261 - 612.964 -103.444 -567.302 43.6423 0 0 0 5lb110 -689.204 -237.261 -6 43.542 -90.1744 -567.302 43.6423 0 0 0 5lb56 574.035 177.301 622.149 225.748 670.264 274.195 0 1 0 6.25356 lb 57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 6.25356 lb 58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 1 1 0.5 6.25356 lb 59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 1 1 0.5 6.25356 lb 60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 1 1 0.5 6.25356 lb 61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 1 0.5 1 6.25356 lb 62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 1 0.5 1 6.25356 lb 63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0.5 0.5 1 6.25356 lb 64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0.5 0.5 1 6.25356 lb 65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0.5 0.5 1 6.25356 lb 66 366.947 -110.15 319.038 -142.604 271.13 -175.058 1 0.5 1 6.25356 lb 67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0.5 1 1 6.25356 lb 68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0.5 1 1 6.25356 lb 69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0.5 1 1 6.25356 lb 70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0.5 0 6.25356 lb 71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0.5 6.25356 lb 72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0.5 6.25356 lb 73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0.5 6.25356 lb 74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0.5 0.5 6.25356 lb 75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0.5 0.5 6.25356 lb 76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0.5 0.5 6.25356 lb 77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0.5 0.5 0 6.25356 lb 78 422.945 521.129 208.955 541.269 -5.03507 561.41 0.5 0 0.5 6.25356 lb 79 422.945 521.129 376.371 417.911 329.797 314.692 0.5 0 0.5 6.25356 lb 80 422.945 521.129 474.554 276.928 526.164 32.7279 0.5 0 0.5 6.25356 lb 81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0.5 0 0.5 6.25356 lb 82 329.797 314.692 130.912 317.209 -67.9734 319.727 0.5 0 0.5 6.25356 lb 83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0.5 0 0.5 6.25356 lb 84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0.5 0.5 0.5 6.25356 lb 85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0.5 0.5 0.5 6.25356 lb 86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0.5 0.5 0.5 6.25356 lb 87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0.5 0.5 0.5 6.25356 lb 88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0.5 0.5 6.25356 lb 89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0.5 1 0.5 6.25356 lb 90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0.5 1 0.5 6.25356 lb 91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0.5 1 0.5 6.25356 lb 92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0.5 1 0.5 6.25356 lb 93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 1 1 0 6.25356 lb 94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 1 1 0 6.25356 lb 95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 1 0 1 6.25356 lb 96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 1 0 1 6.25356 lb 97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 1 1 0 6.25356 lb 98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 1 0 1 6.25356 lb 99 -262.548 107.243 -221.472 176.144 -180.397 245.045 1 0 1 6.25356 lb 100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 1 0 1 6.25356 lb 101 -180.397 245.045 -113.509 338.465 -132.697 451.748 0 1 1 6.25356 lb 102 -180.397 245.045 -199.585 358.328 -132.697 451.748 0 1 1 6.25356 lb 103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0.5 0 0 6.25356 lb 104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0.5 0 0 6.25356 lb 105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0.5 0 0 6.25356 lb 106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 6.25356 lb 107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 6.25356 lb 108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 6.25356 lb 109 -689.204 -237.261 -587.735 -114.393 -567.302 43.6423 0 0 0 6.25356 lb 110 -689.204 -237.261 -668.771 -79.2259 -567.302 43.6423 0 0 0 6.25356 lb 111 111 grestore 112 112 %Nodes: 113 113 gsave 114 -567.302 43.6423 20 0 0 1 nc115 -689.204 -237.261 20 0 0 1 nc116 924.667 409.347 20 0 0 1 nc117 588.113 544.499 20 0 0 1 nc118 670.264 274.195 20 1 0 0 nc119 -371.2 568.349 20 0 0 1 nc120 -132.697 451.748 20 1 0 0 nc121 -416.25 345.746 20 0 0 1 nc122 -180.397 245.045 20 1 0 0 nc123 -13.4452 133.743 20 0 0 1 nc124 -262.548 107.243 20 0 0 1 nc125 201.208 38.3422 20 0 0 1 nc126 116.407 -173.66 20 0 0 1 nc127 -26.6953 -19.9585 20 1 0 0 nc128 -539.894 -262.64 20 0 0 1 nc129 -323.543 -433.964 20 0 0 1 nc130 -309.657 -57.9033 20 1 0 0 nc131 -67.9734 -347.42 20 1 0 0 nc132 415.393 -289.516 20 1 0 0 nc133 730.084 -307.139 20 0 0 1 nc134 526.164 32.7279 20 1 0 0 nc135 762.812 -17.6227 20 1 0 0 nc136 -67.9734 319.727 20 0 0 1 nc137 329.797 314.692 20 0 0 1 nc138 -5.03507 561.41 20 0 0 1 nc139 422.945 521.129 20 0 0 1 nc140 -470.779 158.605 20 1 0 0 nc141 986.873 -115.807 20 0 0 1 nc142 906.312 201.403 20 0 0 1 nc143 -767.847 113.289 20 1 0 0 nc144 -579.033 445.603 20 0 0 1 nc145 -840.856 -246.718 20 0 0 1 nc146 206.221 -205.967 20 0 0 1 nc147 277.311 -252.33 20 0 0 1 nc148 271.13 -175.058 20 1 0 0 nc149 366.947 -110.15 20 1 0 0 nc150 397.855 -196.694 20 0 0 1 nc151 438.037 -88.514 20 0 0 1 nc152 286.584 -48.3327 20 1 0 0 nc153 212.403 -23.6057 20 0 0 1 nc154 280.402 10.3938 20 0 0 1 nc155 694.579 115.483 20 0 0 1 nc156 574.035 177.301 20 0 0 1 nc114 -567.302 43.6423 20.8452 0 0 1 nc 115 -689.204 -237.261 20.8452 0 0 1 nc 116 924.667 409.347 20.8452 0 0 1 nc 117 588.113 544.499 20.8452 0 0 1 nc 118 670.264 274.195 20.8452 1 0 0 nc 119 -371.2 568.349 20.8452 0 0 1 nc 120 -132.697 451.748 20.8452 1 0 0 nc 121 -416.25 345.746 20.8452 0 0 1 nc 122 -180.397 245.045 20.8452 1 0 0 nc 123 -13.4452 133.743 20.8452 0 0 1 nc 124 -262.548 107.243 20.8452 0 0 1 nc 125 201.208 38.3422 20.8452 0 0 1 nc 126 116.407 -173.66 20.8452 0 0 1 nc 127 -26.6953 -19.9585 20.8452 1 0 0 nc 128 -539.894 -262.64 20.8452 0 0 1 nc 129 -323.543 -433.964 20.8452 0 0 1 nc 130 -309.657 -57.9033 20.8452 1 0 0 nc 131 -67.9734 -347.42 20.8452 1 0 0 nc 132 415.393 -289.516 20.8452 1 0 0 nc 133 730.084 -307.139 20.8452 0 0 1 nc 134 526.164 32.7279 20.8452 1 0 0 nc 135 762.812 -17.6227 20.8452 1 0 0 nc 136 -67.9734 319.727 20.8452 0 0 1 nc 137 329.797 314.692 20.8452 0 0 1 nc 138 -5.03507 561.41 20.8452 0 0 1 nc 139 422.945 521.129 20.8452 0 0 1 nc 140 -470.779 158.605 20.8452 1 0 0 nc 141 986.873 -115.807 20.8452 0 0 1 nc 142 906.312 201.403 20.8452 0 0 1 nc 143 -767.847 113.289 20.8452 1 0 0 nc 144 -579.033 445.603 20.8452 0 0 1 nc 145 -840.856 -246.718 20.8452 0 0 1 nc 146 206.221 -205.967 20.8452 0 0 1 nc 147 277.311 -252.33 20.8452 0 0 1 nc 148 271.13 -175.058 20.8452 1 0 0 nc 149 366.947 -110.15 20.8452 1 0 0 nc 150 397.855 -196.694 20.8452 0 0 1 nc 151 438.037 -88.514 20.8452 0 0 1 nc 152 286.584 -48.3327 20.8452 1 0 0 nc 153 212.403 -23.6057 20.8452 0 0 1 nc 154 280.402 10.3938 20.8452 0 0 1 nc 155 694.579 115.483 20.8452 0 0 1 nc 156 574.035 177.301 20.8452 0 0 1 nc 157 157 grestore 158 158 grestore -
doc/images/strongly_connected_components.eps
r634 r1213 1 1 %!PS-Adobe-2.0 EPSF-2.0 2 2 %%Creator: LEMON, graphToEps() 3 %%CreationDate: Fri Nov 4 13:47:12 20053 %%CreationDate: Fri Mar 8 00:22:15 2013 4 4 %%BoundingBox: 0 0 842 596 5 5 %%EndComments … … 54 54 %Edges: 55 55 gsave 56 2setlinewidth 0 0 1 setrgbcolor newpath56 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 57 57 218.178 27.2723 moveto 58 19 2.373 -40.1551 188.622 -49.9556 169.228 -100.631curveto stroke59 newpath 16 4.939 -111.838 moveto 165.492 -99.2013 lineto 172.964 -102.061lineto closepath fill60 2setlinewidth 0 0 1 setrgbcolor newpath58 195.849 -31.0725 190.033 -46.2697 176.306 -82.1369 curveto stroke 59 newpath 163.235 -116.291 moveto 165.206 -77.8889 lineto 187.405 -86.3849 lineto closepath fill 60 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 61 61 44.8044 15.5841 moveto 62 1 19.293 20.6059 129.775 21.3125 186.25 25.1199 curveto stroke63 newpath 198.223 25.927 moveto 186.519 21.1289 lineto 185.981 29.1108 lineto closepath fill64 2setlinewidth 1 0 0 setrgbcolor newpath62 109.705 19.9594 126.016 21.0591 166.493 23.7879 curveto stroke 63 newpath 202.98 26.2477 moveto 167.292 11.9299 lineto 165.694 35.6458 lineto closepath fill 64 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 65 65 218.178 27.2723 moveto 66 28 5.395 -87.4449 290.763 -96.6058 348.102 -194.464curveto stroke67 newpath 35 4.169 -204.818 moveto 344.651 -196.487 lineto 351.554 -192.442lineto closepath fill68 2setlinewidth 0 0 1 setrgbcolor newpath66 281.264 -80.3935 289.87 -95.0808 338.092 -177.379 curveto stroke 67 newpath 356.579 -208.932 moveto 327.837 -183.388 lineto 348.346 -171.371 lineto closepath fill 68 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 69 69 157.79 -130.517 moveto 70 1 08.71 -67.0521 102.27 -58.7243 64.3804 -9.72954 curveto stroke71 newpath 5 7.0394 -0.236898 moveto 67.5446 -7.28254 lineto 61.2162 -12.1765lineto closepath fill72 2setlinewidth 1 0 0 setrgbcolor newpath70 114.446 -74.4692 104.358 -61.4239 76.4943 -25.394 curveto stroke 71 newpath 54.1228 3.53455 moveto 85.8959 -18.1234 lineto 67.0928 -32.6646 lineto closepath fill 72 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 73 73 -105.193 -261.035 moveto 74 -3 5.6576 -132.801 -30.5923 -123.459 29.5506 -12.5464curveto stroke75 newpath 3 5.2708 -1.99743 moveto 33.0669 -14.4531 lineto 26.0343 -10.6397lineto closepath fill76 2setlinewidth 0 0 1 setrgbcolor newpath74 -39.4801 -139.85 -31.344 -124.846 20.1113 -29.9539 curveto stroke 75 newpath 37.5434 2.19358 moveto 30.559 -35.6192 lineto 9.66361 -24.2886 lineto closepath fill 76 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 77 77 -465.576 -42.8564 moveto 78 -55 9.078 -25.5413 -569.47 -23.6169 -644.498 -9.72286 curveto stroke79 newpath -6 56.297 -7.5378 moveto -643.77 -5.78973 lineto -645.226 -13.656lineto closepath fill80 2setlinewidth 0 0 1 setrgbcolor newpath78 -550.335 -27.1603 -566.8 -24.1113 -625.027 -13.3286 curveto stroke 79 newpath -660.985 -6.66971 moveto -622.863 -1.64245 lineto -627.191 -25.0148 lineto closepath fill 80 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 81 81 -574.666 -153.893 moveto 82 -5 28.842 -107.252 -521.515 -99.794 -488.002 -65.683curveto stroke83 newpath -47 9.592 -57.123 moveto -485.149 -68.4863 lineto -490.856 -62.8797lineto closepath fill84 2setlinewidth 1 0 0 setrgbcolor newpath82 -535.911 -114.447 -524.692 -103.027 -501.88 -79.8085 curveto stroke 83 newpath -476.251 -53.7222 moveto -493.402 -88.1377 lineto -510.358 -71.4793 lineto closepath fill 84 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 85 85 -490.901 120.777 moveto 86 -48 0.122 51.1328 -478.519 40.7713 -470.47 -11.2329curveto stroke87 newpath -46 8.635 -23.0917 moveto -474.423 -11.8447 lineto -466.517 -10.6212lineto closepath fill88 2setlinewidth 0 0 1 setrgbcolor newpath86 -481.623 60.8277 -479.143 44.8049 -473.499 8.33636 curveto stroke 87 newpath -467.906 -27.8032 moveto -485.244 6.51862 lineto -461.754 10.1541 lineto closepath fill 88 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 89 89 -675.963 -3.89604 moveto 90 -63 2.116 -68.8235 -626.228 -77.5422 -592.575 -127.374curveto stroke91 newpath -58 5.859 -137.319 moveto -595.89 -129.612 lineto -589.26 -125.135lineto closepath fill92 2setlinewidth 0 0 1 setrgbcolor newpath90 -637.405 -60.9909 -628.201 -74.6206 -603.658 -110.963 curveto stroke 91 newpath -583.191 -141.27 moveto -613.507 -117.615 lineto -593.808 -104.312 lineto closepath fill 92 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 93 93 -490.901 120.777 moveto 94 -43 5.445 215.844 -430.107 224.995 -384.3 303.522curveto stroke95 newpath -37 8.253 313.887 moveto -380.845 301.507 lineto -387.755 305.537lineto closepath fill96 2setlinewidth 0 0 1 setrgbcolor newpath94 -439.75 208.465 -431.238 223.057 -394.278 286.417 curveto stroke 95 newpath -375.851 318.006 moveto -384.012 280.429 lineto -404.543 292.406 lineto closepath fill 96 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 97 97 -266.879 114.933 moveto 98 -3 67.067 117.547 -377.642 117.822 -458.912 119.943curveto stroke99 newpath -47 0.908 120.255 moveto -458.807 123.941 lineto -459.016 115.944lineto closepath fill100 2setlinewidth 0 0 1 setrgbcolor newpath98 -358.311 117.318 -375.109 117.756 -439.117 119.426 curveto stroke 99 newpath -475.674 120.38 moveto -438.807 131.307 lineto -439.426 107.545 lineto closepath fill 100 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 101 101 -368.176 331.163 moveto 102 -32 2.511 233.685 -318.018 224.095 -280.454 143.911curveto stroke103 newpath -27 5.364 133.044 moveto -284.076 142.214 lineto -276.832 145.608lineto closepath fill104 2setlinewidth 1 0 0 setrgbcolor newpath102 -326.156 241.466 -318.997 226.186 -288.855 161.843 curveto stroke 103 newpath -273.341 128.727 moveto -299.617 156.801 lineto -278.092 166.885 lineto closepath fill 104 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 105 105 -266.879 114.933 moveto 106 -22 4.004 235.52 -220.448 245.52 -184.094 347.765curveto stroke107 newpath -1 80.074 359.072 moveto -180.325 346.425 lineto -187.863 349.105lineto closepath fill108 2setlinewidth 0 0 1 setrgbcolor newpath106 -226.764 227.755 -221.069 243.774 -190.728 329.107 curveto stroke 107 newpath -178.477 363.564 moveto -179.53 325.126 lineto -201.926 333.089 lineto closepath fill 108 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 109 109 -251.294 -335.059 moveto 110 -1 89.25 -303.624 -179.902 -298.887 -133.738 -275.498 curveto stroke111 newpath -1 23.034 -270.074 moveto -131.93 -279.066 lineto -135.546 -271.93lineto closepath fill112 2setlinewidth 0 0 1 setrgbcolor newpath110 -198.044 -308.079 -183.61 -300.766 -151.402 -284.448 curveto stroke 111 newpath -118.781 -267.92 moveto -146.031 -295.049 lineto -156.774 -273.846 lineto closepath fill 112 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 113 113 -389.604 -136.361 moveto 114 -3 27.15 -226.083 -321.098 -234.777 -269.576 -308.795curveto stroke115 newpath -2 62.72 -318.644 moveto -272.859 -311.081 lineto -266.293 -306.51lineto closepath fill116 2setlinewidth 1 0 0 setrgbcolor newpath114 -332.039 -219.059 -322.392 -232.919 -280.889 -292.543 curveto stroke 115 newpath -259.996 -322.557 moveto -290.643 -299.333 lineto -271.134 -285.753 lineto closepath fill 116 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 117 117 5.84406 175.322 moveto 118 -7 6.0754 267.926 -83.1051 275.873 -152.172 353.948curveto stroke119 newpath -16 0.122 362.936 moveto -149.176 356.598 lineto -155.168 351.298lineto closepath fill120 2setlinewidth 0 0 1 setrgbcolor newpath118 -70.5724 261.706 -81.8227 274.423 -139.051 339.116 curveto stroke 119 newpath -163.281 366.507 moveto -130.149 346.991 lineto -147.953 331.242 lineto closepath fill 120 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 121 121 169.478 311.683 moveto 122 96.8003 251.119 88.6819 244.353 30.4273 195.808curveto stroke123 newpath 21.2086 188.126 moveto 27.8666 198.881 lineto 32.988 192.735 lineto closepath fill124 2setlinewidth 0 0 1 setrgbcolor newpath122 103.641 256.819 90.7821 246.103 45.6398 208.485 curveto stroke 123 newpath 17.546 185.074 moveto 38.0313 217.615 lineto 53.2483 199.355 lineto closepath fill 124 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 125 125 342.851 111.037 moveto 126 26 3.766 202.563 256.831 210.589 190.4 287.47curveto stroke127 newpath 1 82.554 296.55 moveto 193.427 290.085 lineto 187.373 284.855lineto closepath fill128 2setlinewidth 0 0 1 setrgbcolor newpath126 269.224 196.246 258.132 209.083 203.347 272.486 curveto stroke 127 newpath 179.437 300.157 moveto 212.34 280.257 lineto 194.354 264.716 lineto closepath fill 128 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 129 129 5.84406 175.322 moveto 130 1 63.16 145.314 173.605 143.321 311.418 117.033 curveto stroke131 newpath 32 3.205 114.784 moveto 310.668 113.104 lineto 312.167 120.962lineto closepath fill132 2setlinewidth 0 0 1 setrgbcolor newpath130 155.419 146.79 172.221 143.585 291.966 120.743 curveto stroke 131 newpath 327.888 113.891 moveto 289.739 109.069 lineto 294.193 132.418 lineto closepath fill 132 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 133 133 342.851 111.037 moveto 134 49 7.255 2.58683 505.964 -3.53033 643.932 -100.436curveto stroke135 newpath 65 3.752 -107.334 moveto 641.633 -103.71 lineto 646.231 -97.163lineto closepath fill136 2setlinewidth 0 0 1 setrgbcolor newpath134 490.978 6.99574 505.015 -2.86383 627.727 -89.0547 curveto stroke 135 newpath 657.653 -110.074 moveto 620.896 -98.7802 lineto 634.558 -79.3291 lineto closepath fill 136 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 137 137 364.28 -222.074 moveto 138 354. 298 -66.9063 353.616 -56.2971 344.905 79.1029curveto stroke139 newpath 34 4.135 91.0781 moveto 348.897 79.3597 lineto 340.914 78.8461lineto closepath fill140 2setlinewidth 0 0 1 setrgbcolor newpath138 354.807 -74.8128 353.709 -57.7536 346.177 59.3416 curveto stroke 139 newpath 343.829 95.836 moveto 358.037 60.1045 lineto 334.316 58.5786 lineto closepath fill 140 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 141 141 670.118 -118.829 moveto 142 5 28.037 -166.793 517.967 -170.192 394.599 -211.839curveto stroke143 newpath 3 83.229 -215.677 moveto 393.32 -208.049 lineto 395.878 -215.629lineto closepath fill144 2setlinewidth 1 0 0 setrgbcolor newpath142 535.595 -164.241 519.412 -169.704 413.361 -205.505 curveto stroke 143 newpath 378.712 -217.202 moveto 409.559 -194.245 lineto 417.162 -216.766 lineto closepath fill 144 4.56973 setlinewidth 1 0 0 setrgbcolor newpath 145 145 -105.193 -261.035 moveto 146 11 8.401 -242.479 129.015 -241.598 332.39 -224.721curveto stroke147 newpath 34 4.348 -223.728 moveto 332.72 -228.707 lineto 332.059 -220.734 lineto closepath fill148 2setlinewidth 0 0 1 setrgbcolor newpath146 110.939 -243.099 128.069 -241.677 312.655 -226.358 curveto stroke 147 newpath 349.1 -223.334 moveto 313.638 -238.202 lineto 311.672 -214.514 lineto closepath fill 148 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 149 149 -105.193 -261.035 moveto 150 -1 60.867 -161.176 -166.028 -151.918 -212.336 -68.858curveto stroke151 newpath -2 18.179 -58.3769 moveto -208.842 -66.9102 lineto -215.829 -70.8058lineto closepath fill152 2setlinewidth 0 0 1 setrgbcolor newpath150 -156.746 -168.566 -164.987 -153.784 -202.693 -86.1539 curveto stroke 151 newpath -220.5 -54.2129 moveto -192.312 -80.3665 lineto -213.073 -91.9413 lineto closepath fill 152 4.56973 setlinewidth 0 0 1 setrgbcolor newpath 153 153 -227.918 -40.9084 moveto 154 -29 8.35 -82.4884 -307.42 -87.8432 -362.048 -120.093curveto stroke155 newpath -37 2.381 -126.193 moveto -364.081 -116.648 lineto -360.014 -123.537lineto closepath fill154 -290.327 -77.7521 -304.558 -86.1532 -344.995 -110.026 curveto stroke 155 newpath -376.487 -128.617 moveto -351.037 -99.7914 lineto -338.953 -120.26 lineto closepath fill 156 156 grestore 157 157 %Nodes: 158 158 gsave 159 -389.604 -136.361 200 1 0 nc160 -227.918 -40.9084 200 1 0 nc161 -105.193 -261.035 200 1 0 nc162 364.28 -222.074 201 1 0 nc163 670.118 -118.829 201 1 0 nc164 342.851 111.037 201 1 0 nc165 5.84406 175.322 201 1 0 nc166 169.478 311.683 201 1 0 nc167 -173.374 377.916 201 0 1 nc168 -251.294 -335.059 200 1 0 nc169 -266.879 114.933 200 0 0 nc170 -368.176 331.163 200 0 0 nc171 -490.901 120.777 200 0 0 nc172 -574.666 -153.893 201 0 0 nc173 -675.963 -3.89604 201 0 0 nc174 -465.576 -42.8564 201 0 0 nc175 44.8044 15.5841 200 0 1 nc176 157.79 -130.517 200 0 1 nc177 218.178 27.2723 200 0 1 nc159 -389.604 -136.361 15.2324 0 1 0 nc 160 -227.918 -40.9084 15.2324 0 1 0 nc 161 -105.193 -261.035 15.2324 0 1 0 nc 162 364.28 -222.074 15.2324 1 1 0 nc 163 670.118 -118.829 15.2324 1 1 0 nc 164 342.851 111.037 15.2324 1 1 0 nc 165 5.84406 175.322 15.2324 1 1 0 nc 166 169.478 311.683 15.2324 1 1 0 nc 167 -173.374 377.916 15.2324 1 0 1 nc 168 -251.294 -335.059 15.2324 0 1 0 nc 169 -266.879 114.933 15.2324 0 0 0 nc 170 -368.176 331.163 15.2324 0 0 0 nc 171 -490.901 120.777 15.2324 0 0 0 nc 172 -574.666 -153.893 15.2324 1 0 0 nc 173 -675.963 -3.89604 15.2324 1 0 0 nc 174 -465.576 -42.8564 15.2324 1 0 0 nc 175 44.8044 15.5841 15.2324 0 0 1 nc 176 157.79 -130.517 15.2324 0 0 1 nc 177 218.178 27.2723 15.2324 0 0 1 nc 178 178 grestore 179 179 grestore -
doc/lgf.dox
r1192 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 65 65 66 66 The \e LGF files can also contain bipartite graphs, in this case a 67 \c @red_nodes and a \c@blue_nodes sections describe the node set of the67 \c \@red_nodes and a \c \@blue_nodes sections describe the node set of the 68 68 graph. If a map is in both of these sections, then it can be used as a 69 69 regular node map. -
doc/mainpage.dox.in
r1039 r1221 26 26 It is a C++ template library providing efficient implementations of common 27 27 data structures and algorithms with focus on combinatorial optimization 28 tasks connected mainly with graphs and networks .28 tasks connected mainly with graphs and networks \cite DezsoJuttnerKovacs11Lemon. 29 29 30 30 <b> … … 38 38 The project is maintained by the 39 39 <a href="http://www.cs.elte.hu/egres/">Egerváry Research Group on 40 Combinatorial Optimization</a> \ refegres40 Combinatorial Optimization</a> \cite egres 41 41 at the Operations Research Department of the 42 42 <a href="http://www.elte.hu/en/">Eötvös Loránd University</a>, 43 43 Budapest, Hungary. 44 44 LEMON is also a member of the <a href="http://www.coin-or.org/">COIN-OR</a> 45 initiative \ refcoinor.45 initiative \cite coinor. 46 46 47 47 \section howtoread How to Read the Documentation -
doc/min_cost_flow.dox
r1164 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 27 27 minimum total cost from a set of supply nodes to a set of demand nodes 28 28 in a network with capacity constraints (lower and upper bounds) 29 and arc costs \ refamo93networkflows.29 and arc costs \cite amo93networkflows. 30 30 31 31 Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower: A\rightarrow\mathbf{R}\f$, -
doc/references.bib
r1164 r1219 20 20 {O}perations {R}esearch}, 21 21 url = {http://www.coin-or.org/} 22 } 23 24 25 %%%%% Papers related to LEMON %%%%% 26 27 @article{DezsoJuttnerKovacs11Lemon, 28 author = {B. Dezs{\H o} and A. J\"uttner and P. Kov\'acs}, 29 title = {{LEMON} -- an open source {C++} graph template library}, 30 journal = {Electronic Notes in Theoretical Computer Science}, 31 volume = {264}, 32 pages = {23--45}, 33 year = {2011}, 34 note = {Proc. 2nd Workshop on Generative Technologies} 35 } 36 37 @article{KiralyKovacs12MCF, 38 author = {Z. Kir\'aly and P. Kov\'acs}, 39 title = {Efficient implementations of minimum-cost flow algorithms}, 40 journal = {Acta Universitatis Sapientiae, Informatica}, 41 year = {2012}, 42 volume = {4}, 43 pages = {67--118} 22 44 } 23 45 -
lemon/CMakeLists.txt
r1133 r1264 37 37 IF(LEMON_HAVE_CPLEX) 38 38 SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc) 39 INCLUDE_DIRECTORIES(${ CPLEX_INCLUDE_DIRS})39 INCLUDE_DIRECTORIES(${ILOG_INCLUDE_DIRS}) 40 40 ENDIF() 41 41 … … 48 48 SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc) 49 49 INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) 50 ENDIF() 51 52 IF(LEMON_HAVE_SOPLEX) 53 SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc) 54 INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS}) 50 55 ENDIF() 51 56 -
lemon/adaptors.h
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/assert.h
r463 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 200 200 ::lemon::_assert_bits::cstringify(msg), \ 201 201 #exp), 0))) 202 # if LEMON_ENABLE_DEBUG202 # if defined LEMON_ENABLE_DEBUG 203 203 # define LEMON_DEBUG(exp, msg) \ 204 204 (static_cast<void> (!!(exp) ? 0 : ( \ -
lemon/base.cc
r554 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 22 22 #include<lemon/tolerance.h> 23 23 #include<lemon/core.h> 24 #include<lemon/time_measure.h> 24 25 namespace lemon { 25 26 … … 32 33 #endif 33 34 35 TimeStamp::Format TimeStamp::_format = TimeStamp::NORMAL; 36 34 37 } //namespace lemon -
lemon/bellman_ford.h
r960 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 150 150 /// This class provides an efficient implementation of the Bellman-Ford 151 151 /// algorithm. The maximum time complexity of the algorithm is 152 /// <tt>O(n e)</tt>.152 /// <tt>O(nm)</tt>. 153 153 /// 154 154 /// The Bellman-Ford algorithm solves the single-source shortest path … … 201 201 /// The type of the paths. 202 202 typedef PredMapPath<Digraph, PredMap> Path; 203 ///\brief The \ref BellmanFordDefaultOperationTraits203 ///\brief The \ref lemon::BellmanFordDefaultOperationTraits 204 204 /// "operation traits class" of the algorithm. 205 205 typedef typename TR::OperationTraits OperationTraits; 206 206 207 ///The \ref BellmanFordDefaultTraits "traits class" of the algorithm. 207 ///\brief The \ref lemon::BellmanFordDefaultTraits "traits class" 208 ///of the algorithm. 208 209 typedef TR Traits; 209 210 -
lemon/bfs.h
r1127 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 153 153 typedef PredMapPath<Digraph, PredMap> Path; 154 154 155 ///The \ref BfsDefaultTraits "traits class" of the algorithm.155 ///The \ref lemon::BfsDefaultTraits "traits class" of the algorithm. 156 156 typedef TR Traits; 157 157 -
lemon/bin_heap.h
r758 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/alteration_notifier.h
r1131 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/array_map.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/bezier.h
r1157 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/default_map.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/edge_set_extender.h
r1161 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/graph_adaptor_extender.h
r965 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/graph_extender.h
r1195 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 844 844 845 845 typedef AlterationNotifier<BpGraphExtender, Node> NodeNotifier; 846 typedef AlterationNotifier<BpGraphExtender, RedNode> RedNodeNotifier; 846 typedef AlterationNotifier<BpGraphExtender, RedNode> RedNodeNotifier; 847 847 typedef AlterationNotifier<BpGraphExtender, BlueNode> BlueNodeNotifier; 848 848 typedef AlterationNotifier<BpGraphExtender, Arc> ArcNotifier; -
lemon/bits/lock.h
r1131 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 25 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 34 34 public: 35 35 Lock() { 36 36 pthread_mutex_init(&_lock, 0); 37 37 } 38 38 ~Lock() { 39 39 pthread_mutex_destroy(&_lock); 40 40 } 41 41 void lock() { 42 42 pthread_mutex_lock(&_lock); 43 43 } 44 44 void unlock() { 45 45 pthread_mutex_unlock(&_lock); 46 46 } 47 47 … … 58 58 void lock() {} 59 59 void unlock() {} 60 }; 60 }; 61 61 #endif 62 62 } -
lemon/bits/map_extender.h
r867 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/path_dump.h
r973 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/solver_bits.h
r1142 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/traits.h
r1194 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/windows.cc
r1163 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 141 141 #endif 142 142 } 143 143 144 144 WinLock::~WinLock() { 145 145 #ifdef WIN32 -
lemon/bits/windows.h
r1131 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/capacity_scaling.h
r1297 r1298 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 67 67 /// \ref CapacityScaling implements the capacity scaling version 68 68 /// of the successive shortest path algorithm for finding a 69 /// \ref min_cost_flow "minimum cost flow" \ref amo93networkflows, 70 /// \ref edmondskarp72theoretical. It is an efficient dual 71 /// solution method. 69 /// \ref min_cost_flow "minimum cost flow" \cite amo93networkflows, 70 /// \cite edmondskarp72theoretical. It is an efficient dual 71 /// solution method, which runs in polynomial time 72 /// \f$O(m\log U (n+m)\log n)\f$, where <i>U</i> denotes the maximum 73 /// of node supply and arc capacity values. 72 74 /// 73 75 /// This algorithm is typically slower than \ref CostScaling and … … 117 119 typedef typename TR::Heap Heap; 118 120 119 /// The \ref CapacityScalingDefaultTraits "traits class" of the algorithm 121 /// \brief The \ref lemon::CapacityScalingDefaultTraits "traits class" 122 /// of the algorithm 120 123 typedef TR Traits; 121 124 … … 643 646 /// 644 647 /// This function returns the total cost of the found flow. 645 /// Its complexity is O( e).648 /// Its complexity is O(m). 646 649 /// 647 650 /// \note The return type of the function can be specified as a … … 835 838 return OPTIMAL; 836 839 } 837 840 838 841 // Check if the upper bound is greater than or equal to the lower bound 839 842 // on each forward arc. -
lemon/cbc.cc
r1161 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/cbc.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 17 17 */ 18 18 19 // -*- C++ -*-20 19 #ifndef LEMON_CBC_H 21 20 #define LEMON_CBC_H -
lemon/christofides_tsp.h
r1205 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 31 31 32 32 namespace lemon { 33 33 34 34 /// \ingroup tsp 35 35 /// … … 109 109 return _sum = 2 * _cost[_gr.edge(_gr(0), _gr(1))]; 110 110 } 111 111 112 112 // Compute min. cost spanning tree 113 113 std::vector<Edge> tree; 114 114 kruskal(_gr, _cost, std::back_inserter(tree)); 115 115 116 116 FullGraph::NodeMap<int> deg(_gr, 0); 117 117 for (int i = 0; i != int(tree.size()); ++i) { … … 126 126 if (deg[u] % 2 == 1) odd_nodes.push_back(u); 127 127 } 128 128 129 129 SmartGraph sgr; 130 130 SmartGraph::EdgeMap<Cost> scost(sgr); … … 140 140 } 141 141 } 142 142 143 143 // Compute min. cost perfect matching 144 144 MaxWeightedPerfectMatching<SmartGraph, SmartGraph::EdgeMap<Cost> > 145 145 mwpm(sgr, scost); 146 146 mwpm.run(); 147 147 148 148 for (SmartGraph::EdgeIt e(sgr); e != INVALID; ++e) { 149 149 if (mwpm.matching(e)) { … … 152 152 } 153 153 } 154 155 // Join the spanning tree and the matching 154 155 // Join the spanning tree and the matching 156 156 sgr.clear(); 157 157 for (int i = 0; i != _gr.nodeNum(); ++i) { … … 183 183 184 184 /// @} 185 185 186 186 /// \name Query Functions 187 187 /// @{ 188 188 189 189 /// \brief The total cost of the found tour. 190 190 /// … … 195 195 return _sum; 196 196 } 197 197 198 198 /// \brief Returns a const reference to the node sequence of the 199 199 /// found tour. … … 228 228 std::copy(_path.begin(), _path.end(), out); 229 229 } 230 230 231 231 /// \brief Gives back the found tour as a path. 232 232 /// 233 233 /// This function copies the found tour as a list of arcs/edges into 234 /// the given \ref concept::Path "path structure".234 /// the given \ref lemon::concepts::Path "path structure". 235 235 /// 236 236 /// \pre run() must be called before using this function. … … 245 245 } 246 246 } 247 247 248 248 /// @} 249 249 250 250 }; 251 251 -
lemon/circulation.h
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 196 196 public: 197 197 198 ///The \ref CirculationDefaultTraits "traits class" of the algorithm. 198 /// \brief The \ref lemon::CirculationDefaultTraits "traits class" 199 /// of the algorithm. 199 200 typedef TR Traits; 200 201 ///The type of the digraph the algorithm runs on. -
lemon/clp.cc
r1142 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/clp.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/concept_check.h
r1157 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 59 59 #if !defined(NDEBUG) 60 60 void (Concept::*x)() = & Concept::constraints; 61 ignore_unused_variable_warning(x);61 ::lemon::ignore_unused_variable_warning(x); 62 62 #endif 63 63 } … … 69 69 typedef typename Concept::template Constraints<Type> ConceptCheck; 70 70 void (ConceptCheck::*x)() = & ConceptCheck::constraints; 71 ignore_unused_variable_warning(x);71 ::lemon::ignore_unused_variable_warning(x); 72 72 #endif 73 73 } -
lemon/concepts/bpgraph.h
r1196 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 524 524 /// Sets the iterator to the first arc of the given graph. 525 525 /// 526 explicit ArcIt(const BpGraph &g) { ignore_unused_variable_warning(g); } 526 explicit ArcIt(const BpGraph &g) 527 { 528 ::lemon::ignore_unused_variable_warning(g); 529 } 527 530 /// Sets the iterator to the given arc. 528 531 … … 570 573 /// 571 574 OutArcIt(const BpGraph& n, const Node& g) { 572 ignore_unused_variable_warning(n);573 ignore_unused_variable_warning(g);575 ::lemon::ignore_unused_variable_warning(n); 576 ::lemon::ignore_unused_variable_warning(g); 574 577 } 575 578 /// Sets the iterator to the given arc. … … 618 621 /// 619 622 InArcIt(const BpGraph& g, const Node& n) { 620 ignore_unused_variable_warning(n);621 ignore_unused_variable_warning(g);623 ::lemon::ignore_unused_variable_warning(n); 624 ::lemon::ignore_unused_variable_warning(g); 622 625 } 623 626 /// Sets the iterator to the given arc. … … 802 805 803 806 /// \brief Gives back the red end node of the edge. 804 /// 807 /// 805 808 /// Gives back the red end node of the edge. 806 809 RedNode redNode(const Edge&) const { return RedNode(); } 807 810 808 811 /// \brief Gives back the blue end node of the edge. 809 /// 812 /// 810 813 /// Gives back the blue end node of the edge. 811 814 BlueNode blueNode(const Edge&) const { return BlueNode(); } … … 998 1001 /// \brief The base node of the iterator. 999 1002 /// 1000 /// Returns the base node of the given incom ming arc iterator1003 /// Returns the base node of the given incoming arc iterator 1001 1004 /// (i.e. the target node of the corresponding arc). 1002 1005 Node baseNode(InArcIt) const { return INVALID; } … … 1004 1007 /// \brief The running node of the iterator. 1005 1008 /// 1006 /// Returns the running node of the given incom ming arc iterator1009 /// Returns the running node of the given incoming arc iterator 1007 1010 /// (i.e. the source node of the corresponding arc). 1008 1011 Node runningNode(InArcIt) const { return INVALID; } -
lemon/concepts/digraph.h
r956 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 313 313 /// Sets the iterator to the first arc of the given digraph. 314 314 /// 315 explicit ArcIt(const Digraph& g) { ignore_unused_variable_warning(g); } 315 explicit ArcIt(const Digraph& g) { 316 ::lemon::ignore_unused_variable_warning(g); 317 } 316 318 /// Sets the iterator to the given arc. 317 319 … … 410 412 /// \brief The base node of the iterator. 411 413 /// 412 /// Returns the base node of the given incom ming arc iterator414 /// Returns the base node of the given incoming arc iterator 413 415 /// (i.e. the target node of the corresponding arc). 414 416 Node baseNode(InArcIt) const { return INVALID; } … … 416 418 /// \brief The running node of the iterator. 417 419 /// 418 /// Returns the running node of the given incom ming arc iterator420 /// Returns the running node of the given incoming arc iterator 419 421 /// (i.e. the source node of the corresponding arc). 420 422 Node runningNode(InArcIt) const { return INVALID; } -
lemon/concepts/graph.h
r1186 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 397 397 /// Sets the iterator to the first arc of the given graph. 398 398 /// 399 explicit ArcIt(const Graph &g) { ignore_unused_variable_warning(g); } 399 explicit ArcIt(const Graph &g) { 400 ::lemon::ignore_unused_variable_warning(g); 401 } 400 402 /// Sets the iterator to the given arc. 401 403 … … 443 445 /// 444 446 OutArcIt(const Graph& n, const Node& g) { 445 ignore_unused_variable_warning(n);446 ignore_unused_variable_warning(g);447 ::lemon::ignore_unused_variable_warning(n); 448 ::lemon::ignore_unused_variable_warning(g); 447 449 } 448 450 /// Sets the iterator to the given arc. … … 491 493 /// 492 494 InArcIt(const Graph& g, const Node& n) { 493 ignore_unused_variable_warning(n);494 ignore_unused_variable_warning(g);495 ::lemon::ignore_unused_variable_warning(n); 496 ::lemon::ignore_unused_variable_warning(g); 495 497 } 496 498 /// Sets the iterator to the given arc. … … 758 760 /// \brief The base node of the iterator. 759 761 /// 760 /// Returns the base node of the given incom ming arc iterator762 /// Returns the base node of the given incoming arc iterator 761 763 /// (i.e. the target node of the corresponding arc). 762 764 Node baseNode(InArcIt) const { return INVALID; } … … 764 766 /// \brief The running node of the iterator. 765 767 /// 766 /// Returns the running node of the given incom ming arc iterator768 /// Returns the running node of the given incoming arc iterator 767 769 /// (i.e. the source node of the corresponding arc). 768 770 Node runningNode(InArcIt) const { return INVALID; } -
lemon/concepts/graph_components.h
r1196 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 109 109 110 110 bool b; 111 ignore_unused_variable_warning(b);111 ::lemon::ignore_unused_variable_warning(b); 112 112 113 113 b = (ia == ib) && (ia != ib); … … 290 290 ue = e; 291 291 bool d = graph.direction(e); 292 ignore_unused_variable_warning(d);292 ::lemon::ignore_unused_variable_warning(d); 293 293 } 294 294 } … … 392 392 393 393 /// \brief Gives back the red end node of the edge. 394 /// 394 /// 395 395 /// Gives back the red end node of the edge. 396 396 RedNode redNode(const Edge&) const { return RedNode(); } 397 397 398 398 /// \brief Gives back the blue end node of the edge. 399 /// 399 /// 400 400 /// Gives back the blue end node of the edge. 401 401 BlueNode blueNode(const Edge&) const { return BlueNode(); } … … 457 457 rn = bpgraph.asRedNode(rnan); 458 458 bn = bpgraph.asBlueNode(bnan); 459 ignore_unused_variable_warning(b);459 ::lemon::ignore_unused_variable_warning(b); 460 460 } 461 461 } … … 535 535 536 536 nid = digraph.maxNodeId(); 537 ignore_unused_variable_warning(nid);537 ::lemon::ignore_unused_variable_warning(nid); 538 538 eid = digraph.maxArcId(); 539 ignore_unused_variable_warning(eid);539 ::lemon::ignore_unused_variable_warning(eid); 540 540 } 541 541 … … 590 590 edge = graph.edgeFromId(ueid); 591 591 ueid = graph.maxEdgeId(); 592 ignore_unused_variable_warning(ueid);592 ::lemon::ignore_unused_variable_warning(ueid); 593 593 } 594 594 … … 654 654 rid = bpgraph.maxRedId(); 655 655 bid = bpgraph.maxBlueId(); 656 ignore_unused_variable_warning(rid);657 ignore_unused_variable_warning(bid);656 ::lemon::ignore_unused_variable_warning(rid); 657 ::lemon::ignore_unused_variable_warning(bid); 658 658 } 659 659 … … 727 727 _GraphItemIt it3 = it1; 728 728 _GraphItemIt it4 = INVALID; 729 ignore_unused_variable_warning(it3);730 ignore_unused_variable_warning(it4);729 ::lemon::ignore_unused_variable_warning(it3); 730 ::lemon::ignore_unused_variable_warning(it4); 731 731 732 732 it2 = ++it1; … … 818 818 _GraphIncIt it3 = it1; 819 819 _GraphIncIt it4 = INVALID; 820 ignore_unused_variable_warning(it3);821 ignore_unused_variable_warning(it4);820 ::lemon::ignore_unused_variable_warning(it3); 821 ::lemon::ignore_unused_variable_warning(it4); 822 822 823 823 it2 = ++it1; … … 876 876 void next(Arc&) const {} 877 877 878 /// \brief Return the first arc incom ming to the given node.879 /// 880 /// This function gives back the first arc incom ming to the878 /// \brief Return the first arc incoming to the given node. 879 /// 880 /// This function gives back the first arc incoming to the 881 881 /// given node. 882 882 void firstIn(Arc&, const Node&) const {} 883 883 884 /// \brief Return the next arc incom ming to the given node.885 /// 886 /// This function gives back the next arc incom ming to the884 /// \brief Return the next arc incoming to the given node. 885 /// 886 /// This function gives back the next arc incoming to the 887 887 /// given node. 888 888 void nextIn(Arc&) const {} … … 1001 1001 n = digraph.baseNode(oait); 1002 1002 n = digraph.runningNode(oait); 1003 ignore_unused_variable_warning(n);1003 ::lemon::ignore_unused_variable_warning(n); 1004 1004 } 1005 1005 } … … 1151 1151 typedef typename Base::Arc Arc; 1152 1152 typedef typename Base::Edge Edge; 1153 1153 1154 1154 typedef IterableBpGraphComponent BpGraph; 1155 1155 … … 1211 1211 typename _BpGraph::RedNode rn(INVALID); 1212 1212 bpgraph.first(rn); 1213 bpgraph.next(rn); 1213 bpgraph.next(rn); 1214 1214 typename _BpGraph::BlueNode bn(INVALID); 1215 1215 bpgraph.first(bn); … … 1278 1278 = digraph.notifier(typename _Digraph::Arc()); 1279 1279 1280 ignore_unused_variable_warning(nn);1281 ignore_unused_variable_warning(en);1280 ::lemon::ignore_unused_variable_warning(nn); 1281 ::lemon::ignore_unused_variable_warning(en); 1282 1282 } 1283 1283 … … 1326 1326 typename _Graph::EdgeNotifier& uen 1327 1327 = graph.notifier(typename _Graph::Edge()); 1328 ignore_unused_variable_warning(uen);1328 ::lemon::ignore_unused_variable_warning(uen); 1329 1329 } 1330 1330 … … 1388 1388 typename _BpGraph::BlueNodeNotifier& bnn 1389 1389 = bpgraph.notifier(typename _BpGraph::BlueNode()); 1390 ignore_unused_variable_warning(rnn);1391 ignore_unused_variable_warning(bnn);1390 ::lemon::ignore_unused_variable_warning(rnn); 1391 ::lemon::ignore_unused_variable_warning(bnn); 1392 1392 } 1393 1393 … … 1462 1462 // m3 = cmap; 1463 1463 1464 ignore_unused_variable_warning(m1);1465 ignore_unused_variable_warning(m2);1466 // ignore_unused_variable_warning(m3);1464 ::lemon::ignore_unused_variable_warning(m1); 1465 ::lemon::ignore_unused_variable_warning(m2); 1466 // ::lemon::ignore_unused_variable_warning(m3); 1467 1467 } 1468 1468 -
lemon/concepts/heap.h
r1127 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 261 261 item=Item(); 262 262 prio=Prio(); 263 ignore_unused_variable_warning(item);264 ignore_unused_variable_warning(prio);263 ::lemon::ignore_unused_variable_warning(item); 264 ::lemon::ignore_unused_variable_warning(prio); 265 265 266 266 OwnItem own_item; … … 269 269 own_item=Item(); 270 270 own_prio=Prio(); 271 ignore_unused_variable_warning(own_item);272 ignore_unused_variable_warning(own_prio);273 ignore_unused_variable_warning(own_state);271 ::lemon::ignore_unused_variable_warning(own_item); 272 ::lemon::ignore_unused_variable_warning(own_prio); 273 ::lemon::ignore_unused_variable_warning(own_state); 274 274 275 275 _Heap heap1(map); 276 276 _Heap heap2 = heap1; 277 ignore_unused_variable_warning(heap1);278 ignore_unused_variable_warning(heap2);277 ::lemon::ignore_unused_variable_warning(heap1); 278 ::lemon::ignore_unused_variable_warning(heap2); 279 279 280 280 int s = heap.size(); 281 ignore_unused_variable_warning(s);281 ::lemon::ignore_unused_variable_warning(s); 282 282 bool e = heap.empty(); 283 ignore_unused_variable_warning(e);283 ::lemon::ignore_unused_variable_warning(e); 284 284 285 285 prio = heap.prio(); -
lemon/concepts/maps.h
r1157 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 61 61 own_val = m[own_key]; 62 62 63 ignore_unused_variable_warning(key);64 ignore_unused_variable_warning(val);65 ignore_unused_variable_warning(own_key);66 ignore_unused_variable_warning(own_val);63 ::lemon::ignore_unused_variable_warning(key); 64 ::lemon::ignore_unused_variable_warning(val); 65 ::lemon::ignore_unused_variable_warning(own_key); 66 ::lemon::ignore_unused_variable_warning(own_val); 67 67 } 68 68 const Key& key; … … 101 101 m.set(own_key, own_val); 102 102 103 ignore_unused_variable_warning(key);104 ignore_unused_variable_warning(val);105 ignore_unused_variable_warning(own_key);106 ignore_unused_variable_warning(own_val);103 ::lemon::ignore_unused_variable_warning(key); 104 ::lemon::ignore_unused_variable_warning(val); 105 ::lemon::ignore_unused_variable_warning(own_key); 106 ::lemon::ignore_unused_variable_warning(own_val); 107 107 } 108 108 const Key& key; -
lemon/concepts/path.h
r1127 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 76 76 template <typename CPath> 77 77 Path& operator=(const CPath& cpath) { 78 ignore_unused_variable_warning(cpath);78 ::lemon::ignore_unused_variable_warning(cpath); 79 79 return *this; 80 80 } … … 136 136 e = (i < ii); 137 137 138 ignore_unused_variable_warning(l);139 ignore_unused_variable_warning(pp);140 ignore_unused_variable_warning(e);141 ignore_unused_variable_warning(id);142 ignore_unused_variable_warning(ii);143 ignore_unused_variable_warning(ed);138 ::lemon::ignore_unused_variable_warning(l); 139 ::lemon::ignore_unused_variable_warning(pp); 140 ::lemon::ignore_unused_variable_warning(e); 141 ::lemon::ignore_unused_variable_warning(id); 142 ::lemon::ignore_unused_variable_warning(ii); 143 ::lemon::ignore_unused_variable_warning(ed); 144 144 } 145 145 }; … … 163 163 e = (i != INVALID); 164 164 165 ignore_unused_variable_warning(l);166 ignore_unused_variable_warning(e);167 ignore_unused_variable_warning(id);168 ignore_unused_variable_warning(ed);165 ::lemon::ignore_unused_variable_warning(l); 166 ::lemon::ignore_unused_variable_warning(e); 167 ::lemon::ignore_unused_variable_warning(id); 168 ::lemon::ignore_unused_variable_warning(ed); 169 169 } 170 170 _Path& p; … … 189 189 e = (i != INVALID); 190 190 191 ignore_unused_variable_warning(l);192 ignore_unused_variable_warning(e);193 ignore_unused_variable_warning(id);194 ignore_unused_variable_warning(ed);191 ::lemon::ignore_unused_variable_warning(l); 192 ::lemon::ignore_unused_variable_warning(e); 193 ::lemon::ignore_unused_variable_warning(id); 194 ::lemon::ignore_unused_variable_warning(ed); 195 195 } 196 196 _Path& p; -
lemon/config.h.in
r1133 r1264 5 5 #cmakedefine LEMON_HAVE_GLPK 1 6 6 #cmakedefine LEMON_HAVE_CPLEX 1 7 #cmakedefine LEMON_HAVE_SOPLEX 1 7 8 #cmakedefine LEMON_HAVE_CLP 1 8 9 #cmakedefine LEMON_HAVE_CBC 1 10 #cmakedefine LEMON_DEFAULT_LP @LEMON_DEFAULT_LP@ 11 #cmakedefine LEMON_DEFAULT_MIP @LEMON_DEFAULT_MIP@ 9 12 #cmakedefine LEMON_USE_PTHREAD 1 10 13 #cmakedefine LEMON_USE_WIN32_THREADS 1 -
lemon/connectivity.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 746 746 /// 747 747 /// This function checks whether the given undirected graph is 748 /// bi-node-connected, i.e. any two edges are on same circle. 748 /// bi-node-connected, i.e. a connected graph without articulation 749 /// node. 749 750 /// 750 751 /// \return \c true if the graph bi-node-connected. 751 /// \note By definition, the empty graph is bi-node-connected. 752 /// 753 /// \note By definition, 754 /// \li a graph consisting of zero or one node is bi-node-connected, 755 /// \li a graph consisting of two isolated nodes 756 /// is \e not bi-node-connected and 757 /// \li a graph consisting of two nodes connected by an edge 758 /// is bi-node-connected. 752 759 /// 753 760 /// \see countBiNodeConnectedComponents(), biNodeConnectedComponents() 754 761 template <typename Graph> 755 762 bool biNodeConnected(const Graph& graph) { 763 bool hasNonIsolated = false, hasIsolated = false; 764 for (typename Graph::NodeIt n(graph); n != INVALID; ++n) { 765 if (typename Graph::OutArcIt(graph, n) == INVALID) { 766 if (hasIsolated || hasNonIsolated) { 767 return false; 768 } else { 769 hasIsolated = true; 770 } 771 } else { 772 if (hasIsolated) { 773 return false; 774 } else { 775 hasNonIsolated = true; 776 } 777 } 778 } 756 779 return countBiNodeConnectedComponents(graph) <= 1; 757 780 } -
lemon/core.h
r1195 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 36 36 #ifdef _MSC_VER 37 37 #pragma warning( disable : 4250 4355 4503 4800 4996 ) 38 #endif 39 40 #ifdef __GNUC__ 41 #define GCC_VERSION (__GNUC__ * 10000 \ 42 + __GNUC_MINOR__ * 100 \ 43 + __GNUC_PATCHLEVEL__) 44 #endif 45 46 #if GCC_VERSION >= 40800 47 // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8 48 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 38 49 #endif 39 50 … … 244 255 245 256 namespace _graph_utils_bits { 246 257 247 258 template <typename Graph, typename Enable = void> 248 259 struct CountRedNodesSelector { … … 254 265 template <typename Graph> 255 266 struct CountRedNodesSelector< 256 Graph, typename 257 enable_if<typename Graph::NodeNumTag, void>::type> 267 Graph, typename 268 enable_if<typename Graph::NodeNumTag, void>::type> 258 269 { 259 270 static int count(const Graph &g) { 260 271 return g.redNum(); 261 272 } 262 }; 273 }; 263 274 } 264 275 … … 269 280 /// graph structures it is specialized to run in O(1). 270 281 /// 271 /// If the graph contains a \e redNum() member function and a 282 /// If the graph contains a \e redNum() member function and a 272 283 /// \e NodeNumTag tag then this function calls directly the member 273 284 /// function to query the cardinality of the node set. … … 278 289 279 290 namespace _graph_utils_bits { 280 291 281 292 template <typename Graph, typename Enable = void> 282 293 struct CountBlueNodesSelector { … … 288 299 template <typename Graph> 289 300 struct CountBlueNodesSelector< 290 Graph, typename 291 enable_if<typename Graph::NodeNumTag, void>::type> 301 Graph, typename 302 enable_if<typename Graph::NodeNumTag, void>::type> 292 303 { 293 304 static int count(const Graph &g) { 294 305 return g.blueNum(); 295 306 } 296 }; 307 }; 297 308 } 298 309 … … 303 314 /// graph structures it is specialized to run in O(1). 304 315 /// 305 /// If the graph contains a \e blueNum() member function and a 316 /// If the graph contains a \e blueNum() member function and a 306 317 /// \e NodeNumTag tag then this function calls directly the member 307 318 /// function to query the cardinality of the node set. … … 1855 1866 /// The Digraph type 1856 1867 typedef GR Digraph; 1857 1868 1858 1869 protected: 1859 1870 -
lemon/cost_scaling.h
r1297 r1298 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 92 92 /// \ref CostScaling implements a cost scaling algorithm that performs 93 93 /// push/augment and relabel operations for finding a \ref min_cost_flow 94 /// "minimum cost flow" \ref amo93networkflows, \ref goldberg90approximation, 95 /// \ref goldberg97efficient, \ref bunnagel98efficient. 94 /// "minimum cost flow" \cite amo93networkflows, 95 /// \cite goldberg90approximation, 96 /// \cite goldberg97efficient, \cite bunnagel98efficient. 96 97 /// It is a highly efficient primal-dual solution method, which 97 98 /// can be viewed as the generalization of the \ref Preflow 98 99 /// "preflow push-relabel" algorithm for the maximum flow problem. 100 /// It is a polynomial algorithm, its running time complexity is 101 /// \f$O(n^2m\log(nK))\f$, where <i>K</i> denotes the maximum arc cost. 99 102 /// 100 103 /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest … … 151 154 typedef typename TR::LargeCost LargeCost; 152 155 153 /// The \ref CostScalingDefaultTraits "traits class" of the algorithm 156 /// \brief The \ref lemon::CostScalingDefaultTraits "traits class" 157 /// of the algorithm 154 158 typedef TR Traits; 155 159 … … 211 215 typedef std::vector<LargeCost> LargeCostVector; 212 216 typedef std::vector<char> BoolVector; 213 // Note: vector<char> is used instead of vector<bool> for efficiency reasons 217 // Note: vector<char> is used instead of vector<bool> 218 // for efficiency reasons 214 219 215 220 private: … … 667 672 /// 668 673 /// This function returns the total cost of the found flow. 669 /// Its complexity is O( e).674 /// Its complexity is O(m). 670 675 /// 671 676 /// \note The return type of the function can be specified as a … … 901 906 return OPTIMAL; 902 907 } 903 908 904 909 // Check if the upper bound is greater than or equal to the lower bound 905 910 // on each forward arc. … … 1282 1287 _buckets[r] = _bucket_next[u]; 1283 1288 1284 // Search the incom ming arcs of u1289 // Search the incoming arcs of u 1285 1290 LargeCost pi_u = _pi[u]; 1286 1291 int last_out = _first_out[u+1]; -
lemon/cplex.cc
r1183 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 492 492 _message_enabled ? CPX_ON : CPX_OFF); 493 493 } 494 495 void CplexBase::_write(std::string file, std::string format) const 496 { 497 if(format == "MPS" || format == "LP") 498 CPXwriteprob(cplexEnv(), cplexLp(), file.c_str(), format.c_str()); 499 else if(format == "SOL") 500 CPXsolwrite(cplexEnv(), cplexLp(), file.c_str()); 501 else throw UnsupportedFormatError(format); 502 } 503 504 494 505 495 506 // CplexLp members -
lemon/cplex.h
r793 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 151 151 bool _message_enabled; 152 152 153 void _write(std::string file, std::string format) const; 154 153 155 public: 154 156 … … 171 173 const cpxlp* cplexLp() const { return _prob; } 172 174 175 #ifdef DOXYGEN 176 /// Write the problem or the solution to a file in the given format 177 178 /// This function writes the problem or the solution 179 /// to a file in the given format. 180 /// Trying to write in an unsupported format will trigger 181 /// \ref lemon::LpBase::UnsupportedFormatError "UnsupportedFormatError". 182 /// \param file The file path 183 /// \param format The output file format. 184 /// Supportted formats are "MPS", "LP" and "SOL". 185 void write(std::string file, std::string format = "MPS") const {} 186 #endif 187 173 188 }; 174 189 -
lemon/cycle_canceling.h
r1297 r1298 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 48 48 /// \ref CycleCanceling implements three different cycle-canceling 49 49 /// algorithms for finding a \ref min_cost_flow "minimum cost flow" 50 /// \ ref amo93networkflows, \refklein67primal,51 /// \ refgoldberg89cyclecanceling.50 /// \cite amo93networkflows, \cite klein67primal, 51 /// \cite goldberg89cyclecanceling. 52 52 /// The most efficent one is the \ref CANCEL_AND_TIGHTEN 53 53 /// "Cancel-and-Tighten" algorithm, thus it is the default method. 54 /// It runs in strongly polynomial time , but in practice, it is typically55 /// orders of magnitude slower than the scaling algorithms and56 /// \ref NetworkSimplex.54 /// It runs in strongly polynomial time \f$O(n^2 m^2 \log n)\f$, 55 /// but in practice, it is typically orders of magnitude slower than 56 /// the scaling algorithms and \ref NetworkSimplex. 57 57 /// (For more information, see \ref min_cost_flow_algs "the module page".) 58 58 /// … … 132 132 /// The "Minimum Mean Cycle-Canceling" algorithm, which is a 133 133 /// well-known strongly polynomial method 134 /// \ refgoldberg89cyclecanceling. It improves along a134 /// \cite goldberg89cyclecanceling. It improves along a 135 135 /// \ref min_mean_cycle "minimum mean cycle" in each iteration. 136 /// Its running time complexity is O(n<sup>2</sup>e<sup>3</sup>log(n)).136 /// Its running time complexity is \f$O(n^2 m^3 \log n)\f$. 137 137 MINIMUM_MEAN_CYCLE_CANCELING, 138 138 /// The "Cancel-and-Tighten" algorithm, which can be viewed as an 139 139 /// improved version of the previous method 140 /// \ refgoldberg89cyclecanceling.140 /// \cite goldberg89cyclecanceling. 141 141 /// It is faster both in theory and in practice, its running time 142 /// complexity is O(n<sup>2</sup>e<sup>2</sup>log(n)).142 /// complexity is \f$O(n^2 m^2 \log n)\f$. 143 143 CANCEL_AND_TIGHTEN 144 144 }; … … 576 576 /// 577 577 /// This function returns the total cost of the found flow. 578 /// Its complexity is O( e).578 /// Its complexity is O(m). 579 579 /// 580 580 /// \note The return type of the function can be specified as a … … 783 783 return OPTIMAL; 784 784 } 785 785 786 786 // Check if the upper bound is greater than or equal to the lower bound 787 787 // on each forward arc. … … 960 960 buildResidualNetwork(); 961 961 while (true) { 962 962 963 963 typename HwMmc::TerminationCause hw_tc = 964 964 hw_mmc.findCycleMean(hw_iter_limit); … … 976 976 hw_mmc.findCycle(); 977 977 } 978 978 979 979 // Compute delta value 980 980 Value delta = INF; -
lemon/dfs.h
r1161 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 153 153 typedef PredMapPath<Digraph, PredMap> Path; 154 154 155 ///The \ref DfsDefaultTraits "traits class" of the algorithm.155 ///The \ref lemon::DfsDefaultTraits "traits class" of the algorithm. 156 156 typedef TR Traits; 157 157 -
lemon/dijkstra.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 228 228 ///The heap type used by the algorithm. 229 229 typedef typename TR::Heap Heap; 230 /// \brief The \ref DijkstraDefaultOperationTraits "operation traits class"231 /// of the algorithm.230 /// \brief The \ref lemon::DijkstraDefaultOperationTraits 231 /// "operation traits class" of the algorithm. 232 232 typedef typename TR::OperationTraits OperationTraits; 233 233 234 ///The \ref DijkstraDefaultTraits "traits class" of the algorithm.234 ///The \ref lemon::DijkstraDefaultTraits "traits class" of the algorithm. 235 235 typedef TR Traits; 236 236 -
lemon/dimacs.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/edge_set.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/euler.h
r1023 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/fractional_matching.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 124 124 public: 125 125 126 /// \brief The \ref MaxFractionalMatchingDefaultTraits "traits127 /// class" of the algorithm.126 /// \brief The \ref lemon::MaxFractionalMatchingDefaultTraits 127 /// "traits class" of the algorithm. 128 128 typedef TR Traits; 129 129 /// The type of the graph the algorithm runs on. -
lemon/full_graph.h
r1193 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 875 875 static int id(Arc e) { return e._id; } 876 876 static int id(Edge e) { return e._id; } 877 877 878 878 static Node nodeFromId(int id) { return Node(id);} 879 879 static Arc arcFromId(int id) { return Arc(id);} … … 905 905 return n._id - _red_num; 906 906 } 907 907 908 908 void clear() { 909 909 _red_num = 0; _blue_num = 0; … … 911 911 } 912 912 913 Edge edge(const Node& u, const Node& v) const { 913 Edge edge(const Node& u, const Node& v) const { 914 914 if (u._id < _red_num) { 915 915 if (v._id < _red_num) { … … 927 927 } 928 928 929 Arc arc(const Node& u, const Node& v) const { 929 Arc arc(const Node& u, const Node& v) const { 930 930 if (u._id < _red_num) { 931 931 if (v._id < _red_num) { -
lemon/glpk.cc
r1142 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 581 581 break; 582 582 } 583 } 584 585 void GlpkBase::_write(std::string file, std::string format) const 586 { 587 if(format == "MPS") 588 glp_write_mps(lp, GLP_MPS_FILE, 0, file.c_str()); 589 else if(format == "LP") 590 glp_write_lp(lp, 0, file.c_str()); 591 else throw UnsupportedFormatError(format); 583 592 } 584 593 … … 999 1008 const char* GlpkMip::_solverName() const { return "GlpkMip"; } 1000 1009 1010 1011 1001 1012 } //END OF NAMESPACE LEMON -
lemon/glpk.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 116 116 virtual void _messageLevel(MessageLevel level); 117 117 118 virtual void _write(std::string file, std::string format) const; 119 118 120 private: 119 121 … … 145 147 int lpxCol(Col c) const { return cols(id(c)); } 146 148 149 #ifdef DOXYGEN 150 /// Write the problem or the solution to a file in the given format 151 152 /// This function writes the problem or the solution 153 /// to a file in the given format. 154 /// Trying to write in an unsupported format will trigger 155 /// \ref LpBase::UnsupportedFormatError. 156 /// \param file The file path 157 /// \param format The output file format. 158 /// Supportted formats are "MPS" and "LP". 159 void write(std::string file, std::string format = "MPS") const {} 160 #endif 161 147 162 }; 148 163 -
lemon/gomory_hu.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 47 47 /// 48 48 /// The algorithm calculates \e n-1 distinct minimum cuts (currently with 49 /// the \ref Preflow algorithm), thus it has \f$O(n^3\sqrt{ e})\f$ overall49 /// the \ref Preflow algorithm), thus it has \f$O(n^3\sqrt{m})\f$ overall 50 50 /// time complexity. It calculates a rooted Gomory-Hu tree. 51 51 /// The structure of the tree and the edge weights can be -
lemon/graph_to_eps.h
r1159 r1291 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 223 223 using T::_copyright; 224 224 225 using typename T::NodeTextColorType;226 225 using T::CUST_COL; 227 226 using T::DIST_COL; -
lemon/greedy_tsp.h
r1205 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 68 68 Cost _sum; 69 69 std::vector<Node> _path; 70 70 71 71 private: 72 72 73 73 // Functor class to compare edges by their costs 74 74 class EdgeComp { … … 229 229 /// 230 230 /// This function copies the found tour as a list of arcs/edges into 231 /// the given \ref concept::Path "path structure".231 /// the given \ref lemon::concepts::Path "path structure". 232 232 /// 233 233 /// \pre run() must be called before using this function. -
lemon/grosso_locatelli_pullan_mc.h
r1022 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 41 41 /// \ref GrossoLocatelliPullanMc implements the iterated local search 42 42 /// algorithm of Grosso, Locatelli, and Pullan for solving the \e maximum 43 /// \e clique \e problem \ refgrosso08maxclique.43 /// \e clique \e problem \cite grosso08maxclique. 44 44 /// It is to find the largest complete subgraph (\e clique) in an 45 45 /// undirected graph, i.e., the largest set of nodes where each … … 121 121 BoolMatrix _gr; 122 122 int _n; 123 123 124 124 // Search options 125 125 bool _delta_based_restart; 126 126 int _restart_delta_limit; 127 127 128 128 // Search limits 129 129 int _iteration_limit; … … 443 443 /// \name Execution Control 444 444 /// The \ref run() function can be used to execute the algorithm.\n 445 /// The functions \ref iterationLimit(int), \ref stepLimit(int), and 445 /// The functions \ref iterationLimit(int), \ref stepLimit(int), and 446 446 /// \ref sizeLimit(int) can be used to specify various limits for the 447 447 /// search process. 448 448 449 449 /// @{ 450 450 451 451 /// \brief Sets the maximum number of iterations. 452 452 /// … … 460 460 /// likely finds larger cliques. For smaller values, the algorithm is 461 461 /// faster but probably gives worse results. 462 /// 462 /// 463 463 /// The default value is \c 1000. 464 464 /// \c -1 means that number of iterations is not limited. … … 475 475 return *this; 476 476 } 477 477 478 478 /// \brief Sets the maximum number of search steps. 479 479 /// … … 487 487 /// likely finds larger cliques. For smaller values, the algorithm is 488 488 /// faster but probably gives worse results. 489 /// 489 /// 490 490 /// The default value is \c -1, which means that number of steps 491 491 /// is not limited explicitly. However, the number of iterations is … … 503 503 return *this; 504 504 } 505 505 506 506 /// \brief Sets the desired clique size. 507 507 /// … … 509 509 /// limit. If a clique of this size (or a larger one) is found, then the 510 510 /// algorithm terminates. 511 /// 511 /// 512 512 /// This function is especially useful if you know an exact upper bound 513 /// for the size of the cliques in the graph or if any clique above 513 /// for the size of the cliques in the graph or if any clique above 514 514 /// a certain size limit is sufficient for your application. 515 /// 515 /// 516 516 /// The default value is \c -1, which means that the size limit is set to 517 517 /// the number of nodes in the graph. … … 525 525 return *this; 526 526 } 527 527 528 528 /// \brief The maximum number of iterations. 529 529 /// … … 535 535 return _iteration_limit; 536 536 } 537 537 538 538 /// \brief The maximum number of search steps. 539 539 /// … … 545 545 return _step_limit; 546 546 } 547 547 548 548 /// \brief The desired clique size. 549 549 /// … … 584 584 /// \name Query Functions 585 585 /// The results of the algorithm can be obtained using these functions.\n 586 /// The run() function must be called before using them. 586 /// The run() function must be called before using them. 587 587 588 588 /// @{ … … 677 677 678 678 private: 679 679 680 680 // Initialize search options and limits 681 681 void initOptions() { … … 683 683 _delta_based_restart = true; 684 684 _restart_delta_limit = 4; 685 685 686 686 // Search limits 687 687 _iteration_limit = 1000; -
lemon/hao_orlin.h
r1019 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/hartmann_orlin_mmc.h
r1164 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 99 99 /// This class implements the Hartmann-Orlin algorithm for finding 100 100 /// a directed cycle of minimum mean cost in a digraph 101 /// \ref hartmann93finding, \ref dasdan98minmeancycle. 102 /// It is an improved version of \ref KarpMmc "Karp"'s original algorithm, 103 /// it applies an efficient early termination scheme. 104 /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e). 101 /// \cite hartmann93finding, \cite dasdan98minmeancycle. 102 /// This method is based on \ref KarpMmc "Karp"'s original algorithm, but 103 /// applies an early termination scheme. It makes the algorithm 104 /// significantly faster for some problem instances, but slower for others. 105 /// The algorithm runs in time O(nm) and uses space O(n<sup>2</sup>+m). 105 106 /// 106 107 /// \tparam GR The type of the digraph the algorithm runs on. … … 143 144 /// 144 145 /// The path type of the found cycles. 145 /// Using the \ref HartmannOrlinMmcDefaultTraits "default traits class", 146 /// Using the \ref lemon::HartmannOrlinMmcDefaultTraits 147 /// "default traits class", 146 148 /// it is \ref lemon::Path "Path<Digraph>". 147 149 typedef typename TR::Path Path; 148 150 149 /// The \ref HartmannOrlinMmcDefaultTraits "traits class" of the algorithm 151 /// \brief The 152 /// \ref lemon::HartmannOrlinMmcDefaultTraits "traits class" 153 /// of the algorithm 150 154 typedef TR Traits; 151 155 … … 275 279 /// 276 280 /// If you don't call this function before calling \ref run() or 277 /// \ref findCycleMean(), it will allocate a local \ref Path "path"278 /// structure. The destuctor deallocates this automatically281 /// \ref findCycleMean(), a local \ref Path "path" structure 282 /// will be allocated. The destuctor deallocates this automatically 279 283 /// allocated object, of course. 280 284 /// -
lemon/howard_mmc.h
r1178 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 99 99 /// This class implements Howard's policy iteration algorithm for finding 100 100 /// a directed cycle of minimum mean cost in a digraph 101 /// \ ref dasdan98minmeancycle, \refdasdan04experimental.101 /// \cite dasdan98minmeancycle, \cite dasdan04experimental. 102 102 /// This class provides the most efficient algorithm for the 103 103 /// minimum mean cycle problem, though the best known theoretical … … 143 143 /// 144 144 /// The path type of the found cycles. 145 /// Using the \ref HowardMmcDefaultTraits "default traits class",145 /// Using the \ref lemon::HowardMmcDefaultTraits "default traits class", 146 146 /// it is \ref lemon::Path "Path<Digraph>". 147 147 typedef typename TR::Path Path; 148 148 149 /// The \ref HowardMmcDefaultTraits "traits class" of the algorithm149 /// The \ref lemon::HowardMmcDefaultTraits "traits class" of the algorithm 150 150 typedef TR Traits; 151 151 … … 156 156 /// these values. 157 157 enum TerminationCause { 158 158 159 159 /// No directed cycle can be found in the digraph. 160 160 NO_CYCLE = 0, 161 161 162 162 /// Optimal solution (minimum cycle mean) is found. 163 163 OPTIMAL = 1, … … 283 283 /// 284 284 /// If you don't call this function before calling \ref run() or 285 /// \ref findCycleMean(), it will allocate a local \ref Path "path"286 /// structure. The destuctor deallocates this automatically285 /// \ref findCycleMean(), a local \ref Path "path" structure 286 /// will be allocated. The destuctor deallocates this automatically 287 287 /// allocated object, of course. 288 288 /// … … 357 357 /// 358 358 /// \param limit The maximum allowed number of iterations during 359 /// the search process. Its default value implies that the algorithm 359 /// the search process. Its default value implies that the algorithm 360 360 /// runs until it finds the exact optimal solution. 361 361 /// 362 362 /// \return The termination cause of the search process. 363 /// For more information, see \ref TerminationCause. 364 TerminationCause findCycleMean(int limit = std::numeric_limits<int>::max()) { 363 /// For more information, see \ref TerminationCause. 364 TerminationCause findCycleMean(int limit = 365 std::numeric_limits<int>::max()) { 365 366 // Initialize and find strongly connected components 366 367 init(); … … 390 391 _best_node = _curr_node; 391 392 } 392 393 393 394 if (iter_limit_reached) break; 394 395 } -
lemon/insertion_tsp.h
r1205 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 226 226 /// 227 227 /// This function copies the found tour as a list of arcs/edges into 228 /// the given \ref concept::Path "path structure".228 /// the given \ref lemon::concepts::Path "path structure". 229 229 /// 230 230 /// \pre run() must be called before using this function. … … 361 361 Node u = _notused[i]; 362 362 Cost min_cost = costDiff(_tour.back(), _tour.front(), u); 363 int min_pos = 0; 363 int min_pos = 0; 364 364 for (unsigned int j=1; j<_tour.size(); ++j) { 365 365 Cost curr_cost = costDiff(_tour[j-1], _tour[j], u); … … 391 391 _notused[min_node] = _notused.back(); 392 392 _notused.pop_back(); 393 393 394 394 // Insert the selected node into the tour 395 395 const int ipos = _ins_pos[sn]; … … 406 406 Cost nc1 = costDiff(_tour[ipos_prev], _tour[ipos], u); 407 407 Cost nc2 = costDiff(_tour[ipos], _tour[ipos_next], u); 408 408 409 409 if (nc1 <= curr_cost || nc2 <= curr_cost) { 410 410 // A new position is better than the old one … … 421 421 // The minimum should be found again 422 422 curr_cost = costDiff(_tour.back(), _tour.front(), u); 423 curr_pos = 0; 423 curr_pos = 0; 424 424 for (unsigned int j=1; j<_tour.size(); ++j) { 425 425 Cost tmp_cost = costDiff(_tour[j-1], _tour[j], u); … … 434 434 } 435 435 } 436 436 437 437 _ins_cost[u] = curr_cost; 438 438 _ins_pos[u] = curr_pos; -
lemon/karp_mmc.h
r1164 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 99 99 /// This class implements Karp's algorithm for finding a directed 100 100 /// cycle of minimum mean cost in a digraph 101 /// \ ref karp78characterization, \refdasdan98minmeancycle.102 /// It runs in time O(n e) and uses space O(n<sup>2</sup>+e).101 /// \cite karp78characterization, \cite dasdan98minmeancycle. 102 /// It runs in time O(nm) and uses space O(n<sup>2</sup>+m). 103 103 /// 104 104 /// \tparam GR The type of the digraph the algorithm runs on. … … 141 141 /// 142 142 /// The path type of the found cycles. 143 /// Using the \ref KarpMmcDefaultTraits "default traits class",143 /// Using the \ref lemon::KarpMmcDefaultTraits "default traits class", 144 144 /// it is \ref lemon::Path "Path<Digraph>". 145 145 typedef typename TR::Path Path; 146 146 147 /// The \ref KarpMmcDefaultTraits "traits class" of the algorithm147 /// The \ref lemon::KarpMmcDefaultTraits "traits class" of the algorithm 148 148 typedef TR Traits; 149 149 … … 271 271 /// 272 272 /// If you don't call this function before calling \ref run() or 273 /// \ref findCycleMean(), it will allocate a local \ref Path "path"274 /// structure. The destuctor deallocates this automatically273 /// \ref findCycleMean(), a local \ref Path "path" structure 274 /// will be allocated. The destuctor deallocates this automatically 275 275 /// allocated object, of course. 276 276 /// -
lemon/kruskal.h
r1025 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/lgf_reader.h
r1198 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 1231 1231 /// \ingroup lemon_io 1232 1232 /// 1233 /// \brief Return a \ref DigraphReader class 1234 /// 1235 /// This function just returns a \ref DigraphReader class. 1233 /// \brief Return a \ref lemon::DigraphReader "DigraphReader" class 1234 /// 1235 /// This function just returns a \ref lemon::DigraphReader 1236 /// "DigraphReader" class. 1236 1237 /// 1237 1238 /// With this function a digraph can be read from an … … 1253 1254 ///\endcode 1254 1255 /// 1255 /// For a complete documentation, please see the \ref DigraphReader 1256 /// For a complete documentation, please see the 1257 /// \ref lemon::DigraphReader "DigraphReader" 1256 1258 /// class documentation. 1257 /// \warning Don't forget to put the \ref DigraphReader::run() "run()"1259 /// \warning Don't forget to put the \ref lemon::DigraphReader::run() "run()" 1258 1260 /// to the end of the parameter list. 1259 1261 /// \relates DigraphReader … … 2109 2111 /// \ingroup lemon_io 2110 2112 /// 2111 /// \brief Return a \ref GraphReaderclass2112 /// 2113 /// This function just returns a \ref GraphReaderclass.2113 /// \brief Return a \ref lemon::GraphReader "GraphReader" class 2114 /// 2115 /// This function just returns a \ref lemon::GraphReader "GraphReader" class. 2114 2116 /// 2115 2117 /// With this function a graph can be read from an … … 2127 2129 ///\endcode 2128 2130 /// 2129 /// For a complete documentation, please see the \ref GraphReader 2131 /// For a complete documentation, please see the 2132 /// \ref lemon::GraphReader "GraphReader" 2130 2133 /// class documentation. 2131 /// \warning Don't forget to put the \ref GraphReader::run() "run()"2134 /// \warning Don't forget to put the \ref lemon::GraphReader::run() "run()" 2132 2135 /// to the end of the parameter list. 2133 2136 /// \relates GraphReader … … 2636 2639 _red_node_index.insert(std::make_pair(converter(map[n]), n)); 2637 2640 } 2638 for (BlueNodeIt n(_graph); n != INVALID; ++n) { 2641 for (BlueNodeIt n(_graph); n != INVALID; ++n) { 2639 2642 _blue_node_index.insert(std::make_pair(converter(map[n]), n)); 2640 2643 } … … 3175 3178 /// \ingroup lemon_io 3176 3179 /// 3177 /// \brief Return a \ref BpGraphReader class 3178 /// 3179 /// This function just returns a \ref BpGraphReader class. 3180 /// \brief Return a \ref lemon::BpGraphReader "BpGraphReader" class 3181 /// 3182 /// This function just returns a \ref lemon::BpGraphReader 3183 /// "BpGraphReader" class. 3180 3184 /// 3181 3185 /// With this function a graph can be read from an … … 3193 3197 ///\endcode 3194 3198 /// 3195 /// For a complete documentation, please see the \ref BpGraphReader 3199 /// For a complete documentation, please see the 3200 /// \ref lemon::BpGraphReader "BpGraphReader" 3196 3201 /// class documentation. 3197 /// \warning Don't forget to put the \ref BpGraphReader::run() "run()"3202 /// \warning Don't forget to put the \ref lemon::BpGraphReader::run() "run()" 3198 3203 /// to the end of the parameter list. 3199 3204 /// \relates BpGraphReader -
lemon/lgf_writer.h
r1198 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 186 186 ValueStorage(const Value& value, const Converter& converter = Converter()) 187 187 : _value(value), _converter(converter) {} 188 188 189 189 virtual std::string get() { 190 190 return _converter(_value); … … 945 945 /// \ingroup lemon_io 946 946 /// 947 /// \brief Return a \ref DigraphWriter class 948 /// 949 /// This function just returns a \ref DigraphWriter class. 947 /// \brief Return a \ref lemon::DigraphWriter "DigraphWriter" class 948 /// 949 /// This function just returns a \ref lemon::DigraphWriter 950 /// "DigraphWriter" class. 950 951 /// 951 952 /// With this function a digraph can be write to a file or output … … 968 969 ///\endcode 969 970 /// 970 /// For a complete documentation, please see the \ref DigraphWriter 971 /// For a complete documentation, please see the 972 /// \ref lemon::DigraphWriter "DigraphWriter" 971 973 /// class documentation. 972 /// \warning Don't forget to put the \ref DigraphWriter::run() "run()"974 /// \warning Don't forget to put the \ref lemon::DigraphWriter::run() "run()" 973 975 /// to the end of the parameter list. 974 976 /// \relates DigraphWriter … … 1584 1586 /// \ingroup lemon_io 1585 1587 /// 1586 /// \brief Return a \ref GraphWriterclass1587 /// 1588 /// This function just returns a \ref GraphWriterclass.1588 /// \brief Return a \ref lemon::GraphWriter "GraphWriter" class 1589 /// 1590 /// This function just returns a \ref lemon::GraphWriter "GraphWriter" class. 1589 1591 /// 1590 1592 /// With this function a graph can be write to a file or output … … 1603 1605 ///\endcode 1604 1606 /// 1605 /// For a complete documentation, please see the \ref GraphWriter 1607 /// For a complete documentation, please see the 1608 /// \ref lemon::GraphWriter "GraphWriter" 1606 1609 /// class documentation. 1607 /// \warning Don't forget to put the \ref GraphWriter::run() "run()"1610 /// \warning Don't forget to put the \ref lemon::GraphWriter::run() "run()" 1608 1611 /// to the end of the parameter list. 1609 1612 /// \relates GraphWriter … … 2402 2405 /// \ingroup lemon_io 2403 2406 /// 2404 /// \brief Return a \ref BpGraphWriter class 2405 /// 2406 /// This function just returns a \ref BpGraphWriter class. 2407 /// \brief Return a \ref lemon::BpGraphWriter "BpGraphWriter" class 2408 /// 2409 /// This function just returns a \ref lemon::BpGraphWriter 2410 /// "BpGraphWriter" class. 2407 2411 /// 2408 2412 /// With this function a bipartite graph can be write to a file or output … … 2421 2425 ///\endcode 2422 2426 /// 2423 /// For a complete documentation, please see the \ref BpGraphWriter 2427 /// For a complete documentation, please see the 2428 /// \ref lemon::BpGraphWriter "BpGraphWriter" 2424 2429 /// class documentation. 2425 /// \warning Don't forget to put the \ref BpGraphWriter::run() "run()"2430 /// \warning Don't forget to put the \ref lemon::BpGraphWriter::run() "run()" 2426 2431 /// to the end of the parameter list. 2427 2432 /// \relates BpGraphWriter -
lemon/list_graph.h
r1193 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 446 446 ///or changeTarget(), thus \c ArcIt and \c OutArcIt iterators are 447 447 ///invalidated for the outgoing arcs of node \c v and \c InArcIt 448 ///iterators are invalidated for the incom ming arcs of \c v.448 ///iterators are invalidated for the incoming arcs of \c v. 449 449 ///Moreover all iterators referencing node \c v or the removed 450 450 ///loops are also invalidated. Other iterators remain valid. … … 1766 1766 void next(BlueNode& node) const { 1767 1767 node.id = nodes[node.id].partition_next; 1768 } 1768 } 1769 1769 1770 1770 void first(Arc& e) const { -
lemon/lp.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 60 60 ///\ingroup lp_group 61 61 /// 62 ///Currently, the possible values are \c GLPK or \c CPLEX62 ///Currently, the possible values are \c GLPK, \c CPLEX or \c CBC 63 63 #define LEMON_DEFAULT_MIP SOLVER 64 64 ///The default MIP solver. … … 67 67 ///\ingroup lp_group 68 68 /// 69 ///Currently, it is either \c GlpkMip or \c CplexMip69 ///Currently, it is either \c GlpkMip, \c CplexMip , \c CbcMip 70 70 typedef GlpkMip Mip; 71 71 #else 72 #ifdef LEMON_HAVE_GLPK 73 # define LEMON_DEFAULT_LP GLPK 72 #if LEMON_DEFAULT_LP == GLPK 74 73 typedef GlpkLp Lp; 75 # define LEMON_DEFAULT_MIP GLPK 76 typedef GlpkMip Mip; 77 #elif LEMON_HAVE_CPLEX 78 # define LEMON_DEFAULT_LP CPLEX 74 #elif LEMON_DEFAULT_LP == CPLEX 79 75 typedef CplexLp Lp; 80 # define LEMON_DEFAULT_MIP CPLEX 76 #elif LEMON_DEFAULT_LP == SOPLEX 77 typedef SoplexLp Lp; 78 #elif LEMON_DEFAULT_LP == CLP 79 typedef ClpLp Lp; 80 #endif 81 #if LEMON_DEFAULT_MIP == GLPK 82 typedef GlpkLp Mip; 83 #elif LEMON_DEFAULT_MIP == CPLEX 81 84 typedef CplexMip Mip; 82 #elif LEMON_HAVE_SOPLEX 83 # define DEFAULT_LP SOPLEX 84 typedef SoplexLp Lp; 85 #elif LEMON_HAVE_CLP 86 # define DEFAULT_LP CLP 87 typedef ClpLp Lp; 85 #elif LEMON_DEFAULT_MIP == CBC 86 typedef CbcMip Mip; 88 87 #endif 89 88 #endif -
lemon/lp_base.cc
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/lp_base.h
r1143 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 1008 1008 public: 1009 1009 1010 ///Unsupported file format exception 1011 class UnsupportedFormatError : public Exception 1012 { 1013 std::string _format; 1014 mutable std::string _what; 1015 public: 1016 explicit UnsupportedFormatError(std::string format) throw() 1017 : _format(format) { } 1018 virtual ~UnsupportedFormatError() throw() {} 1019 virtual const char* what() const throw() { 1020 try { 1021 _what.clear(); 1022 std::ostringstream oss; 1023 oss << "lemon::UnsupportedFormatError: " << _format; 1024 _what = oss.str(); 1025 } 1026 catch (...) {} 1027 if (!_what.empty()) return _what.c_str(); 1028 else return "lemon::UnsupportedFormatError"; 1029 } 1030 }; 1031 1032 protected: 1033 virtual void _write(std::string, std::string format) const 1034 { 1035 throw UnsupportedFormatError(format); 1036 } 1037 1038 public: 1039 1010 1040 /// Virtual destructor 1011 1041 virtual ~LpBase() {} … … 1556 1586 void min() { _setSense(MIN); } 1557 1587 1558 ///Clear sthe problem1588 ///Clear the problem 1559 1589 void clear() { _clear(); rows.clear(); cols.clear(); } 1560 1590 1561 /// Set sthe message level of the solver1591 /// Set the message level of the solver 1562 1592 void messageLevel(MessageLevel level) { _messageLevel(level); } 1593 1594 /// Write the problem to a file in the given format 1595 1596 /// This function writes the problem to a file in the given format. 1597 /// Different solver backends may support different formats. 1598 /// Trying to write in an unsupported format will trigger 1599 /// \ref UnsupportedFormatError. For the supported formats, 1600 /// visit the documentation of the base class of the related backends 1601 /// (\ref CplexBase, \ref GlpkBase etc.) 1602 /// \param file The file path 1603 /// \param format The output file format. 1604 void write(std::string file, std::string format = "MPS") const 1605 { 1606 _write(file.c_str(),format.c_str()); 1607 } 1563 1608 1564 1609 ///@} -
lemon/lp_skeleton.cc
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 92 92 void SkeletonSolverBase::_messageLevel(MessageLevel) {} 93 93 94 void SkeletonSolverBase::_write(std::string, std::string) const {} 95 94 96 LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; } 95 97 -
lemon/lp_skeleton.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 145 145 ///\e 146 146 virtual void _messageLevel(MessageLevel); 147 148 ///\e 149 virtual void _write(std::string file, std::string format) const; 150 147 151 }; 148 152 … … 223 227 ///\e 224 228 virtual const char* _solverName() const; 229 225 230 }; 226 231 -
lemon/maps.h
r1057 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/matching.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/math.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 66 66 } 67 67 68 ///Round a value to its closest integer 69 inline double round(double r) { 70 return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5); 71 } 72 68 73 /// @} 69 74 70 75 } //namespace lemon 71 76 72 #endif //LEMON_ TOLERANCE_H77 #endif //LEMON_MATH_H -
lemon/max_cardinality_search.h
r1129 r1271 1 /* -*- C++-*-1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 2 * 3 * This file is a part of LEMON, a generic C++ optimization library 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 22 22 23 23 /// \ingroup search 24 /// \file 24 /// \file 25 25 /// \brief Maximum cardinality search in undirected digraphs. 26 26 … … 42 42 template <typename GR, typename CAP> 43 43 struct MaxCardinalitySearchDefaultTraits { 44 /// The digraph type the algorithm runs on. 44 /// The digraph type the algorithm runs on. 45 45 typedef GR Digraph; 46 46 … … 51 51 52 52 static CapacityMap *createCapacityMap(const Digraph& g) { 53 53 return new CapacityMap(g); 54 54 } 55 55 }; … … 61 61 62 62 static CapacityMap *createCapacityMap(const Digraph&) { 63 63 return new CapacityMap; 64 64 } 65 65 }; … … 91 91 /// \brief Instantiates a HeapCrossRef. 92 92 /// 93 /// This function instantiates a \ref HeapCrossRef. 94 /// \param digraph is the digraph, to which we would like to define the 93 /// This function instantiates a \ref HeapCrossRef. 94 /// \param digraph is the digraph, to which we would like to define the 95 95 /// HeapCrossRef. 96 96 static HeapCrossRef *createHeapCrossRef(const Digraph &digraph) { 97 97 return new HeapCrossRef(digraph); 98 98 } 99 99 100 100 template <typename CapacityMap> 101 101 struct HeapSelector { 102 102 template <typename Value, typename Ref> 103 struct Selector { 103 struct Selector { 104 104 typedef BinHeap<Value, Ref, std::greater<Value> > Heap; 105 105 }; … … 129 129 /// \brief Instantiates a Heap. 130 130 /// 131 /// This function instantiates a \ref Heap. 131 /// This function instantiates a \ref Heap. 132 132 /// \param crossref The cross reference of the heap. 133 133 static Heap *createHeap(HeapCrossRef& crossref) { … … 144 144 /// \brief Instantiates a ProcessedMap. 145 145 /// 146 /// This function instantiates a \ref ProcessedMap. 146 /// This function instantiates a \ref ProcessedMap. 147 147 /// \param digraph is the digraph, to which 148 148 /// we would like to define the \ref ProcessedMap … … 157 157 158 158 /// \brief The type of the map that stores the cardinalities of the nodes. 159 /// 159 /// 160 160 /// The type of the map that stores the cardinalities of the nodes. 161 161 /// It must meet the \ref concepts::WriteMap "WriteMap" concept. … … 164 164 /// \brief Instantiates a CardinalityMap. 165 165 /// 166 /// This function instantiates a \ref CardinalityMap. 167 /// \param digraph is the digraph, to which we would like to define the \ref168 /// CardinalityMap166 /// This function instantiates a \ref CardinalityMap. 167 /// \param digraph is the digraph, to which we would like to 168 /// define the \ref CardinalityMap 169 169 static CardinalityMap *createCardinalityMap(const Digraph &digraph) { 170 170 return new CardinalityMap(digraph); … … 173 173 174 174 }; 175 175 176 176 /// \ingroup search 177 177 /// 178 178 /// \brief Maximum Cardinality Search algorithm class. 179 179 /// 180 /// This class provides an efficient implementation of Maximum Cardinality 181 /// Search algorithm. The maximum cardinality search first chooses any 180 /// This class provides an efficient implementation of Maximum Cardinality 181 /// Search algorithm. The maximum cardinality search first chooses any 182 182 /// node of the digraph. Then every time it chooses one unprocessed node 183 /// with maximum cardinality, i.e the sum of capacities on out arcs to the nodes 183 /// with maximum cardinality, i.e the sum of capacities on out arcs 184 /// to the nodes 184 185 /// which were previusly processed. 185 186 /// If there is a cut in the digraph the algorithm should choose … … 187 188 188 189 /// The arc capacities are passed to the algorithm using a 189 /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any 190 /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any 190 191 /// kind of capacity. 191 192 /// 192 /// The type of the capacity is determined by the \ref 193 /// The type of the capacity is determined by the \ref 193 194 /// concepts::ReadMap::Value "Value" of the capacity map. 194 195 /// … … 197 198 /// 198 199 /// \param GR The digraph type the algorithm runs on. The value of 199 /// Digraph is not used directly by the search algorithm, it 200 /// Digraph is not used directly by the search algorithm, it 200 201 /// is only passed to \ref MaxCardinalitySearchDefaultTraits. 201 /// \param CAP This read-only ArcMap determines the capacities of 202 /// \param CAP This read-only ArcMap determines the capacities of 202 203 /// the arcs. It is read once for each arc, so the map may involve in 203 204 /// relatively time consuming process to compute the arc capacity if 204 205 /// it is necessary. The default map type is \ref 205 206 /// ConstMap "ConstMap<concepts::Digraph::Arc, Const<int,1> >". The value 206 /// of CapacityMap is not used directly by search algorithm, it is only 207 /// passed to \ref MaxCardinalitySearchDefaultTraits. 208 /// \param TR Traits class to set various data types used by the 209 /// algorithm. The default traits class is 210 /// \ref MaxCardinalitySearchDefaultTraits 211 /// "MaxCardinalitySearchDefaultTraits<GR, CAP>". 212 /// See \ref MaxCardinalitySearchDefaultTraits 207 /// of CapacityMap is not used directly by search algorithm, it is only 208 /// passed to \ref MaxCardinalitySearchDefaultTraits. 209 /// \param TR Traits class to set various data types used by the 210 /// algorithm. The default traits class is 211 /// \ref MaxCardinalitySearchDefaultTraits 212 /// "MaxCardinalitySearchDefaultTraits<GR, CAP>". 213 /// See \ref MaxCardinalitySearchDefaultTraits 213 214 /// for the documentation of a MaxCardinalitySearch traits class. 214 215 … … 216 217 template <typename GR, typename CAP, typename TR> 217 218 #else 218 template <typename GR, typename CAP = 219 220 typename TR = 219 template <typename GR, typename CAP = 220 ConstMap<typename GR::Arc, Const<int,1> >, 221 typename TR = 221 222 MaxCardinalitySearchDefaultTraits<GR, CAP> > 222 223 #endif … … 227 228 ///The type of the underlying digraph. 228 229 typedef typename Traits::Digraph Digraph; 229 230 230 231 ///The type of the capacity of the arcs. 231 232 typedef typename Traits::CapacityMap::Value Value; … … 267 268 268 269 typedef MaxCardinalitySearch Create; 269 270 270 271 ///\name Named template parameters 271 272 … … 276 277 typedef T CapacityMap; 277 278 static CapacityMap *createCapacityMap(const Digraph &) { 278 279 280 } 281 }; 282 /// \brief \ref named-templ-param "Named parameter" for setting 279 LEMON_ASSERT(false,"Uninitialized parameter."); 280 return 0; 281 } 282 }; 283 /// \brief \ref named-templ-param "Named parameter" for setting 283 284 /// CapacityMap type 284 285 /// … … 286 287 /// for the algorithm. 287 288 template <class T> 288 struct SetCapacityMap 289 : public MaxCardinalitySearch<Digraph, CapacityMap, 290 DefCapacityMapTraits<T> > { 291 typedef MaxCardinalitySearch<Digraph, CapacityMap, 289 struct SetCapacityMap 290 : public MaxCardinalitySearch<Digraph, CapacityMap, 291 DefCapacityMapTraits<T> > { 292 typedef MaxCardinalitySearch<Digraph, CapacityMap, 292 293 DefCapacityMapTraits<T> > Create; 293 294 }; … … 296 297 struct DefCardinalityMapTraits : public Traits { 297 298 typedef T CardinalityMap; 298 static CardinalityMap *createCardinalityMap(const Digraph &) 299 static CardinalityMap *createCardinalityMap(const Digraph &) 299 300 { 300 301 302 } 303 }; 304 /// \brief \ref named-templ-param "Named parameter" for setting 301 LEMON_ASSERT(false,"Uninitialized parameter."); 302 return 0; 303 } 304 }; 305 /// \brief \ref named-templ-param "Named parameter" for setting 305 306 /// CardinalityMap type 306 307 /// 307 /// \ref named-templ-param "Named parameter" for setting CardinalityMap 308 /// \ref named-templ-param "Named parameter" for setting CardinalityMap 308 309 /// type for the algorithm. 309 310 template <class T> 310 struct SetCardinalityMap 311 : public MaxCardinalitySearch<Digraph, CapacityMap, 312 DefCardinalityMapTraits<T> > { 313 typedef MaxCardinalitySearch<Digraph, CapacityMap, 311 struct SetCardinalityMap 312 : public MaxCardinalitySearch<Digraph, CapacityMap, 313 DefCardinalityMapTraits<T> > { 314 typedef MaxCardinalitySearch<Digraph, CapacityMap, 314 315 DefCardinalityMapTraits<T> > Create; 315 316 }; 316 317 317 318 template <class T> 318 319 struct DefProcessedMapTraits : public Traits { 319 320 typedef T ProcessedMap; 320 321 static ProcessedMap *createProcessedMap(const Digraph &) { 321 322 323 } 324 }; 325 /// \brief \ref named-templ-param "Named parameter" for setting 322 LEMON_ASSERT(false,"Uninitialized parameter."); 323 return 0; 324 } 325 }; 326 /// \brief \ref named-templ-param "Named parameter" for setting 326 327 /// ProcessedMap type 327 328 /// … … 329 330 /// for the algorithm. 330 331 template <class T> 331 struct SetProcessedMap 332 : public MaxCardinalitySearch<Digraph, CapacityMap, 333 DefProcessedMapTraits<T> > { 334 typedef MaxCardinalitySearch<Digraph, CapacityMap, 332 struct SetProcessedMap 333 : public MaxCardinalitySearch<Digraph, CapacityMap, 334 DefProcessedMapTraits<T> > { 335 typedef MaxCardinalitySearch<Digraph, CapacityMap, 335 336 DefProcessedMapTraits<T> > Create; 336 337 }; 337 338 338 339 template <class H, class CR> 339 340 struct DefHeapTraits : public Traits { … … 341 342 typedef H Heap; 342 343 static HeapCrossRef *createHeapCrossRef(const Digraph &) { 343 344 344 LEMON_ASSERT(false,"Uninitialized parameter."); 345 return 0; 345 346 } 346 347 static Heap *createHeap(HeapCrossRef &) { 347 348 349 } 350 }; 351 /// \brief \ref named-templ-param "Named parameter" for setting heap 348 LEMON_ASSERT(false,"Uninitialized parameter."); 349 return 0; 350 } 351 }; 352 /// \brief \ref named-templ-param "Named parameter" for setting heap 352 353 /// and cross reference type 353 354 /// 354 /// \ref named-templ-param "Named parameter" for setting heap and cross 355 /// \ref named-templ-param "Named parameter" for setting heap and cross 355 356 /// reference type for the algorithm. 356 357 template <class H, class CR = typename Digraph::template NodeMap<int> > 357 358 struct SetHeap 358 : public MaxCardinalitySearch<Digraph, CapacityMap, 359 DefHeapTraits<H, CR> > { 360 typedef MaxCardinalitySearch< Digraph, CapacityMap, 359 : public MaxCardinalitySearch<Digraph, CapacityMap, 360 DefHeapTraits<H, CR> > { 361 typedef MaxCardinalitySearch< Digraph, CapacityMap, 361 362 DefHeapTraits<H, CR> > Create; 362 363 }; … … 367 368 typedef H Heap; 368 369 static HeapCrossRef *createHeapCrossRef(const Digraph &digraph) { 369 370 return new HeapCrossRef(digraph); 370 371 } 371 372 static Heap *createHeap(HeapCrossRef &crossref) { 372 373 } 374 }; 375 376 /// \brief \ref named-templ-param "Named parameter" for setting heap and 373 return new Heap(crossref); 374 } 375 }; 376 377 /// \brief \ref named-templ-param "Named parameter" for setting heap and 377 378 /// cross reference type with automatic allocation 378 379 /// 379 /// \ref named-templ-param "Named parameter" for setting heap and cross 380 /// reference type. It can allocate the heap and the cross reference 381 /// object if the cross reference's constructor waits for the digraph as 380 /// \ref named-templ-param "Named parameter" for setting heap and cross 381 /// reference type. It can allocate the heap and the cross reference 382 /// object if the cross reference's constructor waits for the digraph as 382 383 /// parameter and the heap's constructor waits for the cross reference. 383 384 template <class H, class CR = typename Digraph::template NodeMap<int> > 384 385 struct SetStandardHeap 385 : public MaxCardinalitySearch<Digraph, CapacityMap, 386 DefStandardHeapTraits<H, CR> > { 387 typedef MaxCardinalitySearch<Digraph, CapacityMap, 388 DefStandardHeapTraits<H, CR> > 386 : public MaxCardinalitySearch<Digraph, CapacityMap, 387 DefStandardHeapTraits<H, CR> > { 388 typedef MaxCardinalitySearch<Digraph, CapacityMap, 389 DefStandardHeapTraits<H, CR> > 389 390 Create; 390 391 }; 391 392 392 393 ///@} 393 394 … … 397 398 MaxCardinalitySearch() {} 398 399 399 public: 400 400 public: 401 401 402 /// \brief Constructor. 402 403 /// … … 404 405 ///\param capacity the capacity map used by the algorithm. 405 406 MaxCardinalitySearch(const Digraph& digraph, 406 407 const CapacityMap& capacity) : 407 408 _graph(&digraph), 408 409 _capacity(&capacity), local_capacity(false), … … 442 443 MaxCardinalitySearch &capacityMap(const CapacityMap &m) { 443 444 if (local_capacity) { 444 445 445 delete _capacity; 446 local_capacity=false; 446 447 } 447 448 _capacity=&m; … … 457 458 } 458 459 459 /// \brief Sets the map storing the cardinalities calculated by the 460 /// \brief Sets the map storing the cardinalities calculated by the 460 461 /// algorithm. 461 462 /// … … 467 468 MaxCardinalitySearch &cardinalityMap(CardinalityMap &m) { 468 469 if(local_cardinality) { 469 470 470 delete _cardinality; 471 local_cardinality=false; 471 472 } 472 473 _cardinality = &m; … … 481 482 /// automatically allocated map, of course. 482 483 /// \return <tt> (*this) </tt> 483 MaxCardinalitySearch &processedMap(ProcessedMap &m) 484 MaxCardinalitySearch &processedMap(ProcessedMap &m) 484 485 { 485 486 if(local_processed) { 486 487 487 delete _processed; 488 local_processed=false; 488 489 } 489 490 _processed = &m; … … 508 509 MaxCardinalitySearch &heap(Heap& hp, HeapCrossRef &cr) { 509 510 if(local_heap_cross_ref) { 510 511 511 delete _heap_cross_ref; 512 local_heap_cross_ref = false; 512 513 } 513 514 _heap_cross_ref = &cr; 514 515 if(local_heap) { 515 516 516 delete _heap; 517 local_heap = false; 517 518 } 518 519 _heap = &hp; … … 545 546 void create_maps() { 546 547 if(!_capacity) { 547 548 548 local_capacity = true; 549 _capacity = Traits::createCapacityMap(*_graph); 549 550 } 550 551 if(!_cardinality) { 551 552 552 local_cardinality = true; 553 _cardinality = Traits::createCardinalityMap(*_graph); 553 554 } 554 555 if(!_processed) { 555 556 556 local_processed = true; 557 _processed = Traits::createProcessedMap(*_graph); 557 558 } 558 559 if (!_heap_cross_ref) { 559 560 560 local_heap_cross_ref = true; 561 _heap_cross_ref = Traits::createHeapCrossRef(*_graph); 561 562 } 562 563 if (!_heap) { 563 564 565 } 566 } 567 564 local_heap = true; 565 _heap = Traits::createHeap(*_heap_cross_ref); 566 } 567 } 568 568 569 void finalizeNodeData(Node node, Value capacity) { 569 570 _processed->set(node, true); … … 590 591 _heap->clear(); 591 592 for (NodeIt it(*_graph) ; it != INVALID ; ++it) { 592 593 594 } 595 } 596 593 _processed->set(it, false); 594 _heap_cross_ref->set(it, Heap::PRE_HEAP); 595 } 596 } 597 597 598 /// \brief Adds a new source node. 598 /// 599 /// 599 600 /// Adds a new source node to the priority heap. 600 601 /// … … 602 603 void addSource(Node source, Value capacity = 0) { 603 604 if(_heap->state(source) == Heap::PRE_HEAP) { 604 605 } 606 } 607 605 _heap->push(source, capacity); 606 } 607 } 608 608 609 /// \brief Processes the next node in the priority heap 609 610 /// … … 614 615 /// \warning The priority heap must not be empty! 615 616 Node processNextNode() { 616 Node node = _heap->top(); 617 Node node = _heap->top(); 617 618 finalizeNodeData(node, _heap->prio()); 618 619 _heap->pop(); 619 620 620 621 for (InArcIt it(*_graph, node); it != INVALID; ++it) { 621 622 623 624 625 626 627 628 629 630 631 622 Node source = _graph->source(it); 623 switch (_heap->state(source)) { 624 case Heap::PRE_HEAP: 625 _heap->push(source, (*_capacity)[it]); 626 break; 627 case Heap::IN_HEAP: 628 _heap->decrease(source, (*_heap)[source] + (*_capacity)[it]); 629 break; 630 case Heap::POST_HEAP: 631 break; 632 } 632 633 } 633 634 return node; … … 638 639 /// Next node to be processed. 639 640 /// 640 /// \return The next node to be processed or INVALID if the 641 /// \return The next node to be processed or INVALID if the 641 642 /// priority heap is empty. 642 Node nextNode() { 643 Node nextNode() { 643 644 return !_heap->empty() ? _heap->top() : INVALID; 644 645 } 645 646 646 647 /// \brief Returns \c false if there are nodes 647 648 /// to be processed in the priority heap … … 650 651 /// to be processed in the priority heap 651 652 bool emptyQueue() { return _heap->empty(); } 652 /// \brief Returns the number of the nodes to be processed 653 /// \brief Returns the number of the nodes to be processed 653 654 /// in the priority heap 654 655 /// 655 656 /// Returns the number of the nodes to be processed in the priority heap 656 657 int emptySize() { return _heap->size(); } 657 658 658 659 /// \brief Executes the algorithm. 659 660 /// … … 663 664 /// with addSource() before using this function. 664 665 /// 665 /// This method runs the Maximum Cardinality Search algorithm from the 666 /// This method runs the Maximum Cardinality Search algorithm from the 666 667 /// source node(s). 667 668 void start() { 668 669 while ( !_heap->empty() ) processNextNode(); 669 670 } 670 671 671 672 /// \brief Executes the algorithm until \c dest is reached. 672 673 /// … … 676 677 /// with addSource() before using this function. 677 678 /// 678 /// This method runs the %MaxCardinalitySearch algorithm from the source 679 /// This method runs the %MaxCardinalitySearch algorithm from the source 679 680 /// nodes. 680 681 void start(Node dest) { … … 682 683 if ( !_heap->empty() ) finalizeNodeData(_heap->top(), _heap->prio()); 683 684 } 684 685 685 686 /// \brief Executes the algorithm until a condition is met. 686 687 /// … … 697 698 if ( !_heap->empty() ) finalizeNodeData(_heap->top(),_heap->prio()); 698 699 } 699 700 700 701 /// \brief Runs the maximum cardinality search algorithm from node \c s. 701 702 /// 702 /// This method runs the %MaxCardinalitySearch algorithm from a root 703 /// This method runs the %MaxCardinalitySearch algorithm from a root 703 704 /// node \c s. 704 705 /// … … 715 716 } 716 717 717 /// \brief Runs the maximum cardinality search algorithm for the 718 /// \brief Runs the maximum cardinality search algorithm for the 718 719 /// whole digraph. 719 720 /// 720 /// This method runs the %MaxCardinalitySearch algorithm from all 721 /// This method runs the %MaxCardinalitySearch algorithm from all 721 722 /// unprocessed node of the digraph. 722 723 /// … … 740 741 } 741 742 } 742 743 743 744 ///@} 744 745 745 746 /// \name Query Functions 746 /// The results of the maximum cardinality search algorithm can be 747 /// The results of the maximum cardinality search algorithm can be 747 748 /// obtained using these functions. 748 749 /// \n 749 /// Before the use of these functions, either run() or start() must be 750 /// Before the use of these functions, either run() or start() must be 750 751 /// called. 751 752 752 753 ///@{ 753 754 … … 768 769 /// \brief Returns a reference to the NodeMap of cardinalities. 769 770 /// 770 /// Returns a reference to the NodeMap of cardinalities. \pre \ref run() 771 /// Returns a reference to the NodeMap of cardinalities. \pre \ref run() 771 772 /// must be called before using this function. 772 773 const CardinalityMap &cardinalityMap() const { return *_cardinality;} 773 774 774 775 /// \brief Checks if a node is reachable from the root. 775 776 /// … … 785 786 /// \pre \ref run() must be called before using this function. 786 787 bool processed(Node v) { return (*_heap_cross_ref)[v] == Heap::POST_HEAP; } 787 788 788 789 ///@} 789 790 }; -
lemon/min_cost_arborescence.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 102 102 /// the minimum cost subgraph that is the union of arborescences with the 103 103 /// given sources and spans all the nodes which are reachable from the 104 /// sources. The time complexity of the algorithm is O(n<sup>2</sup>+ e).104 /// sources. The time complexity of the algorithm is O(n<sup>2</sup>+m). 105 105 /// 106 106 /// The algorithm also provides an optimal dual solution, therefore … … 129 129 public: 130 130 131 /// \brief The \ref MinCostArborescenceDefaultTraits "traits class"131 /// \brief The \ref lemon::MinCostArborescenceDefaultTraits "traits class" 132 132 /// of the algorithm. 133 133 typedef TR Traits; -
lemon/nagamochi_ibaraki.h
r1130 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 304 304 //This is here to avoid a gcc-3.3 compilation error. 305 305 //It should never be called. 306 NagamochiIbaraki() {} 307 306 NagamochiIbaraki() {} 307 308 308 public: 309 309 … … 415 415 for (typename Graph::OutArcIt a(_graph, n); a != INVALID; ++a) { 416 416 typename Graph::Node m = _graph.target(a); 417 417 418 418 if (!(n < m)) continue; 419 419 420 420 (*_nodes)[n].sum += (*_capacity)[a]; 421 421 (*_nodes)[m].sum += (*_capacity)[a]; 422 422 423 423 int c = (*_nodes)[m].curr_arc; 424 424 if (c != -1 && _arcs[c ^ 1].target == n) { … … 426 426 } else { 427 427 _edges[index].capacity = (*_capacity)[a]; 428 428 429 429 _arcs[index << 1].prev = -1; 430 430 if ((*_nodes)[n].first_arc != -1) { … … 436 436 437 437 (*_nodes)[m].curr_arc = (index << 1); 438 438 439 439 _arcs[(index << 1) | 1].prev = -1; 440 440 if ((*_nodes)[m].first_arc != -1) { … … 444 444 (*_nodes)[m].first_arc = ((index << 1) | 1); 445 445 _arcs[(index << 1) | 1].target = n; 446 446 447 447 ++index; 448 448 } … … 453 453 _min_cut = std::numeric_limits<Value>::max(); 454 454 455 for (typename Graph::Node n = _first_node; 455 for (typename Graph::Node n = _first_node; 456 456 n != INVALID; n = (*_nodes)[n].next) { 457 457 if ((*_nodes)[n].sum < _min_cut) { … … 478 478 479 479 _heap->clear(); 480 for (typename Graph::Node n = _first_node; 480 for (typename Graph::Node n = _first_node; 481 481 n != INVALID; n = (*_nodes)[n].next) { 482 482 (*_heap_cross_ref)[n] = Heap::PRE_HEAP; … … 498 498 for (int a = (*_nodes)[n].first_arc; a != -1; a = _arcs[a].next) { 499 499 switch (_heap->state(_arcs[a].target)) { 500 case Heap::PRE_HEAP: 500 case Heap::PRE_HEAP: 501 501 { 502 502 Value nv = _edges[a >> 1].capacity; … … 564 564 if (!merged) { 565 565 for (int b = (*_nodes)[n].first_arc; b != -1; b = _arcs[b].next) { 566 (*_nodes)[_arcs[b].target].curr_arc = b; 566 (*_nodes)[_arcs[b].target].curr_arc = b; 567 567 } 568 568 merged = true; … … 574 574 if ((b ^ a) == 1) continue; 575 575 typename Graph::Node o = _arcs[b].target; 576 int c = (*_nodes)[o].curr_arc; 576 int c = (*_nodes)[o].curr_arc; 577 577 if (c != -1 && _arcs[c ^ 1].target == n) { 578 578 _edges[c >> 1].capacity += _edges[b >> 1].capacity; … … 607 607 } else { 608 608 (*_nodes)[n].first_arc = _arcs[a].next; 609 } 609 } 610 610 if (_arcs[a].next != -1) { 611 611 _arcs[_arcs[a].next].prev = _arcs[a].prev; … … 615 615 (*_next_rep)[(*_nodes)[n].last_rep] = m; 616 616 (*_nodes)[n].last_rep = (*_nodes)[m].last_rep; 617 617 618 618 if ((*_nodes)[m].prev != INVALID) { 619 619 (*_nodes)[(*_nodes)[m].prev].next = (*_nodes)[m].next; -
lemon/nearest_neighbor_tsp.h
r1205 r1294 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 116 116 for (IncEdgeIt e(_gr, n1); e != INVALID; ++e) { 117 117 if (!used[_gr.runningNode(e)] && 118 ( _cost[e] < _cost[min_edge1] || min_edge1 == INVALID)) {118 (min_edge1 == INVALID || _cost[e] < _cost[min_edge1])) { 119 119 min_edge1 = e; 120 120 } … … 125 125 for (IncEdgeIt e(_gr, n2); e != INVALID; ++e) { 126 126 if (!used[_gr.runningNode(e)] && 127 ( _cost[e] < _cost[min_edge2] || min_edge2 == INVALID)) {127 (min_edge2 == INVALID||_cost[e] < _cost[min_edge2])) { 128 128 min_edge2 = e; 129 129 } … … 216 216 /// 217 217 /// This function copies the found tour as a list of arcs/edges into 218 /// the given \ref concept::Path "path structure".218 /// the given \ref lemon::concepts::Path "path structure". 219 219 /// 220 220 /// \pre run() must be called before using this function. -
lemon/network_simplex.h
r1297 r1298 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 42 42 /// \ref NetworkSimplex implements the primal Network Simplex algorithm 43 43 /// for finding a \ref min_cost_flow "minimum cost flow" 44 /// \ ref amo93networkflows, \refdantzig63linearprog,45 /// \ refkellyoneill91netsimplex.44 /// \cite amo93networkflows, \cite dantzig63linearprog, 45 /// \cite kellyoneill91netsimplex. 46 46 /// This algorithm is a highly efficient specialized version of the 47 47 /// linear programming simplex method directly for the minimum cost … … 974 974 /// 975 975 /// This function returns the total cost of the found flow. 976 /// Its complexity is O( e).976 /// Its complexity is O(m). 977 977 /// 978 978 /// \note The return type of the function can be specified as a … … 1235 1235 return true; 1236 1236 } 1237 1237 1238 1238 // Check if the upper bound is greater than or equal to the lower bound 1239 1239 // on each arc. … … 1517 1517 } 1518 1518 } else { 1519 // Find the min. cost incom ming arc for each demand node1519 // Find the min. cost incoming arc for each demand node 1520 1520 for (int i = 0; i != int(demand_nodes.size()); ++i) { 1521 1521 Node v = demand_nodes[i]; -
lemon/opt2_tsp.h
r1205 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 253 253 /// 254 254 /// This function copies the found tour as a list of arcs/edges into 255 /// the given \ref concept::Path "path structure".255 /// the given \ref lemon::concepts::Path "path structure". 256 256 /// 257 257 /// \pre run() must be called before using this function. -
lemon/path.h
r1162 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 318 318 /// Constructor with starting point 319 319 ArcIt(const SimplePath &_path, int _idx) 320 : idx(_idx), path(&_path) {}320 : path(&_path), idx(_idx) {} 321 321 322 322 public: -
lemon/planarity.h
r1160 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/preflow.h
r1111 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 103 103 /// This class provides an implementation of Goldberg-Tarjan's \e preflow 104 104 /// \e push-relabel algorithm producing a \ref max_flow 105 /// "flow of maximum value" in a digraph \ refclrs01algorithms,106 /// \ ref amo93networkflows, \refgoldberg88newapproach.105 /// "flow of maximum value" in a digraph \cite clrs01algorithms, 106 /// \cite amo93networkflows, \cite goldberg88newapproach. 107 107 /// The preflow algorithms are the fastest known maximum 108 108 /// flow algorithms. The current implementation uses a mixture of the 109 109 /// \e "highest label" and the \e "bound decrease" heuristics. 110 /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{ e})\f$.110 /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{m})\f$. 111 111 /// 112 112 /// The algorithm consists of two phases. After the first phase … … 135 135 public: 136 136 137 ///The \ref PreflowDefaultTraits "traits class" of the algorithm.137 ///The \ref lemon::PreflowDefaultTraits "traits class" of the algorithm. 138 138 typedef TR Traits; 139 139 ///The type of the digraph the algorithm runs on. … … 555 555 } 556 556 } 557 for (NodeIt n(_graph); n != INVALID; ++n) 557 for (NodeIt n(_graph); n != INVALID; ++n) 558 558 if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n])) 559 559 _level->activate(n); 560 560 561 561 return true; 562 562 } … … 586 586 level = _level->highestActiveLevel(); 587 587 --num; 588 588 589 589 Value excess = (*_excess)[n]; 590 590 int new_level = _level->maxLevel(); -
lemon/radix_sort.h
r1210 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/smart_graph.h
r1193 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 1264 1264 max_red = -1; 1265 1265 } 1266 Parent::notifier(RedNode()).erase(asRedNodeUnsafe(node)); 1266 Parent::notifier(RedNode()).erase(asRedNodeUnsafe(node)); 1267 1267 } else { 1268 1268 first_blue = nodes[n].partition_next; -
lemon/soplex.cc
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/soplex.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/suurballe.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 138 138 typedef typename TR::Heap Heap; 139 139 140 /// The \ref SuurballeDefaultTraits "traits class" of the algorithm.140 /// The \ref lemon::SuurballeDefaultTraits "traits class" of the algorithm. 141 141 typedef TR Traits; 142 142 … … 683 683 /// This function returns the total length of the found paths, i.e. 684 684 /// the total cost of the found flow. 685 /// The complexity of the function is O( e).685 /// The complexity of the function is O(m). 686 686 /// 687 687 /// \pre \ref run() or \ref findFlow() must be called before using -
lemon/time_measure.h
r833 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 35 35 #include <fstream> 36 36 #include <iostream> 37 #include <lemon/math.h> 37 38 38 39 namespace lemon { … … 64 65 double rtime; 65 66 67 public: 68 ///Display format specifier 69 70 ///\e 71 /// 72 enum Format { 73 /// Reports all measured values 74 NORMAL = 0, 75 /// Only real time and an error indicator is displayed 76 SHORT = 1 77 }; 78 79 private: 80 static Format _format; 81 66 82 void _reset() { 67 83 utime = stime = cutime = cstime = rtime = 0; … … 69 85 70 86 public: 87 88 ///Set output format 89 90 ///Set output format. 91 /// 92 ///The output format is global for all timestamp instances. 93 static void format(Format f) { _format = f; } 94 ///Retrieve the current output format 95 96 ///Retrieve the current output format 97 /// 98 ///The output format is global for all timestamp instances. 99 static Format format() { return _format; } 100 71 101 72 102 ///Read the current time values of the process … … 225 255 inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t) 226 256 { 227 os << "u: " << t.userTime() << 228 "s, s: " << t.systemTime() << 229 "s, cu: " << t.cUserTime() << 230 "s, cs: " << t.cSystemTime() << 231 "s, real: " << t.realTime() << "s"; 257 switch(t._format) 258 { 259 case TimeStamp::NORMAL: 260 os << "u: " << t.userTime() << 261 "s, s: " << t.systemTime() << 262 "s, cu: " << t.cUserTime() << 263 "s, cs: " << t.cSystemTime() << 264 "s, real: " << t.realTime() << "s"; 265 break; 266 case TimeStamp::SHORT: 267 double total = t.userTime()+t.systemTime()+ 268 t.cUserTime()+t.cSystemTime(); 269 os << t.realTime() 270 << "s (err: " << round((t.realTime()-total)/ 271 t.realTime()*10000)/100 272 << "%)"; 273 break; 274 } 232 275 return os; 233 276 } … … 469 512 std::string _title; 470 513 std::ostream &_os; 514 bool _active; 471 515 public: 472 516 ///Constructor … … 476 520 ///\param os The stream to print the report to. 477 521 ///\param run Sets whether the timer should start immediately. 478 TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true) 479 : Timer(run), _title(title), _os(os){} 522 ///\param active Sets whether the report should actually be printed 523 /// on destruction. 524 TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true, 525 bool active=true) 526 : Timer(run), _title(title), _os(os), _active(active) {} 480 527 ///Destructor that prints the ellapsed time 481 528 ~TimeReport() 482 529 { 483 _os << _title << *this << std::endl; 484 } 530 if(_active) _os << _title << *this << std::endl; 531 } 532 533 ///Retrieve the activity status 534 535 ///\e 536 /// 537 bool active() const { return _active; } 538 ///Set the activity status 539 540 /// This function set whether the time report should actually be printed 541 /// on destruction. 542 void active(bool a) { _active=a; } 485 543 }; 486 544 -
lemon/unionfind.h
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/CMakeLists.txt
r1206 r1264 42 42 max_cardinality_search_test 43 43 max_clique_test 44 max_flow_test 44 45 min_cost_arborescence_test 45 46 min_cost_flow_test … … 48 49 path_test 49 50 planarity_test 50 preflow_test51 51 radix_sort_test 52 52 random_test … … 70 70 ENDIF() 71 71 IF(LEMON_HAVE_CPLEX) 72 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${ CPLEX_LIBRARIES})72 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${ILOG_LIBRARIES}) 73 73 ENDIF() 74 74 IF(LEMON_HAVE_CLP) 75 75 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) 76 ENDIF() 77 IF(LEMON_HAVE_SOPLEX) 78 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${SOPLEX_LIBRARIES}) 76 79 ENDIF() 77 80 … … 94 97 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 95 98 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD 96 COMMAND ${CMAKE_COMMAND} -E copy ${ CPLEX_BIN_DIR}/cplex.dll${TARGET_PATH}99 COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH} 97 100 ) 98 101 ENDIF() … … 112 115 ENDIF() 113 116 IF(LEMON_HAVE_CPLEX) 114 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${ CPLEX_LIBRARIES})117 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${ILOG_LIBRARIES}) 115 118 ENDIF() 116 119 IF(LEMON_HAVE_CBC) … … 136 139 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 137 140 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD 138 COMMAND ${CMAKE_COMMAND} -E copy ${ CPLEX_BIN_DIR}/cplex.dll${TARGET_PATH}141 COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH} 139 142 ) 140 143 ENDIF() -
test/adaptors_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 66 66 Digraph::Arc a2 = digraph.addArc(n1, n3); 67 67 Digraph::Arc a3 = digraph.addArc(n2, n3); 68 ignore_unused_variable_warning(a3);68 ::lemon::ignore_unused_variable_warning(a3); 69 69 70 70 // Check the adaptor … … 101 101 Adaptor::Arc a7 = adaptor.addArc(n1, n4); 102 102 Adaptor::Arc a8 = adaptor.addArc(n1, n2); 103 ignore_unused_variable_warning(a6,a7,a8);103 ::lemon::ignore_unused_variable_warning(a6,a7,a8); 104 104 105 105 adaptor.erase(a1); … … 761 761 Digraph::Arc a2 = digraph.addArc(n1, n3); 762 762 Digraph::Arc a3 = digraph.addArc(n2, n3); 763 ignore_unused_variable_warning(a1,a2,a3);763 ::lemon::ignore_unused_variable_warning(a1,a2,a3); 764 764 765 765 checkGraphNodeList(adaptor, 6); -
test/arc_look_up_test.cc
r1149 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 69 69 std::istringstream lgfs(lgf); 70 70 DigraphReader<ListDigraph>(graph, lgfs).run(); 71 71 72 72 AllArcLookUp<ListDigraph> lookup(graph); 73 73 74 74 int numArcs = countArcs(graph); 75 75 76 76 int arcCnt = 0; 77 77 for(ListDigraph::NodeIt n1(graph); n1 != INVALID; ++n1) 78 78 for(ListDigraph::NodeIt n2(graph); n2 != INVALID; ++n2) 79 79 for(ListDigraph::Arc a = lookup(n1, n2); a != INVALID; 80 81 80 a = lookup(n1, n2, a)) 81 ++arcCnt; 82 82 check(arcCnt==numArcs, "Wrong total number of arcs"); 83 83 -
test/bellman_ford_test.cc
r1174 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 66 66 Arc e; 67 67 Value l; 68 ignore_unused_variable_warning(l);68 ::lemon::ignore_unused_variable_warning(l); 69 69 int k=3; 70 70 bool b; 71 ignore_unused_variable_warning(b);71 ::lemon::ignore_unused_variable_warning(b); 72 72 BF::DistMap d(gr); 73 73 BF::PredMap p(gr); … … 150 150 Digraph g; 151 151 bool b; 152 ignore_unused_variable_warning(b);152 ::lemon::ignore_unused_variable_warning(b); 153 153 154 154 bellmanFord(g,LengthMap()).run(Node()); -
test/bfs_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 62 62 Arc e; 63 63 int l, i; 64 ignore_unused_variable_warning(l,i);64 ::lemon::ignore_unused_variable_warning(l,i); 65 65 bool b; 66 66 BType::DistMap d(G); … … 152 152 Digraph g; 153 153 bool b; 154 ignore_unused_variable_warning(b);154 ::lemon::ignore_unused_variable_warning(b); 155 155 156 156 bfs(g).run(Node()); -
test/bpgraph_test.cc
r1194 r1292 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 79 79 e2 = G.addEdge(bn1, rn1), 80 80 e3 = G.addEdge(rn1, bn2); 81 ::lemon::ignore_unused_variable_warning(e2,e3); 81 82 82 83 checkGraphNodeList(G, 3); … … 114 115 BpGraph G; 115 116 RedNode 116 n1 = G.addRedNode(), n4 = G.addRedNode(); 117 n1 = G.addRedNode(), n4 = G.addRedNode(); 117 118 BlueNode 118 119 n2 = G.addBlueNode(), n3 = G.addBlueNode(); … … 120 121 e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3), 121 122 e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3); 123 ::lemon::ignore_unused_variable_warning(e1,e3,e4); 122 124 123 125 // Check edge deletion … … 162 164 BpGraph G; 163 165 RedNode 164 n1 = G.addRedNode(), n4 = G.addRedNode(); 166 n1 = G.addRedNode(), n4 = G.addRedNode(); 165 167 BlueNode 166 168 n2 = G.addBlueNode(), n3 = G.addBlueNode(); … … 168 170 e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3), 169 171 e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3); 172 ::lemon::ignore_unused_variable_warning(e1,e3,e4); 170 173 171 174 G.changeRed(e2, n4); … … 217 220 n2 = G.addBlueNode(), 218 221 n3 = G.addBlueNode(); 219 Edge 222 Edge 220 223 e1 = G.addEdge(n1, n2), 221 224 e2 = G.addEdge(n1, n3); 225 ::lemon::ignore_unused_variable_warning(e1,e2); 222 226 223 227 checkGraphNodeList(G, 3); … … 305 309 e1 = g.addEdge(n1, n2), 306 310 e2 = g.addEdge(n1, n3); 311 ::lemon::ignore_unused_variable_warning(e2); 307 312 308 313 check(g.valid(n1), "Wrong validity check"); -
test/circulation_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 74 74 VType v; 75 75 bool b; 76 ignore_unused_variable_warning(v,b);76 ::lemon::ignore_unused_variable_warning(v,b); 77 77 78 78 typedef Circulation<Digraph, CapMap, CapMap, SupplyMap> … … 105 105 const_circ_test.barrierMap(bar); 106 106 107 ignore_unused_variable_warning(fm);107 ::lemon::ignore_unused_variable_warning(fm); 108 108 } 109 109 -
test/connectivity_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 69 69 Graph g(d); 70 70 Digraph::Node n = d.addNode(); 71 ignore_unused_variable_warning(n);71 ::lemon::ignore_unused_variable_warning(n); 72 72 73 73 check(stronglyConnected(d), "This digraph is strongly connected"); … … 98 98 check(simpleGraph(g), "This graph is simple."); 99 99 } 100 101 { 102 ListGraph g; 103 ListGraph::NodeMap<bool> map(g); 104 105 ListGraph::Node n1 = g.addNode(); 106 ListGraph::Node n2 = g.addNode(); 107 108 ListGraph::Edge e1 = g.addEdge(n1, n2); 109 ::lemon::ignore_unused_variable_warning(e1); 110 check(biNodeConnected(g), "Graph is bi-node-connected"); 111 112 ListGraph::Node n3 = g.addNode(); 113 ::lemon::ignore_unused_variable_warning(n3); 114 check(!biNodeConnected(g), "Graph is not bi-node-connected"); 115 } 116 100 117 101 118 { … … 247 264 Digraph::Node watch = d.addNode(); 248 265 Digraph::Node pants = d.addNode(); 249 ignore_unused_variable_warning(watch);266 ::lemon::ignore_unused_variable_warning(watch); 250 267 251 268 d.addArc(socks, shoe); -
test/dfs_test.cc
r1176 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 68 68 int l, i; 69 69 bool b; 70 ignore_unused_variable_warning(l,i,b);70 ::lemon::ignore_unused_variable_warning(l,i,b); 71 71 72 72 DType::DistMap d(G); … … 154 154 Digraph g; 155 155 bool b; 156 ignore_unused_variable_warning(b);156 ::lemon::ignore_unused_variable_warning(b); 157 157 158 158 dfs(g).run(Node()); … … 224 224 check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); 225 225 } 226 226 227 227 { 228 228 NullMap<Node,Arc> myPredMap; -
test/digraph_test.cc
r1160 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 65 65 a3 = G.addArc(n2, n3), 66 66 a4 = G.addArc(n2, n3); 67 ignore_unused_variable_warning(a2,a3,a4);67 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 68 68 69 69 checkGraphNodeList(G, 3); … … 94 94 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 95 95 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 96 ignore_unused_variable_warning(a1,a2,a3,a4);96 ::lemon::ignore_unused_variable_warning(a1,a2,a3,a4); 97 97 98 98 Node n4 = G.split(n2); … … 128 128 a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3), 129 129 a5 = G.addArc(n2, n4); 130 ignore_unused_variable_warning(a1,a2,a3,a5);130 ::lemon::ignore_unused_variable_warning(a1,a2,a3,a5); 131 131 132 132 checkGraphNodeList(G, 4); … … 208 208 a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1), 209 209 a5 = G.addArc(n2, n4); 210 ignore_unused_variable_warning(a2,a3,a4,a5);210 ::lemon::ignore_unused_variable_warning(a2,a3,a4,a5); 211 211 212 212 // Check arc deletion … … 256 256 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 257 257 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 258 ignore_unused_variable_warning(a1,a2,a3,a4);258 ::lemon::ignore_unused_variable_warning(a1,a2,a3,a4); 259 259 260 260 typename Digraph::Snapshot snapshot(G); … … 357 357 e1 = g.addArc(n1, n2), 358 358 e2 = g.addArc(n2, n3); 359 ignore_unused_variable_warning(e2);359 ::lemon::ignore_unused_variable_warning(e2); 360 360 361 361 check(g.valid(n1), "Wrong validity check"); … … 443 443 a3 = g.addArc(n2, n3), 444 444 a4 = g.addArc(n2, n3); 445 ignore_unused_variable_warning(a2,a3,a4);445 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 446 446 447 447 digraphCopy(g, G).nodeRef(nref).run(); -
test/dijkstra_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 66 66 int i; 67 67 bool b; 68 ignore_unused_variable_warning(l,i,b);68 ::lemon::ignore_unused_variable_warning(l,i,b); 69 69 70 70 DType::DistMap d(G); … … 165 165 Digraph g; 166 166 bool b; 167 ignore_unused_variable_warning(b);167 ::lemon::ignore_unused_variable_warning(b); 168 168 169 169 dijkstra(g,LengthMap()).run(Node()); -
test/edge_set_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 45 45 46 46 Digraph::Arc ga1 = digraph.addArc(n1, n2); 47 ignore_unused_variable_warning(ga1);47 ::lemon::ignore_unused_variable_warning(ga1); 48 48 49 49 ArcSet arc_set(digraph); 50 50 51 51 Digraph::Arc ga2 = digraph.addArc(n2, n1); 52 ignore_unused_variable_warning(ga2);52 ::lemon::ignore_unused_variable_warning(ga2); 53 53 54 54 checkGraphNodeList(arc_set, 2); … … 78 78 a3 = arc_set.addArc(n2, n3), 79 79 a4 = arc_set.addArc(n2, n3); 80 ignore_unused_variable_warning(a2,a3,a4);80 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 81 81 82 82 checkGraphNodeList(arc_set, 3); … … 115 115 116 116 Digraph::Arc ga1 = digraph.addArc(n1, n2); 117 ignore_unused_variable_warning(ga1);117 ::lemon::ignore_unused_variable_warning(ga1); 118 118 119 119 ArcSet arc_set(digraph); 120 120 121 121 Digraph::Arc ga2 = digraph.addArc(n2, n1); 122 ignore_unused_variable_warning(ga2);122 ::lemon::ignore_unused_variable_warning(ga2); 123 123 124 124 checkGraphNodeList(arc_set, 2); … … 148 148 a3 = arc_set.addArc(n2, n3), 149 149 a4 = arc_set.addArc(n2, n3); 150 ignore_unused_variable_warning(a2,a3,a4);150 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 151 151 152 152 checkGraphNodeList(arc_set, 3); … … 199 199 200 200 Digraph::Arc ga1 = digraph.addArc(n1, n2); 201 ignore_unused_variable_warning(ga1);201 ::lemon::ignore_unused_variable_warning(ga1); 202 202 203 203 EdgeSet edge_set(digraph); 204 204 205 205 Digraph::Arc ga2 = digraph.addArc(n2, n1); 206 ignore_unused_variable_warning(ga2);206 ::lemon::ignore_unused_variable_warning(ga2); 207 207 208 208 checkGraphNodeList(edge_set, 2); … … 241 241 e3 = edge_set.addEdge(n2, n3), 242 242 e4 = edge_set.addEdge(n2, n3); 243 ignore_unused_variable_warning(e2,e3,e4);243 ::lemon::ignore_unused_variable_warning(e2,e3,e4); 244 244 245 245 checkGraphNodeList(edge_set, 3); … … 287 287 288 288 Digraph::Arc ga1 = digraph.addArc(n1, n2); 289 ignore_unused_variable_warning(ga1);289 ::lemon::ignore_unused_variable_warning(ga1); 290 290 291 291 EdgeSet edge_set(digraph); 292 292 293 293 Digraph::Arc ga2 = digraph.addArc(n2, n1); 294 ignore_unused_variable_warning(ga2);294 ::lemon::ignore_unused_variable_warning(ga2); 295 295 296 296 checkGraphNodeList(edge_set, 2); … … 329 329 e3 = edge_set.addEdge(n2, n3), 330 330 e4 = edge_set.addEdge(n2, n3); 331 ignore_unused_variable_warning(e2,e3,e4);331 ::lemon::ignore_unused_variable_warning(e2,e3,e4); 332 332 333 333 checkGraphNodeList(edge_set, 3); -
test/euler_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 102 102 Graph g(d); 103 103 Digraph::Node n = d.addNode(); 104 ignore_unused_variable_warning(n);105 104 ::lemon::ignore_unused_variable_warning(n); 105 106 106 checkDiEulerIt(d); 107 107 checkDiEulerIt(g); … … 191 191 Digraph::Node n4 = d.addNode(); 192 192 Digraph::Node n5 = d.addNode(); 193 ignore_unused_variable_warning(n0,n4,n5);193 ::lemon::ignore_unused_variable_warning(n0,n4,n5); 194 194 195 195 d.addArc(n1, n2); -
test/fractional_matching_test.cc
r1160 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 343 343 pv += weight[mwfm.matching(n)]; 344 344 SmartGraph::Node o = graph.target(mwfm.matching(n)); 345 ignore_unused_variable_warning(o);345 ::lemon::ignore_unused_variable_warning(o); 346 346 } else { 347 347 check(mwfm.nodeValue(n) == 0, "Invalid matching"); … … 408 408 pv += weight[mwpfm.matching(n)]; 409 409 SmartGraph::Node o = graph.target(mwpfm.matching(n)); 410 ignore_unused_variable_warning(o);410 ::lemon::ignore_unused_variable_warning(o); 411 411 } 412 412 -
test/gomory_hu_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 69 69 Value v; 70 70 int d; 71 ignore_unused_variable_warning(v,d);71 ::lemon::ignore_unused_variable_warning(v,d); 72 72 73 73 GomoryHu<Graph, CapMap> gh_test(g, cap); -
test/graph_copy_test.cc
r1194 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 54 54 } 55 55 } 56 56 57 57 // Test digraph copy 58 58 GR to; … … 73 73 nodeCrossRef(ncr).arcCrossRef(ecr). 74 74 node(fn, tn).arc(fa, ta).run(); 75 75 76 76 check(countNodes(from) == countNodes(to), "Wrong copy."); 77 77 check(countArcs(from) == countArcs(to), "Wrong copy."); … … 101 101 // Test repeated copy 102 102 digraphCopy(from, to).run(); 103 103 104 104 check(countNodes(from) == countNodes(to), "Wrong copy."); 105 105 check(countArcs(from) == countArcs(to), "Wrong copy."); … … 204 204 // Test repeated copy 205 205 graphCopy(from, to).run(); 206 206 207 207 check(countNodes(from) == countNodes(to), "Wrong copy."); 208 208 check(countEdges(from) == countEdges(to), "Wrong copy."); … … 367 367 // Test repeated copy 368 368 bpGraphCopy(from, to).run(); 369 369 370 370 check(countNodes(from) == countNodes(to), "Wrong copy."); 371 371 check(countRedNodes(from) == countRedNodes(to), "Wrong copy."); -
test/graph_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 67 67 Edge e2 = G.addEdge(n2, n1), 68 68 e3 = G.addEdge(n2, n3); 69 ignore_unused_variable_warning(e2,e3);69 ::lemon::ignore_unused_variable_warning(e2,e3); 70 70 71 71 checkGraphNodeList(G, 3); … … 100 100 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 101 101 e5 = G.addEdge(n4, n3); 102 ignore_unused_variable_warning(e1,e3,e4,e5);102 ::lemon::ignore_unused_variable_warning(e1,e3,e4,e5); 103 103 104 104 checkGraphNodeList(G, 4); … … 180 180 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 181 181 e5 = G.addEdge(n4, n3); 182 ignore_unused_variable_warning(e1,e3,e4,e5);182 ::lemon::ignore_unused_variable_warning(e1,e3,e4,e5); 183 183 184 184 // Check edge deletion … … 221 221 Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1), 222 222 e3 = G.addEdge(n2, n3); 223 ignore_unused_variable_warning(e1,e2,e3);223 ::lemon::ignore_unused_variable_warning(e1,e2,e3); 224 224 225 225 checkGraphNodeList(G, 3); … … 386 386 e1 = g.addEdge(n1, n2), 387 387 e2 = g.addEdge(n2, n3); 388 ignore_unused_variable_warning(e2);388 ::lemon::ignore_unused_variable_warning(e2); 389 389 390 390 check(g.valid(n1), "Wrong validity check"); … … 525 525 526 526 Node n = G.nodeFromId(dim); 527 ignore_unused_variable_warning(n);527 ::lemon::ignore_unused_variable_warning(n); 528 528 529 529 for (NodeIt n(G); n != INVALID; ++n) { -
test/graph_test.h
r1195 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/hao_orlin_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 67 67 CutMap cut; 68 68 Value v; 69 ignore_unused_variable_warning(v);69 ::lemon::ignore_unused_variable_warning(v); 70 70 71 71 HaoOrlin<Digraph, CapMap> ho_test(g, cap); -
test/heap_test.cc
r1065 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/lgf_reader_writer_test.cc
r1198 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 386 386 writer.arcMap("arc_map1", arc_map); 387 387 writer.arcMap("arc_map2", arc_map, WriterConverter()); 388 writer.node("node", n2); 388 writer.node("node", n2); 389 389 writer.edge("edge", e1); 390 390 writer.arc("arc", graph.direct(e1, false)); … … 493 493 writer.arcMap("arc_map2", arc_map, WriterConverter()); 494 494 writer.node("node", n); 495 writer.redNode("red_node", rn1); 495 writer.redNode("red_node", rn1); 496 496 writer.blueNode("blue_node", bn2); 497 497 writer.edge("edge", e1); -
test/lgf_test.cc
r1087 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 64 64 65 65 66 int main() 66 int main() 67 67 { 68 68 { 69 ListDigraph d; 69 ListDigraph d; 70 70 ListDigraph::Node s,t; 71 71 ListDigraph::ArcMap<int> label(d); … … 94 94 95 95 { 96 ListDigraph d; 96 ListDigraph d; 97 97 std::istringstream input(test_lgf_nomap); 98 98 digraphReader(d, input). … … 111 111 112 112 { 113 ListDigraph d; 113 ListDigraph d; 114 114 std::istringstream input(test_lgf_bad1); 115 115 bool ok=false; … … 118 118 run(); 119 119 } 120 catch (FormatError&) 120 catch (FormatError&) 121 121 { 122 122 ok = true; … … 140 140 141 141 { 142 ListDigraph d; 142 ListDigraph d; 143 143 std::istringstream input(test_lgf_bad2); 144 144 bool ok=false; -
test/lp_test.cc
r1140 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 199 199 c = c <= 4; 200 200 LP::Constr c2; 201 #if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 3 ) 202 c2 = ( -3 <= v ) <= 4; 203 #else 201 204 c2 = -3 <= v <= 4; 205 #endif 206 202 207 } 203 208 … … 241 246 { 242 247 LP::DualExpr e,f,g; 243 LP::Row p1 = INVALID, p2 = INVALID, p3 = INVALID, 244 p4 = INVALID, p5 = INVALID; 248 LP::Row p1 = INVALID, p2 = INVALID; 245 249 246 250 e[p1]=2; -
test/maps_test.cc
r1159 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 104 104 NullMap<A,B> map1; 105 105 NullMap<A,B> map2 = map1; 106 ignore_unused_variable_warning(map2);106 ::lemon::ignore_unused_variable_warning(map2); 107 107 map1 = nullMap<A,B>(); 108 108 } … … 115 115 ConstMap<A,B> map2 = B(); 116 116 ConstMap<A,B> map3 = map1; 117 ignore_unused_variable_warning(map2,map3);117 ::lemon::ignore_unused_variable_warning(map2,map3); 118 118 119 119 map1 = constMap<A>(B()); … … 122 122 ConstMap<A,C> map4(C(1)); 123 123 ConstMap<A,C> map5 = map4; 124 ignore_unused_variable_warning(map5);124 ::lemon::ignore_unused_variable_warning(map5); 125 125 126 126 map4 = constMap<A>(C(2)); … … 144 144 IdentityMap<A> map1; 145 145 IdentityMap<A> map2 = map1; 146 ignore_unused_variable_warning(map2);146 ::lemon::ignore_unused_variable_warning(map2); 147 147 148 148 map1 = identityMap<A>(); … … 205 205 checkConcept<ReadMap<B,double>, CompMap>(); 206 206 CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>()); 207 ignore_unused_variable_warning(map1);207 ::lemon::ignore_unused_variable_warning(map1); 208 208 CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>()); 209 ignore_unused_variable_warning(map2);209 ::lemon::ignore_unused_variable_warning(map2); 210 210 211 211 SparseMap<double, bool> m1(false); m1[3.14] = true; … … 220 220 checkConcept<ReadMap<A,double>, CombMap>(); 221 221 CombMap map1 = CombMap(DoubleMap(), DoubleMap()); 222 ignore_unused_variable_warning(map1);222 ::lemon::ignore_unused_variable_warning(map1); 223 223 CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>()); 224 ignore_unused_variable_warning(map2);224 ::lemon::ignore_unused_variable_warning(map2); 225 225 226 226 check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3, … … 234 234 FunctorToMap<F> map1; 235 235 FunctorToMap<F> map2 = FunctorToMap<F>(F()); 236 ignore_unused_variable_warning(map2);236 ::lemon::ignore_unused_variable_warning(map2); 237 237 238 238 B b = functorToMap(F())[A()]; 239 ignore_unused_variable_warning(b);239 ::lemon::ignore_unused_variable_warning(b); 240 240 241 241 checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >(); 242 242 MapToFunctor<ReadMap<A,B> > map = 243 243 MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); 244 ignore_unused_variable_warning(map);244 ::lemon::ignore_unused_variable_warning(map); 245 245 246 246 check(functorToMap(&func)[A()] == 3, … … 260 260 ConvertMap<ReadMap<double, int>, double> >(); 261 261 ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true)); 262 ignore_unused_variable_warning(map1);262 ::lemon::ignore_unused_variable_warning(map1); 263 263 ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false)); 264 ignore_unused_variable_warning(map2);264 ::lemon::ignore_unused_variable_warning(map2); 265 265 266 266 } … … 536 536 537 537 typedef Orienter<Graph, const ConstMap<Edge, bool> > Digraph; 538 Digraph dgr(gr, constMap<Edge, bool>(true)); 538 ConstMap<Edge, bool> true_edge_map(true); 539 Digraph dgr(gr, true_edge_map); 539 540 OutDegMap<Digraph> odm(dgr); 540 541 InDegMap<Digraph> idm(dgr); -
test/matching_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 146 146 MaxMatching<Graph>::Status stat = 147 147 const_mat_test.status(n); 148 ignore_unused_variable_warning(stat);148 ::lemon::ignore_unused_variable_warning(stat); 149 149 const MaxMatching<Graph>::StatusMap& smap = 150 150 const_mat_test.statusMap(); -
test/max_cardinality_search_test.cc
r1088 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 68 68 ProcMap proc; 69 69 HeapCrossRef crossref(g); 70 70 71 71 typedef MaxCardinalitySearch<Digraph,CapMap> 72 72 ::SetCapacityMap<CapMap> … … 82 82 MaxCardType::Heap& heap = const_cast<MaxCardType::Heap&>(heap_const); 83 83 maxcard.heap(heap,crossref); 84 84 85 85 maxcard.capacityMap(cap).cardinalityMap(card).processedMap(proc); 86 86 -
test/max_clique_test.cc
r1022 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 55 55 "5 7 14\n" 56 56 "6 7 15\n"; 57 57 58 58 59 59 // Check with general graphs … … 63 63 typedef GrossoLocatelliPullanMc<GR> McAlg; 64 64 typedef McAlg::CliqueNodeIt CliqueIt; 65 65 66 66 // Basic tests 67 67 { … … 82 82 check(static_cast<GR::Node>(it1) == u && ++it1 == INVALID, 83 83 "Wrong CliqueNodeIt"); 84 84 85 85 GR::Node v = g.addNode(); 86 86 check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause"); … … 110 110 .nodeMap("max_clique", max_clique) 111 111 .run(); 112 112 113 113 McAlg mc(g); 114 114 mc.iterationLimit(50); … … 134 134 typedef GrossoLocatelliPullanMc<FullGraph> McAlg; 135 135 typedef McAlg::CliqueNodeIt CliqueIt; 136 136 137 137 for (int size = 0; size <= 40; size = size * 3 + 1) { 138 138 GR g(size); … … 157 157 GridGraph::NodeMap<char> map(g); 158 158 GrossoLocatelliPullanMc<GridGraph> mc(g); 159 159 160 160 mc.iterationLimit(100); 161 161 check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause"); … … 180 180 checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED); 181 181 checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED); 182 182 183 183 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::RANDOM); 184 184 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED); 185 185 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED); 186 186 187 187 return 0; 188 188 } -
test/min_cost_arborescence_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 92 92 VType c; 93 93 bool b; 94 ignore_unused_variable_warning(c,b);94 ::lemon::ignore_unused_variable_warning(c,b); 95 95 int i; 96 96 CostMap cost; … … 128 128 c = const_mcarb_test.dualValue(i); 129 129 130 ignore_unused_variable_warning(am);131 ignore_unused_variable_warning(pm);130 ::lemon::ignore_unused_variable_warning(am); 131 ::lemon::ignore_unused_variable_warning(pm); 132 132 } 133 133 -
test/min_cost_flow_test.cc
r956 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/min_mean_cycle_test.cc
r1178 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 211 211 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3, 0, 1); 212 212 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1); 213 213 214 214 // Howard with iteration limit 215 215 HowardMmc<GR, IntArcMap> mmc(gr, l1); -
test/nagamochi_ibaraki_test.cc
r1177 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 66 66 Value v; 67 67 bool b; 68 ignore_unused_variable_warning(v,b);68 ::lemon::ignore_unused_variable_warning(v,b); 69 69 70 70 NagamochiIbaraki<Graph, CapMap> ni_test(g, cap); -
test/path_test.cc
r1144 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 22 22 #include <lemon/concepts/path.h> 23 23 #include <lemon/concepts/digraph.h> 24 #include <lemon/concept_check.h> 24 25 25 26 #include <lemon/path.h> … … 31 32 using namespace lemon; 32 33 33 void check_concepts() { 34 checkConcept<concepts::Path<ListDigraph>, concepts::Path<ListDigraph> >(); 35 checkConcept<concepts::Path<ListDigraph>, Path<ListDigraph> >(); 36 checkConcept<concepts::Path<ListDigraph>, SimplePath<ListDigraph> >(); 37 checkConcept<concepts::Path<ListDigraph>, StaticPath<ListDigraph> >(); 38 checkConcept<concepts::Path<ListDigraph>, ListPath<ListDigraph> >(); 34 template <typename GR> 35 void checkConcepts() { 36 checkConcept<concepts::Path<GR>, concepts::Path<GR> >(); 37 checkConcept<concepts::Path<GR>, Path<GR> >(); 38 checkConcept<concepts::Path<GR>, SimplePath<GR> >(); 39 checkConcept<concepts::Path<GR>, StaticPath<GR> >(); 40 checkConcept<concepts::Path<GR>, ListPath<GR> >(); 41 } 42 43 // Conecpt checking for path structures 44 void checkPathConcepts() { 45 checkConcepts<concepts::Digraph>(); 46 checkConcepts<ListDigraph>(); 39 47 } 40 48 41 49 // Check if proper copy consructor is called (use valgrind for testing) 42 template<class _Path> 43 void checkCopy() 44 { 50 template <typename GR, typename P1, typename P2> 51 void checkCopy(typename GR::Arc a) { 52 P1 p; 53 p.addBack(a); 54 P1 q; 55 q = p; 56 P1 r(p); 57 P2 q2; 58 q2 = p; 59 P2 r2(p); 60 } 61 62 // Tests for copy constructors and assignment operators of paths 63 void checkPathCopy() { 45 64 ListDigraph g; 46 ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); 47 48 _Path p,q; 49 p.addBack(a); 50 q=p; 51 _Path r(p); 52 StaticPath<ListDigraph> s(r); 53 } 54 65 ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); 66 67 typedef Path<ListDigraph> Path1; 68 typedef SimplePath<ListDigraph> Path2; 69 typedef ListPath<ListDigraph> Path3; 70 typedef StaticPath<ListDigraph> Path4; 71 checkCopy<ListDigraph, Path1, Path2>(a); 72 checkCopy<ListDigraph, Path1, Path3>(a); 73 checkCopy<ListDigraph, Path1, Path4>(a); 74 checkCopy<ListDigraph, Path2, Path1>(a); 75 checkCopy<ListDigraph, Path2, Path3>(a); 76 checkCopy<ListDigraph, Path2, Path4>(a); 77 checkCopy<ListDigraph, Path3, Path1>(a); 78 checkCopy<ListDigraph, Path3, Path2>(a); 79 checkCopy<ListDigraph, Path3, Path4>(a); 80 } 81 82 // Class for testing path functions 83 class CheckPathFunctions { 84 typedef ListDigraph GR; 85 DIGRAPH_TYPEDEFS(GR); 86 GR gr; 87 const GR& cgr; 88 Node n1, n2, n3, n4; 89 Node tmp_n; 90 Arc a1, a2, a3, a4; 91 Arc tmp_a; 92 93 public: 94 95 CheckPathFunctions() : cgr(gr) { 96 n1 = gr.addNode(); 97 n2 = gr.addNode(); 98 n3 = gr.addNode(); 99 n4 = gr.addNode(); 100 a1 = gr.addArc(n1, n2); 101 a2 = gr.addArc(n2, n3); 102 a3 = gr.addArc(n3, n4); 103 a4 = gr.addArc(n4, n1); 104 } 105 106 void run() { 107 checkBackAndFrontInsertablePath<Path<GR> >(); 108 checkBackAndFrontInsertablePath<ListPath<GR> >(); 109 checkBackInsertablePath<SimplePath<GR> >(); 110 111 checkListPathSplitAndSplice(); 112 } 113 114 private: 115 116 template <typename P> 117 void checkBackInsertablePath() { 118 119 // Create and check empty path 120 P p; 121 const P& cp = p; 122 check(cp.empty(), "The path is not empty"); 123 check(cp.length() == 0, "The path is not empty"); 124 // check(cp.front() == INVALID, "Wrong front()"); 125 // check(cp.back() == INVALID, "Wrong back()"); 126 typename P::ArcIt ai(cp); 127 check(ai == INVALID, "Wrong ArcIt"); 128 check(pathSource(cgr, cp) == INVALID, "Wrong pathSource()"); 129 check(pathTarget(cgr, cp) == INVALID, "Wrong pathTarget()"); 130 check(checkPath(cgr, cp), "Wrong checkPath()"); 131 PathNodeIt<P> ni(cgr, cp); 132 check(ni == INVALID, "Wrong PathNodeIt"); 133 134 // Check single-arc path 135 p.addBack(a1); 136 check(!cp.empty(), "Wrong empty()"); 137 check(cp.length() == 1, "Wrong length"); 138 check(cp.front() == a1, "Wrong front()"); 139 check(cp.back() == a1, "Wrong back()"); 140 check(cp.nth(0) == a1, "Wrong nth()"); 141 ai = cp.nthIt(0); 142 check((tmp_a = ai) == a1, "Wrong nthIt()"); 143 check(++ai == INVALID, "Wrong nthIt()"); 144 typename P::ArcIt ai2(cp); 145 check((tmp_a = ai2) == a1, "Wrong ArcIt"); 146 check(++ai2 == INVALID, "Wrong ArcIt"); 147 check(pathSource(cgr, cp) == n1, "Wrong pathSource()"); 148 check(pathTarget(cgr, cp) == n2, "Wrong pathTarget()"); 149 check(checkPath(cgr, cp), "Wrong checkPath()"); 150 PathNodeIt<P> ni2(cgr, cp); 151 check((tmp_n = ni2) == n1, "Wrong PathNodeIt"); 152 check((tmp_n = ++ni2) == n2, "Wrong PathNodeIt"); 153 check(++ni2 == INVALID, "Wrong PathNodeIt"); 154 155 // Check adding more arcs 156 p.addBack(a2); 157 p.addBack(a3); 158 check(!cp.empty(), "Wrong empty()"); 159 check(cp.length() == 3, "Wrong length"); 160 check(cp.front() == a1, "Wrong front()"); 161 check(cp.back() == a3, "Wrong back()"); 162 check(cp.nth(0) == a1, "Wrong nth()"); 163 check(cp.nth(1) == a2, "Wrong nth()"); 164 check(cp.nth(2) == a3, "Wrong nth()"); 165 typename P::ArcIt ai3(cp); 166 check((tmp_a = ai3) == a1, "Wrong ArcIt"); 167 check((tmp_a = ++ai3) == a2, "Wrong nthIt()"); 168 check((tmp_a = ++ai3) == a3, "Wrong nthIt()"); 169 check(++ai3 == INVALID, "Wrong nthIt()"); 170 ai = cp.nthIt(0); 171 check((tmp_a = ai) == a1, "Wrong nthIt()"); 172 check((tmp_a = ++ai) == a2, "Wrong nthIt()"); 173 ai = cp.nthIt(2); 174 check((tmp_a = ai) == a3, "Wrong nthIt()"); 175 check(++ai == INVALID, "Wrong nthIt()"); 176 check(pathSource(cgr, cp) == n1, "Wrong pathSource()"); 177 check(pathTarget(cgr, cp) == n4, "Wrong pathTarget()"); 178 check(checkPath(cgr, cp), "Wrong checkPath()"); 179 PathNodeIt<P> ni3(cgr, cp); 180 check((tmp_n = ni3) == n1, "Wrong PathNodeIt"); 181 check((tmp_n = ++ni3) == n2, "Wrong PathNodeIt"); 182 check((tmp_n = ++ni3) == n3, "Wrong PathNodeIt"); 183 check((tmp_n = ++ni3) == n4, "Wrong PathNodeIt"); 184 check(++ni3 == INVALID, "Wrong PathNodeIt"); 185 186 // Check arc removal and addition 187 p.eraseBack(); 188 p.eraseBack(); 189 p.addBack(a2); 190 check(!cp.empty(), "Wrong empty()"); 191 check(cp.length() == 2, "Wrong length"); 192 check(cp.front() == a1, "Wrong front()"); 193 check(cp.back() == a2, "Wrong back()"); 194 check(pathSource(cgr, cp) == n1, "Wrong pathSource()"); 195 check(pathTarget(cgr, cp) == n3, "Wrong pathTarget()"); 196 check(checkPath(cgr, cp), "Wrong checkPath()"); 197 198 // Check clear() 199 p.clear(); 200 check(cp.empty(), "The path is not empty"); 201 check(cp.length() == 0, "The path is not empty"); 202 203 // Check inconsistent path 204 p.addBack(a4); 205 p.addBack(a2); 206 p.addBack(a1); 207 check(!cp.empty(), "Wrong empty()"); 208 check(cp.length() == 3, "Wrong length"); 209 check(cp.front() == a4, "Wrong front()"); 210 check(cp.back() == a1, "Wrong back()"); 211 check(pathSource(cgr, cp) == n4, "Wrong pathSource()"); 212 check(pathTarget(cgr, cp) == n2, "Wrong pathTarget()"); 213 check(!checkPath(cgr, cp), "Wrong checkPath()"); 214 } 215 216 template <typename P> 217 void checkBackAndFrontInsertablePath() { 218 219 // Include back insertable test cases 220 checkBackInsertablePath<P>(); 221 222 // Check front and back insertion 223 P p; 224 const P& cp = p; 225 p.addFront(a4); 226 p.addBack(a1); 227 p.addFront(a3); 228 check(!cp.empty(), "Wrong empty()"); 229 check(cp.length() == 3, "Wrong length"); 230 check(cp.front() == a3, "Wrong front()"); 231 check(cp.back() == a1, "Wrong back()"); 232 check(cp.nth(0) == a3, "Wrong nth()"); 233 check(cp.nth(1) == a4, "Wrong nth()"); 234 check(cp.nth(2) == a1, "Wrong nth()"); 235 typename P::ArcIt ai(cp); 236 check((tmp_a = ai) == a3, "Wrong ArcIt"); 237 check((tmp_a = ++ai) == a4, "Wrong nthIt()"); 238 check((tmp_a = ++ai) == a1, "Wrong nthIt()"); 239 check(++ai == INVALID, "Wrong nthIt()"); 240 ai = cp.nthIt(0); 241 check((tmp_a = ai) == a3, "Wrong nthIt()"); 242 check((tmp_a = ++ai) == a4, "Wrong nthIt()"); 243 ai = cp.nthIt(2); 244 check((tmp_a = ai) == a1, "Wrong nthIt()"); 245 check(++ai == INVALID, "Wrong nthIt()"); 246 check(pathSource(cgr, cp) == n3, "Wrong pathSource()"); 247 check(pathTarget(cgr, cp) == n2, "Wrong pathTarget()"); 248 check(checkPath(cgr, cp), "Wrong checkPath()"); 249 250 // Check eraseFront() 251 p.eraseFront(); 252 p.addBack(a2); 253 check(!cp.empty(), "Wrong empty()"); 254 check(cp.length() == 3, "Wrong length"); 255 check(cp.front() == a4, "Wrong front()"); 256 check(cp.back() == a2, "Wrong back()"); 257 check(cp.nth(0) == a4, "Wrong nth()"); 258 check(cp.nth(1) == a1, "Wrong nth()"); 259 check(cp.nth(2) == a2, "Wrong nth()"); 260 typename P::ArcIt ai2(cp); 261 check((tmp_a = ai2) == a4, "Wrong ArcIt"); 262 check((tmp_a = ++ai2) == a1, "Wrong nthIt()"); 263 check((tmp_a = ++ai2) == a2, "Wrong nthIt()"); 264 check(++ai2 == INVALID, "Wrong nthIt()"); 265 ai = cp.nthIt(0); 266 check((tmp_a = ai) == a4, "Wrong nthIt()"); 267 check((tmp_a = ++ai) == a1, "Wrong nthIt()"); 268 ai = cp.nthIt(2); 269 check((tmp_a = ai) == a2, "Wrong nthIt()"); 270 check(++ai == INVALID, "Wrong nthIt()"); 271 check(pathSource(cgr, cp) == n4, "Wrong pathSource()"); 272 check(pathTarget(cgr, cp) == n3, "Wrong pathTarget()"); 273 check(checkPath(cgr, cp), "Wrong checkPath()"); 274 } 275 276 void checkListPathSplitAndSplice() { 277 278 // Build a path with spliceFront() and spliceBack() 279 ListPath<GR> p1, p2, p3, p4; 280 p1.addBack(a3); 281 p1.addFront(a2); 282 p2.addBack(a1); 283 p1.spliceFront(p2); 284 p3.addFront(a4); 285 p1.spliceBack(p3); 286 check(p1.length() == 4, "Wrong length"); 287 check(p1.front() == a1, "Wrong front()"); 288 check(p1.back() == a4, "Wrong back()"); 289 ListPath<GR>::ArcIt ai(p1); 290 check((tmp_a = ai) == a1, "Wrong ArcIt"); 291 check((tmp_a = ++ai) == a2, "Wrong nthIt()"); 292 check((tmp_a = ++ai) == a3, "Wrong nthIt()"); 293 check((tmp_a = ++ai) == a4, "Wrong nthIt()"); 294 check(++ai == INVALID, "Wrong nthIt()"); 295 check(checkPath(cgr, p1), "Wrong checkPath()"); 296 297 // Check split() 298 p1.split(p1.nthIt(2), p2); 299 check(p1.length() == 2, "Wrong length"); 300 ai = p1.nthIt(0); 301 check((tmp_a = ai) == a1, "Wrong ArcIt"); 302 check((tmp_a = ++ai) == a2, "Wrong nthIt()"); 303 check(++ai == INVALID, "Wrong nthIt()"); 304 check(checkPath(cgr, p1), "Wrong checkPath()"); 305 check(p2.length() == 2, "Wrong length"); 306 ai = p2.nthIt(0); 307 check((tmp_a = ai) == a3, "Wrong ArcIt"); 308 check((tmp_a = ++ai) == a4, "Wrong nthIt()"); 309 check(++ai == INVALID, "Wrong nthIt()"); 310 check(checkPath(cgr, p2), "Wrong checkPath()"); 311 312 // Check split() and splice() 313 p1.spliceFront(p2); 314 p1.split(p1.nthIt(2), p2); 315 p2.split(p2.nthIt(1), p3); 316 p2.spliceBack(p1); 317 p2.splice(p2.nthIt(1), p3); 318 check(p2.length() == 4, "Wrong length"); 319 check(p2.front() == a1, "Wrong front()"); 320 check(p2.back() == a4, "Wrong back()"); 321 ai = p2.nthIt(0); 322 check((tmp_a = ai) == a1, "Wrong ArcIt"); 323 check((tmp_a = ++ai) == a2, "Wrong nthIt()"); 324 check((tmp_a = ++ai) == a3, "Wrong nthIt()"); 325 check((tmp_a = ++ai) == a4, "Wrong nthIt()"); 326 check(++ai == INVALID, "Wrong nthIt()"); 327 check(checkPath(cgr, p2), "Wrong checkPath()"); 328 } 329 330 }; 331 55 332 int main() { 56 check_concepts(); 57 58 checkCopy<Path<ListDigraph> >(); 59 checkCopy<SimplePath<ListDigraph> >(); 60 checkCopy<ListPath<ListDigraph> >(); 61 62 ListDigraph g; 63 ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); 64 65 Path<ListDigraph> p; 66 StaticPath<ListDigraph> q,r; 67 p.addBack(a); 68 q=p; 69 r=q; 70 StaticPath<ListDigraph> s(q); 333 checkPathConcepts(); 334 checkPathCopy(); 335 CheckPathFunctions cpf; 336 cpf.run(); 71 337 72 338 return 0; -
test/radix_sort_test.cc
r1211 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 53 53 template<class T> 54 54 T listsort(typename T::iterator b, typename T::iterator e) 55 { 55 { 56 56 if(b==e) return T(); 57 57 typename T::iterator bn=b; -
test/suurballe_test.cc
r1173 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 118 118 int f; 119 119 VType c; 120 ignore_unused_variable_warning(f,c);120 ::lemon::ignore_unused_variable_warning(f,c); 121 121 122 122 c = const_suurb_test.totalLength(); … … 130 130 Path<Digraph> p = const_suurb_test.path(k); 131 131 132 ignore_unused_variable_warning(fm);133 ignore_unused_variable_warning(pm);132 ::lemon::ignore_unused_variable_warning(fm); 133 ::lemon::ignore_unused_variable_warning(pm); 134 134 } 135 135 -
test/time_measure_test.cc
r1157 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 36 36 { 37 37 TimeStamp x(T); 38 ignore_unused_variable_warning(x);38 ::lemon::ignore_unused_variable_warning(x); 39 39 } 40 40 } -
test/tsp_test.cc
r1205 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 42 42 // check(checkMetricCost(g, constMap<Edge>(1)), "Wrong checkMetricCost()"); 43 43 // check(!checkMetricCost(g, constMap<Edge>(-1)), "Wrong checkMetricCost()"); 44 // 44 // 45 45 // FullGraph::EdgeMap<float> cost(g); 46 46 // for (NodeIt u(g); u != INVALID; ++u) { … … 65 65 bool checkTour(const FullGraph &gr, const Container &p) { 66 66 FullGraph::NodeMap<bool> used(gr, false); 67 67 68 68 int node_cnt = 0; 69 for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) { 70 FullGraph::Node node = *it; 71 if (used[node]) return false; 72 used[node] = true; 73 ++node_cnt; 74 } 75 69 for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) 70 { 71 FullGraph::Node node = *it; 72 if (used[node]) return false; 73 used[node] = true; 74 ++node_cnt; 75 } 76 76 77 return (node_cnt == gr.nodeNum()); 77 78 } … … 80 81 bool checkTourPath(const FullGraph &gr, const Path<FullGraph> &p) { 81 82 FullGraph::NodeMap<bool> used(gr, false); 82 83 83 84 if (!checkPath(gr, p)) return false; 84 85 if (gr.nodeNum() <= 1 && p.length() != 0) return false; … … 182 183 } 183 184 } 184 185 185 186 check(alg.run() > 0, alg_name + ": Wrong total cost"); 186 187 … … 196 197 check(checkCost(g, path, cost, alg.tourCost()), 197 198 alg_name + ": Wrong tour cost"); 198 199 199 200 check(!Tolerance<double>().less(alg.tourCost(), opt2.run(alg.tourNodes())), 200 201 "2-opt improvement: Wrong total cost"); … … 203 204 check(checkCost(g, opt2.tourNodes(), cost, opt2.tourCost()), 204 205 "2-opt improvement: Wrong tour cost"); 205 206 206 207 check(!Tolerance<double>().less(alg.tourCost(), opt2.run(path)), 207 208 "2-opt improvement: Wrong total cost"); … … 213 214 } 214 215 215 // Algorithm class for Nearest Insertion 216 // Algorithm class for Nearest Insertion 216 217 template <typename CM> 217 218 class NearestInsertionTsp : public InsertionTsp<CM> { … … 224 225 }; 225 226 226 // Algorithm class for Farthest Insertion 227 // Algorithm class for Farthest Insertion 227 228 template <typename CM> 228 229 class FarthestInsertionTsp : public InsertionTsp<CM> { … … 235 236 }; 236 237 237 // Algorithm class for Cheapest Insertion 238 // Algorithm class for Cheapest Insertion 238 239 template <typename CM> 239 240 class CheapestInsertionTsp : public InsertionTsp<CM> { … … 246 247 }; 247 248 248 // Algorithm class for Random Insertion 249 // Algorithm class for Random Insertion 249 250 template <typename CM> 250 251 class RandomInsertionTsp : public InsertionTsp<CM> { … … 265 266 tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy"); 266 267 tspTestSmall<NearestInsertionTsp<ConstMap<Edge, int> > >("Nearest Insertion"); 267 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >("Farthest Insertion"); 268 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >("Cheapest Insertion"); 268 tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > > 269 ("Farthest Insertion"); 270 tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > > 271 ("Cheapest Insertion"); 269 272 tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion"); 270 273 tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides"); -
tools/dimacs-solver.cc
r1169 r1271 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 128 128 if (report) { 129 129 std::cerr << "Run NetworkSimplex: " << ti << "\n\n"; 130 std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n'; 130 std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : 131 "not found") << '\n'; 131 132 if (res) std::cerr << "Min flow cost: " 132 133 << ns.template totalCost<LargeValue>() << '\n';
Note: See TracChangeset
for help on using the changeset viewer.