COIN-OR::LEMON - Graph Library

Ignore:
Files:
1 added
3 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r1035 r791  
    33SET(PROJECT_NAME "LEMON")
    44PROJECT(${PROJECT_NAME})
    5 
    6 INCLUDE(FindPythonInterp)
    7 INCLUDE(FindWget)
    85
    96IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     
    129  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
    1310ELSE()
    14   EXECUTE_PROCESS(
    15     COMMAND ${PYTHON_EXECUTABLE} ./scripts/chg-len.py
    16     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    17     OUTPUT_VARIABLE HG_REVISION_PATH
    18     ERROR_QUIET
    19     OUTPUT_STRIP_TRAILING_WHITESPACE
    20   )
    2111  EXECUTE_PROCESS(
    2212    COMMAND hg id -i
     
    2717  )
    2818  IF(HG_REVISION STREQUAL "")
    29     SET(HG_REVISION_ID "hg-tip")
    30   ELSE()
    31     IF(HG_REVISION_PATH STREQUAL "")
    32       SET(HG_REVISION_ID ${HG_REVISION})
    33     ELSE()
    34       SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION})
    35     ENDIF()
     19    SET(HG_REVISION "hg-tip")
    3620  ENDIF()
    37   SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.")
     21  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    3822ENDIF()
    3923
     
    4832FIND_PACKAGE(COIN)
    4933
    50 IF(DEFINED ENV{LEMON_CXX_WARNING})
    51   SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
    52 ELSE()
    53   IF(CMAKE_COMPILER_IS_GNUCXX)
    54     SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas")
    55     SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb")
    56     SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
    57   ELSEIF(MSVC)
    58     # This part is unnecessary 'casue the same is set by the lemon/core.h.
    59     # Still keep it as an example.
    60     SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
    61     # Suppressed warnings:
    62     # C4250: 'class1' : inherits 'class2::member' via dominance
    63     # C4355: 'this' : used in base member initializer list
    64     # C4503: 'function' : decorated name length exceeded, name was truncated
    65     # C4800: 'type' : forcing value to bool 'true' or 'false'
    66     #        (performance warning)
    67     # C4996: 'function': was declared deprecated
    68   ELSE()
    69     SET(CXX_WARNING "-Wall -W")
    70   ENDIF()
    71 ENDIF()
    72 SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
    73 
    74 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    75 
    76 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
    77     "Flags used by the C++ compiler during maintainer builds."
    78     FORCE )
    79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
    80     "Flags used by the C compiler during maintainer builds."
    81     FORCE )
    82 SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
    83     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
    84     "Flags used for linking binaries during maintainer builds."
    85     FORCE )
    86 SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
    87     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
    88     "Flags used by the shared libraries linker during maintainer builds."
    89     FORCE )
    90 MARK_AS_ADVANCED(
    91     CMAKE_CXX_FLAGS_MAINTAINER
    92     CMAKE_C_FLAGS_MAINTAINER
    93     CMAKE_EXE_LINKER_FLAGS_MAINTAINER
    94     CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
    95 
    96 IF(CMAKE_CONFIGURATION_TYPES)
    97   LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
    98   LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
    99   SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
    100       "Add the configurations that we need"
    101       FORCE)
    102  endif()
    103 
    104 IF(NOT CMAKE_BUILD_TYPE)
    105   SET(CMAKE_BUILD_TYPE "Release")
    106 ENDIF()
    107 
    108 SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
    109     "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Maintainer."
    110     FORCE )
    111 
    112 
    11334INCLUDE(CheckTypeSize)
    11435CHECK_TYPE_SIZE("long long" LONG_LONG)
     
    11839
    11940ENABLE_TESTING()
    120 
    121 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    122   ADD_CUSTOM_TARGET(check ALL COMMAND ${CMAKE_CTEST_COMMAND})
    123 ELSE()
    124   ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
    125 ENDIF()
    12641
    12742ADD_SUBDIRECTORY(lemon)
     
    15065ENDIF()
    15166
    152 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     67IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
    15368  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    15469  SET(CPACK_PACKAGE_VENDOR "EGRES")
  • LICENSE

    r959 r600  
    22copyright/license.
    33
    4 Copyright (C) 2003-2010 Egervary Jeno Kombinatorikus Optimalizalasi
     4Copyright (C) 2003-2009 Egervary Jeno Kombinatorikus Optimalizalasi
    55Kutatocsoport (Egervary Combinatorial Optimization Research Group,
    66EGRES).
  • NEWS

    r1005 r712  
    1 2010-10-21 Version 1.2.1 released
    2 
    3         Bugfix release.
    4 
    5         #366: Fix Pred[Matrix]MapPath::empty()
    6         #371: Bug fix in (di)graphCopy()
    7               The target graph is cleared before adding nodes and arcs/edges.
    8 
    9         #364: Add missing UndirectedTags
    10         #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex
    11         #372: Fix a critical bug in preflow
    12 
    13 2010-03-19 Version 1.2 released
    14 
    15         This is major feature release
    16 
    17         * New algorithms
    18           * Bellman-Ford algorithm (#51)
    19           * Minimum mean cycle algorithms (#179)
    20             * Karp, Hartman-Orlin and Howard algorithms
    21           * New minimum cost flow algorithms (#180)
    22             * Cost Scaling algorithms
    23             * Capacity Scaling algorithm
    24             * Cycle-Canceling algorithms
    25           * Planarity related algorithms (#62)
    26             * Planarity checking algorithm
    27             * Planar embedding algorithm
    28             * Schnyder's planar drawing algorithm
    29             * Coloring planar graphs with five or six colors
    30           * Fractional matching algorithms (#314)
    31         * New data structures
    32           * StaticDigraph structure (#68)
    33           * Several new priority queue structures (#50, #301)
    34             * Fibonacci, Radix, Bucket, Pairing, Binomial
    35               D-ary and fourary heaps (#301)
    36           * Iterable map structures (#73)
    37         * Other new tools and functionality
    38           * Map utility functions (#320)
    39           * Reserve functions are added to ListGraph and SmartGraph (#311)
    40           * A resize() function is added to HypercubeGraph (#311)
    41           * A count() function is added to CrossRefMap (#302)
    42           * Support for multiple targets in Suurballe using fullInit() (#181)
    43           * Traits class and named parameters for Suurballe (#323)
    44           * Separate reset() and resetParams() functions in NetworkSimplex
    45             to handle graph changes (#327)
    46           * tolerance() functions are added to HaoOrlin (#306)
    47         * Implementation improvements
    48           * Improvements in weighted matching algorithms (#314)
    49             * Jumpstart initialization
    50           * ArcIt iteration is based on out-arc lists instead of in-arc lists
    51             in ListDigraph (#311)
    52           * Faster add row operation in CbcMip (#203)
    53           * Better implementation for split() in ListDigraph (#311)
    54           * ArgParser can also throw exception instead of exit(1) (#332)
    55         * Miscellaneous
    56           * A simple interactive bootstrap script
    57           * Doc improvements (#62,#180,#299,#302,#303,#304,#307,#311,#331,#315,
    58                 #316,#319)
    59             * BibTeX references in the doc (#184)
    60           * Optionally use valgrind when running tests
    61           * Also check ReferenceMapTag in concept checks (#312)
    62           * dimacs-solver uses long long type by default.
    63         * Several bugfixes (compared to release 1.1):
    64           #295: Suppress MSVC warnings using pragmas
    65           ----: Various CMAKE related improvements
    66                 * Remove duplications from doc/CMakeLists.txt
    67                 * Rename documentation install folder from 'docs' to 'html'
    68                 * Add tools/CMakeLists.txt to the tarball
    69                 * Generate and install LEMONConfig.cmake
    70                 * Change the label of the html project in Visual Studio
    71                 * Fix the check for the 'long long' type
    72                 * Put the version string into config.h
    73                 * Minor CMake improvements
    74                 * Set the version to 'hg-tip' if everything fails
    75           #311: Add missing 'explicit' keywords
    76           #302: Fix the implementation and doc of CrossRefMap
    77           #308: Remove duplicate list_graph.h entry from source list
    78           #307: Bugfix in Preflow and Circulation
    79           #305: Bugfix and extension in the rename script
    80           #312: Also check ReferenceMapTag in concept checks
    81           #250: Bugfix in pathSource() and pathTarget()
    82           #321: Use pathCopy(from,to) instead of copyPath(to,from)
    83           #322: Distribure LEMONConfig.cmake.in
    84           #330: Bug fix in map_extender.h
    85           #336: Fix the date field comment of graphToEps() output
    86           #323: Bug fix in Suurballe
    87           #335: Fix clear() function in ExtendFindEnum
    88           #337: Use void* as the LPX object pointer
    89           #317: Fix (and improve) error message in mip_test.cc
    90                 Remove unnecessary OsiCbc dependency
    91           #356: Allow multiple executions of weighted matching algorithms (#356)
    92 
    9312009-05-13 Version 1.1 released
    942
     
    16573          ----: Add missing unistd.h include to time_measure.h
    16674          #204: Compilation bug fixed in graph_to_eps.h with VS2005
    167           #214,#215: windows.h should never be included by LEMON headers
     75          #214,#215: windows.h should never be included by lemon headers
    16876          #230: Build systems check the availability of 'long long' type
    16977          #229: Default implementation of Tolerance<> is used for integer types
     
    187952008-10-13 Version 1.0 released
    18896
    189         This is the first stable release of LEMON. Compared to the 0.x
    190         release series, it features a considerably smaller but more
    191         matured set of tools. The API has also completely revised and
    192         changed in several places.
     97        This is the first stable release of LEMON. Compared to the 0.x
     98        release series, it features a considerably smaller but more
     99        matured set of tools. The API has also completely revised and
     100        changed in several places.
    193101
    194         * The major name changes compared to the 0.x series (see the
     102        * The major name changes compared to the 0.x series (see the
    195103          Migration Guide in the doc for more details)
    196104          * Graph -> Digraph, UGraph -> Graph
    197105          * Edge -> Arc, UEdge -> Edge
    198           * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)
    199         * Other improvements
    200           * Better documentation
    201           * Reviewed and cleaned up codebase
    202           * CMake based build system (along with the autotools based one)
    203         * Contents of the library (ported from 0.x)
    204           * Algorithms
    205             * breadth-first search (bfs.h)
    206             * depth-first search (dfs.h)
    207             * Dijkstra's algorithm (dijkstra.h)
    208             * Kruskal's algorithm (kruskal.h)
    209           * Data structures
    210             * graph data structures (list_graph.h, smart_graph.h)
    211             * path data structures (path.h)
    212             * binary heap data structure (bin_heap.h)
    213             * union-find data structures (unionfind.h)
    214             * miscellaneous property maps (maps.h)
    215             * two dimensional vector and bounding box (dim2.h)
     106          * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)
     107        * Other improvements
     108          * Better documentation
     109          * Reviewed and cleaned up codebase
     110          * CMake based build system (along with the autotools based one)
     111        * Contents of the library (ported from 0.x)
     112          * Algorithms
     113            * breadth-first search (bfs.h)
     114            * depth-first search (dfs.h)
     115            * Dijkstra's algorithm (dijkstra.h)
     116            * Kruskal's algorithm (kruskal.h)
     117          * Data structures
     118            * graph data structures (list_graph.h, smart_graph.h)
     119            * path data structures (path.h)
     120            * binary heap data structure (bin_heap.h)
     121            * union-find data structures (unionfind.h)
     122            * miscellaneous property maps (maps.h)
     123            * two dimensional vector and bounding box (dim2.h)
    216124          * Concepts
    217             * graph structure concepts (concepts/digraph.h, concepts/graph.h,
     125            * graph structure concepts (concepts/digraph.h, concepts/graph.h,
    218126              concepts/graph_components.h)
    219             * concepts for other structures (concepts/heap.h, concepts/maps.h,
    220               concepts/path.h)
    221           * Tools
    222             * Mersenne twister random number generator (random.h)
    223             * tools for measuring cpu and wall clock time (time_measure.h)
    224             * tools for counting steps and events (counter.h)
    225             * tool for parsing command line arguments (arg_parser.h)
    226             * tool for visualizing graphs (graph_to_eps.h)
    227             * tools for reading and writing data in LEMON Graph Format
     127            * concepts for other structures (concepts/heap.h, concepts/maps.h,
     128              concepts/path.h)
     129          * Tools
     130            * Mersenne twister random number generator (random.h)
     131            * tools for measuring cpu and wall clock time (time_measure.h)
     132            * tools for counting steps and events (counter.h)
     133            * tool for parsing command line arguments (arg_parser.h)
     134            * tool for visualizing graphs (graph_to_eps.h)
     135            * tools for reading and writing data in LEMON Graph Format
    228136              (lgf_reader.h, lgf_writer.h)
    229137            * tools to handle the anomalies of calculations with
    230               floating point numbers (tolerance.h)
     138              floating point numbers (tolerance.h)
    231139            * tools to manage RGB colors (color.h)
    232           * Infrastructure
    233             * extended assertion handling (assert.h)
    234             * exception classes and error handling (error.h)
    235             * concept checking (concept_check.h)
    236             * commonly used mathematical constants (math.h)
     140          * Infrastructure
     141            * extended assertion handling (assert.h)
     142            * exception classes and error handling (error.h)
     143            * concept checking (concept_check.h)
     144            * commonly used mathematical constants (math.h)
  • configure.ac

    r1039 r840  
    115115dnl Add dependencies on files generated by configure.
    116116AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
    117   ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/doc/mainpage.dox.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
     117  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
    118118
    119119AC_CONFIG_FILES([
     
    122122cmake/version.cmake
    123123doc/Doxyfile
    124 doc/mainpage.dox
    125124lemon/lemon.pc
    126125])
  • doc/CMakeLists.txt

    r1039 r943  
    44SET(abs_top_builddir ${PROJECT_BINARY_DIR})
    55
    6 SET(LEMON_DOC_SOURCE_BROWSER "NO" CACHE STRING "Include source into the doc (YES/NO).")
    7 
    86CONFIGURE_FILE(
    97  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
    108  ${PROJECT_BINARY_DIR}/doc/Doxyfile
    11   @ONLY
    12 )
    13 
    14 CONFIGURE_FILE(
    15   ${PROJECT_SOURCE_DIR}/doc/mainpage.dox.in
    16   ${PROJECT_BINARY_DIR}/doc/mainpage.dox
    179  @ONLY
    1810)
     
    6153
    6254ENDIF()
    63 
    64 IF(WGET_FOUND)
    65 ADD_CUSTOM_TARGET(update-external-tags
    66   COMMAND ${CMAKE_COMMAND} -E make_directory dl
    67   # COMMAND ${CMAKE_COMMAND} -E copy libstdc++.tag dl
    68   COMMAND ${WGET_EXECUTABLE} wget -P dl -N libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
    69   COMMAND ${CMAKE_COMMAND} -E rename dl/libstdc++.tag libstdc++.tag
    70   COMMAND ${CMAKE_COMMAND} -E remove dl/libstdc++.tag
    71   COMMAND ${CMAKE_COMMAND} -E remove_directory dl
    72   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    73   )
    74 ENDIF()
  • doc/Doxyfile.in

    r1039 r803  
    1 # Doxyfile 1.7.3
     1# Doxyfile 1.5.9
    22
    33#---------------------------------------------------------------------------
     
    55#---------------------------------------------------------------------------
    66DOXYFILE_ENCODING      = UTF-8
    7 PROJECT_NAME           =
    8 PROJECT_NUMBER         =
    9 PROJECT_BRIEF          =
    10 PROJECT_LOGO           =
     7PROJECT_NAME           = @PACKAGE_NAME@
     8PROJECT_NUMBER         = @PACKAGE_VERSION@
    119OUTPUT_DIRECTORY       =
    1210CREATE_SUBDIRS         = NO
     
    3230OPTIMIZE_FOR_FORTRAN   = NO
    3331OPTIMIZE_OUTPUT_VHDL   = NO
    34 EXTENSION_MAPPING      =
    3532BUILTIN_STL_SUPPORT    = YES
    3633CPP_CLI_SUPPORT        = NO
     
    5855HIDE_SCOPE_NAMES       = YES
    5956SHOW_INCLUDE_FILES     = YES
    60 FORCE_LOCAL_INCLUDES   = NO
    6157INLINE_INFO            = YES
    6258SORT_MEMBER_DOCS       = NO
    6359SORT_BRIEF_DOCS        = NO
    64 SORT_MEMBERS_CTORS_1ST = NO
    6560SORT_GROUP_NAMES       = NO
    6661SORT_BY_SCOPE_NAME     = NO
    67 STRICT_PROTO_MATCHING  = NO
    6862GENERATE_TODOLIST      = YES
    6963GENERATE_TESTLIST      = YES
     
    7771SHOW_NAMESPACES        = YES
    7872FILE_VERSION_FILTER    =
    79 LAYOUT_FILE            = "@abs_top_srcdir@/doc/DoxygenLayout.xml"
     73LAYOUT_FILE            = DoxygenLayout.xml
    8074#---------------------------------------------------------------------------
    8175# configuration options related to warning and progress messages
     
    9892                         "@abs_top_srcdir@/tools" \
    9993                         "@abs_top_srcdir@/test/test_tools.h" \
    100                          "@abs_top_builddir@/doc/mainpage.dox" \
    10194                         "@abs_top_builddir@/doc/references.dox"
    10295INPUT_ENCODING         = UTF-8
     
    119112FILTER_PATTERNS        =
    120113FILTER_SOURCE_FILES    = NO
    121 FILTER_SOURCE_PATTERNS =
    122114#---------------------------------------------------------------------------
    123115# configuration options related to source browsing
    124116#---------------------------------------------------------------------------
    125 SOURCE_BROWSER         = @LEMON_DOC_SOURCE_BROWSER@
     117SOURCE_BROWSER         = NO
    126118INLINE_SOURCES         = NO
    127119STRIP_CODE_COMMENTS    = YES
     
    146138HTML_FOOTER            =
    147139HTML_STYLESHEET        =
    148 HTML_COLORSTYLE_HUE    = 220
    149 HTML_COLORSTYLE_SAT    = 100
    150 HTML_COLORSTYLE_GAMMA  = 80
    151 HTML_TIMESTAMP         = YES
    152140HTML_ALIGN_MEMBERS     = YES
    153 HTML_DYNAMIC_SECTIONS  = YES
     141HTML_DYNAMIC_SECTIONS  = NO
    154142GENERATE_DOCSET        = NO
    155143DOCSET_FEEDNAME        = "Doxygen generated docs"
    156144DOCSET_BUNDLE_ID       = org.doxygen.Project
    157 DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
    158 DOCSET_PUBLISHER_NAME  = Publisher
    159145GENERATE_HTMLHELP      = NO
    160146CHM_FILE               =
     
    168154QHP_NAMESPACE          = org.doxygen.Project
    169155QHP_VIRTUAL_FOLDER     = doc
    170 QHP_CUST_FILTER_NAME   =
    171 QHP_CUST_FILTER_ATTRS  =
    172 QHP_SECT_FILTER_ATTRS  =
    173156QHG_LOCATION           =
    174 GENERATE_ECLIPSEHELP   = NO
    175 ECLIPSE_DOC_ID         = org.doxygen.Project
    176157DISABLE_INDEX          = NO
    177158ENUM_VALUES_PER_LINE   = 4
    178159GENERATE_TREEVIEW      = NO
    179 USE_INLINE_TREES       = NO
    180160TREEVIEW_WIDTH         = 250
    181 EXT_LINKS_IN_WINDOW    = NO
    182161FORMULA_FONTSIZE       = 10
    183 FORMULA_TRANSPARENT    = YES
    184 USE_MATHJAX            = NO
    185 MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
    186 SEARCHENGINE           = YES
    187 SERVER_BASED_SEARCH    = NO
    188162#---------------------------------------------------------------------------
    189163# configuration options related to the LaTeX output
     
    202176LATEX_BATCHMODE        = NO
    203177LATEX_HIDE_INDICES     = NO
    204 LATEX_SOURCE_CODE      = NO
    205178#---------------------------------------------------------------------------
    206179# configuration options related to the RTF output
     
    251224SKIP_FUNCTION_MACROS   = YES
    252225#---------------------------------------------------------------------------
    253 # Configuration::additions related to external references
    254 #---------------------------------------------------------------------------
    255 TAGFILES               = "@abs_top_builddir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
     226# Options related to the search engine   
     227#---------------------------------------------------------------------------
     228TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
    256229GENERATE_TAGFILE       = html/lemon.tag
    257230ALLEXTERNALS           = NO
     
    265238HIDE_UNDOC_RELATIONS   = YES
    266239HAVE_DOT               = YES
    267 DOT_NUM_THREADS        = 0
    268240DOT_FONTNAME           = FreeSans
    269241DOT_FONTSIZE           = 10
     
    283255DOT_PATH               =
    284256DOTFILE_DIRS           =
    285 MSCFILE_DIRS           =
    286257DOT_GRAPH_MAX_NODES    = 50
    287258MAX_DOT_GRAPH_DEPTH    = 0
     
    290261GENERATE_LEGEND        = YES
    291262DOT_CLEANUP            = YES
     263#---------------------------------------------------------------------------
     264# Configuration::additions related to the search engine   
     265#---------------------------------------------------------------------------
     266SEARCHENGINE           = NO
  • doc/DoxygenLayout.xml

    r1036 r316  
    33  <navindex>
    44    <tab type="mainpage" visible="yes" title=""/>
    5     <tab type="modules" visible="yes" title="" intro=""/>
     5    <tab type="modules" visible="yes" title=""/>
    66    <tab type="classes" visible="yes" title="">
    7       <tab type="classes" visible="yes" title="" intro=""/>
    8       <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
    9       <tab type="hierarchy" visible="yes" title="" intro=""/>
    10       <tab type="classmembers" visible="yes" title="" intro=""/>
     7      <tab type="classes" visible="yes" title=""/>
     8      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
     9      <tab type="hierarchy" visible="yes" title=""/>
     10      <tab type="classmembers" visible="yes" title=""/>
    1111    </tab>
    1212    <tab type="namespaces" visible="yes" title="">
    13       <tab type="namespaces" visible="yes" title="" intro=""/>
    14       <tab type="namespacemembers" visible="yes" title="" intro=""/>
     13      <tab type="namespaces" visible="yes" title=""/>
     14      <tab type="namespacemembers" visible="yes" title=""/>
    1515    </tab>
    1616    <tab type="files" visible="yes" title="">
    17       <tab type="files" visible="yes" title="" intro=""/>
    18       <tab type="globals" visible="yes" title="" intro=""/>
     17      <tab type="files" visible="yes" title=""/>
     18      <tab type="globals" visible="yes" title=""/>
    1919    </tab>
    20     <tab type="dirs" visible="yes" title="" intro=""/>
    21     <tab type="examples" visible="yes" title="" intro=""/>
    22     <tab type="pages" visible="yes" title="" intro=""/>
     20    <tab type="dirs" visible="yes" title=""/>
     21    <tab type="examples" visible="yes" title=""/> 
     22    <tab type="pages" visible="yes" title=""/>
    2323  </navindex>
    2424
  • doc/groups.dox

    r963 r956  
    264264
    265265/**
     266@defgroup matrices Matrices
     267@ingroup datas
     268\brief Two dimensional data storages implemented in LEMON.
     269
     270This group contains two dimensional data storages implemented in LEMON.
     271*/
     272
     273/**
    266274@defgroup auxdat Auxiliary Data Structures
    267275@ingroup datas
     
    284292   rectangular bounding box of a set of \ref lemon::dim2::Point
    285293   "dim2::Point"'s.
     294*/
     295
     296/**
     297@defgroup matrices Matrices
     298@ingroup auxdat
     299\brief Two dimensional data storages implemented in LEMON.
     300
     301This group contains two dimensional data storages implemented in LEMON.
    286302*/
    287303
     
    319335   but the digraph should not contain directed cycles with negative total
    320336   length.
     337 - \ref FloydWarshall "Floyd-Warshall" and \ref Johnson "Johnson" algorithms
     338   for solving the \e all-pairs \e shortest \e paths \e problem when arc
     339   lenghts can be either positive or negative, but the digraph should
     340   not contain directed cycles with negative total length.
    321341 - \ref Suurballe A successive shortest path algorithm for finding
    322342   arc-disjoint paths between two nodes having minimum total length.
     
    352372\f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f]
    353373
    354 \ref Preflow is an efficient implementation of Goldberg-Tarjan's
    355 preflow push-relabel algorithm \ref goldberg88newapproach for finding
    356 maximum flows. It also provides functions to query the minimum cut,
    357 which is the dual problem of maximum flow.
     374LEMON contains several algorithms for solving maximum flow problems:
     375- \ref EdmondsKarp Edmonds-Karp algorithm
     376  \ref edmondskarp72theoretical.
     377- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm
     378  \ref goldberg88newapproach.
     379- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees
     380  \ref dinic70algorithm, \ref sleator83dynamic.
     381- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees
     382  \ref goldberg88newapproach, \ref sleator83dynamic.
     383
     384In most cases the \ref Preflow algorithm provides the
     385fastest method for computing a maximum flow. All implementations
     386also provide functions to query the minimum cut, which is the dual
     387problem of maximum flow.
    358388
    359389\ref Circulation is a preflow push-relabel algorithm implemented directly
     
    412442- \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut
    413443  in directed graphs.
     444- \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for
     445  calculating minimum cut in undirected graphs.
    414446- \ref GomoryHu "Gomory-Hu tree computation" for calculating
    415447  all-pairs minimum cut in undirected graphs.
     
    441473
    442474LEMON contains three algorithms for solving the minimum mean cycle problem:
    443 - \ref KarpMmc Karp's original algorithm \ref amo93networkflows,
     475- \ref Karp "Karp"'s original algorithm \ref amo93networkflows,
    444476  \ref dasdan98minmeancycle.
    445 - \ref HartmannOrlinMmc Hartmann-Orlin's algorithm, which is an improved
     477- \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved
    446478  version of Karp's algorithm \ref dasdan98minmeancycle.
    447 - \ref HowardMmc Howard's policy iteration algorithm
     479- \ref Howard "Howard"'s policy iteration algorithm
    448480  \ref dasdan98minmeancycle.
    449481
    450 In practice, the \ref HowardMmc "Howard" algorithm proved to be by far the
    451 most efficient one, though the best known theoretical bound on its running
    452 time is exponential.
    453 Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms
    454 run in time O(ne) and use space O(n<sup>2</sup>+e), but the latter one is
    455 typically faster due to the applied early termination scheme.
     482In practice, the Howard algorithm proved to be by far the most efficient
     483one, though the best known theoretical bound on its running time is
     484exponential.
     485Both Karp and HartmannOrlin algorithms run in time O(ne) and use space
     486O(n<sup>2</sup>+e), but the latter one is typically faster due to the
     487applied early termination scheme.
    456488*/
    457489
     
    474506
    475507The matching algorithms implemented in LEMON:
     508- \ref MaxBipartiteMatching Hopcroft-Karp augmenting path algorithm
     509  for calculating maximum cardinality matching in bipartite graphs.
     510- \ref PrBipartiteMatching Push-relabel algorithm
     511  for calculating maximum cardinality matching in bipartite graphs.
     512- \ref MaxWeightedBipartiteMatching
     513  Successive shortest path algorithm for calculating maximum weighted
     514  matching and maximum weighted bipartite matching in bipartite graphs.
     515- \ref MinCostMaxBipartiteMatching
     516  Successive shortest path algorithm for calculating minimum cost maximum
     517  matching in bipartite graphs.
    476518- \ref MaxMatching Edmond's blossom shrinking algorithm for calculating
    477519  maximum cardinality matching in general graphs.
     
    518560
    519561/**
     562@defgroup approx Approximation Algorithms
     563@ingroup algs
     564\brief Approximation algorithms.
     565
     566This group contains the approximation and heuristic algorithms
     567implemented in LEMON.
     568*/
     569
     570/**
    520571@defgroup auxalg Auxiliary Algorithms
    521572@ingroup algs
     
    546597The currently supported solvers are \ref glpk, \ref clp, \ref cbc,
    547598\ref cplex, \ref soplex.
     599*/
     600
     601/**
     602@defgroup lp_utils Tools for Lp and Mip Solvers
     603@ingroup lp_group
     604\brief Helper tools to the Lp and Mip solvers.
     605
     606This group adds some helper tools to general optimization framework
     607implemented in LEMON.
     608*/
     609
     610/**
     611@defgroup metah Metaheuristics
     612@ingroup gen_opt_group
     613\brief Metaheuristics for LEMON library.
     614
     615This group contains some metaheuristic optimization tools.
    548616*/
    549617
  • lemon/CMakeLists.txt

    r1012 r726  
    77  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
    88  ${CMAKE_CURRENT_BINARY_DIR}/config.h
    9 )
    10 
    11 CONFIGURE_FILE(
    12   ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.cmake
    13   ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
    14   @ONLY
    159)
    1610
     
    7367  COMPONENT headers
    7468)
    75 
    76 INSTALL(
    77   FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
    78   DESTINATION lib/pkgconfig
    79 )
    80 
  • lemon/arg_parser.h

    r959 r956  
    3636
    3737  ///Exception used by ArgParser
    38 
    39   ///Exception used by ArgParser.
    40   ///
    4138  class ArgParserException : public Exception {
    4239  public:
    43     /// Reasons for failure
    44 
    45     /// Reasons for failure.
    46     ///
    4740    enum Reason {
    48       HELP,         ///< <tt>--help</tt> option was given.
    49       UNKNOWN_OPT,  ///< Unknown option was given.
    50       INVALID_OPT   ///< Invalid combination of options.
     41      HELP,         /// <tt>--help</tt> option was given
     42      UNKNOWN_OPT,  /// Unknown option was given
     43      INVALID_OPT   /// Invalid combination of options
    5144    };
    5245
  • lemon/bellman_ford.h

    r960 r956  
    2929#include <lemon/error.h>
    3030#include <lemon/maps.h>
     31#include <lemon/tolerance.h>
    3132#include <lemon/path.h>
    3233
     
    3536namespace lemon {
    3637
    37   /// \brief Default OperationTraits for the BellmanFord algorithm class.
     38  /// \brief Default operation traits for the BellmanFord algorithm class.
    3839  ///
    3940  /// This operation traits class defines all computational operations
     
    4243  /// If the numeric type does not have infinity value, then the maximum
    4344  /// value is used as extremal infinity value.
     45  ///
     46  /// \see BellmanFordToleranceOperationTraits
    4447  template <
    4548    typename V,
    4649    bool has_inf = std::numeric_limits<V>::has_infinity>
    4750  struct BellmanFordDefaultOperationTraits {
    48     /// \e
     51    /// \brief Value type for the algorithm.
    4952    typedef V Value;
    5053    /// \brief Gives back the zero value of the type.
     
    8285    static bool less(const Value& left, const Value& right) {
    8386      return left < right;
     87    }
     88  };
     89
     90  /// \brief Operation traits for the BellmanFord algorithm class
     91  /// using tolerance.
     92  ///
     93  /// This operation traits class defines all computational operations
     94  /// and constants that are used in the Bellman-Ford algorithm.
     95  /// The only difference between this implementation and
     96  /// \ref BellmanFordDefaultOperationTraits is that this class uses
     97  /// the \ref Tolerance "tolerance technique" in its \ref less()
     98  /// function.
     99  ///
     100  /// \tparam V The value type.
     101  /// \tparam eps The epsilon value for the \ref less() function.
     102  /// By default, it is the epsilon value used by \ref Tolerance
     103  /// "Tolerance<V>".
     104  ///
     105  /// \see BellmanFordDefaultOperationTraits
     106#ifdef DOXYGEN
     107  template <typename V, V eps>
     108#else
     109  template <
     110    typename V,
     111    V eps = Tolerance<V>::def_epsilon>
     112#endif
     113  struct BellmanFordToleranceOperationTraits {
     114    /// \brief Value type for the algorithm.
     115    typedef V Value;
     116    /// \brief Gives back the zero value of the type.
     117    static Value zero() {
     118      return static_cast<Value>(0);
     119    }
     120    /// \brief Gives back the positive infinity value of the type.
     121    static Value infinity() {
     122      return std::numeric_limits<Value>::infinity();
     123    }
     124    /// \brief Gives back the sum of the given two elements.
     125    static Value plus(const Value& left, const Value& right) {
     126      return left + right;
     127    }
     128    /// \brief Gives back \c true only if the first value is less than
     129    /// the second.
     130    static bool less(const Value& left, const Value& right) {
     131      return left + eps < right;
    84132    }
    85133  };
     
    108156    /// It defines the used operations and the infinity value for the
    109157    /// given \c Value type.
    110     /// \see BellmanFordDefaultOperationTraits
     158    /// \see BellmanFordDefaultOperationTraits,
     159    /// BellmanFordToleranceOperationTraits
    111160    typedef BellmanFordDefaultOperationTraits<Value> OperationTraits;
    112161
     
    838887    /// It defines the used operations and the infinity value for the
    839888    /// given \c Value type.
    840     /// \see BellmanFordDefaultOperationTraits
     889    /// \see BellmanFordDefaultOperationTraits,
     890    /// BellmanFordToleranceOperationTraits
    841891    typedef BellmanFordDefaultOperationTraits<Value> OperationTraits;
    842892
  • lemon/bits/edge_set_extender.h

    r968 r956  
    281281    typedef EdgeSetExtender Graph;
    282282
    283     typedef True UndirectedTag;
    284 
    285283    typedef typename Parent::Node Node;
    286284    typedef typename Parent::Arc Arc;
  • lemon/bits/graph_adaptor_extender.h

    r965 r664  
    182182    typedef GraphAdaptorExtender Adaptor;
    183183
    184     typedef True UndirectedTag;
    185 
    186184    typedef typename Parent::Node Node;
    187185    typedef typename Parent::Arc Arc;
  • lemon/bits/path_dump.h

    r973 r576  
    5050
    5151    bool empty() const {
    52       return predMap[target] == INVALID;
     52      return predMap[target] != INVALID;
    5353    }
    5454
     
    124124
    125125    bool empty() const {
    126       return predMatrixMap(source, target) == INVALID;
     126      return source != target;
    127127    }
    128128
  • lemon/core.h

    r986 r956  
    395395      static void copy(const From& from, Digraph &to,
    396396                       NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
    397         to.clear();
    398397        for (typename From::NodeIt it(from); it != INVALID; ++it) {
    399398          nodeRefMap[it] = to.addNode();
     
    423422      static void copy(const From& from, Graph &to,
    424423                       NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
    425         to.clear();
    426424        for (typename From::NodeIt it(from); it != INVALID; ++it) {
    427425          nodeRefMap[it] = to.addNode();
  • lemon/dfs.h

    r1010 r956  
    566566    void start(Node t)
    567567    {
    568       while ( !emptyQueue() && !(*_reached)[t] )
     568      while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
    569569        processNextArc();
    570570    }
     
    15131513    /// with addSource() before using this function.
    15141514    void start(Node t) {
    1515       while ( !emptyQueue() && !(*_reached)[t] )
     1515      while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
    15161516        processNextArc();
    15171517    }
  • lemon/hartmann_orlin_mmc.h

    r959 r956  
    3939  /// \tparam GR The type of the digraph.
    4040  /// \tparam CM The type of the cost map.
    41   /// It must conform to the \ref concepts::ReadMap "ReadMap" concept.
     41  /// It must conform to the \ref concepts::Rea_data "Rea_data" concept.
    4242#ifdef DOXYGEN
    4343  template <typename GR, typename CM>
     
    100100  /// a directed cycle of minimum mean cost in a digraph
    101101  /// \ref amo93networkflows, \ref dasdan98minmeancycle.
    102   /// It is an improved version of \ref KarpMmc "Karp"'s original algorithm,
     102  /// It is an improved version of \ref Karp "Karp"'s original algorithm,
    103103  /// it applies an efficient early termination scheme.
    104104  /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e).
  • lemon/network_simplex.h

    r978 r956  
    10781078        ART_COST = std::numeric_limits<Cost>::max() / 2 + 1;
    10791079      } else {
    1080         ART_COST = 0;
     1080        ART_COST = std::numeric_limits<Cost>::min();
    10811081        for (int i = 0; i != _arc_num; ++i) {
    10821082          if (_cost[i] > ART_COST) ART_COST = _cost[i];
     
    15901590      if (_sum_supply == 0) {
    15911591        if (_stype == GEQ) {
    1592           Cost max_pot = -std::numeric_limits<Cost>::max();
     1592          Cost max_pot = std::numeric_limits<Cost>::min();
    15931593          for (int i = 0; i != _node_num; ++i) {
    15941594            if (_pi[i] > max_pot) max_pot = _pi[i];
  • lemon/preflow.h

    r1029 r956  
    544544          _flow->set(e, (*_capacity)[e]);
    545545          (*_excess)[u] += rem;
     546          if (u != _target && !_level->active(u)) {
     547            _level->activate(u);
     548          }
    546549        }
    547550      }
     
    553556          _flow->set(e, 0);
    554557          (*_excess)[v] += rem;
    555         }
    556       }
    557       for (NodeIt n(_graph); n != INVALID; ++n)
    558         if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n]))
    559           _level->activate(n);
    560          
     558          if (v != _target && !_level->active(v)) {
     559            _level->activate(v);
     560          }
     561        }
     562      }
    561563      return true;
    562564    }
     
    575577      _phase = true;
    576578
    577       while (true) {
     579      Node n = _level->highestActive();
     580      int level = _level->highestActiveLevel();
     581      while (n != INVALID) {
    578582        int num = _node_num;
    579583
    580         Node n = INVALID;
    581         int level = -1;
    582 
    583         while (num > 0) {
    584           n = _level->highestActive();
    585           if (n == INVALID) goto first_phase_done;
    586           level = _level->highestActiveLevel();
    587           --num;
    588          
     584        while (num > 0 && n != INVALID) {
    589585          Value excess = (*_excess)[n];
    590586          int new_level = _level->maxLevel();
     
    652648            _level->deactivate(n);
    653649          }
     650
     651          n = _level->highestActive();
     652          level = _level->highestActiveLevel();
     653          --num;
    654654        }
    655655
    656656        num = _node_num * 20;
    657         while (num > 0) {
    658           while (level >= 0 && _level->activeFree(level)) {
    659             --level;
    660           }
    661           if (level == -1) {
    662             n = _level->highestActive();
    663             level = _level->highestActiveLevel();
    664             if (n == INVALID) goto first_phase_done;
    665           } else {
    666             n = _level->activeOn(level);
    667           }
    668           --num;
    669 
     657        while (num > 0 && n != INVALID) {
    670658          Value excess = (*_excess)[n];
    671659          int new_level = _level->maxLevel();
     
    733721            _level->deactivate(n);
    734722          }
    735         }
    736       }
    737     first_phase_done:;
     723
     724          while (level >= 0 && _level->activeFree(level)) {
     725            --level;
     726          }
     727          if (level == -1) {
     728            n = _level->highestActive();
     729            level = _level->highestActiveLevel();
     730          } else {
     731            n = _level->activeOn(level);
     732          }
     733          --num;
     734        }
     735      }
    738736    }
    739737
  • test/CMakeLists.txt

    r1035 r953  
    4646
    4747IF(LEMON_HAVE_LP)
    48   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    49     ADD_EXECUTABLE(lp_test lp_test.cc)
    50   ELSE()
    51     ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
    52   ENDIF()
    53 
     48  ADD_EXECUTABLE(lp_test lp_test.cc)
    5449  SET(LP_TEST_LIBS lemon)
    5550
     
    8782
    8883IF(LEMON_HAVE_MIP)
    89   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    90     ADD_EXECUTABLE(mip_test mip_test.cc)
    91   ELSE()
    92     ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
    93   ENDIF()
    94 
     84  ADD_EXECUTABLE(mip_test mip_test.cc)
    9585  SET(MIP_TEST_LIBS lemon)
    9686
     
    128118
    129119FOREACH(TEST_NAME ${TESTS})
    130   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    131     ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
    132   ELSE()
    133     ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
    134   ENDIF()
     120  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
    135121  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
    136122  ADD_TEST(${TEST_NAME} ${TEST_NAME})
    137   ADD_DEPENDENCIES(check ${TEST_NAME})
    138123ENDFOREACH()
  • test/bellman_ford_test.cc

    r960 r956  
    105105      ::SetDistMap<concepts::ReadWriteMap<Node,Value> >
    106106      ::SetOperationTraits<BellmanFordDefaultOperationTraits<Value> >
     107      ::SetOperationTraits<BellmanFordToleranceOperationTraits<Value, 0> >
    107108      ::Create bf_test(gr,length);
    108109
  • test/dfs_test.cc

    r1010 r956  
    5151  "@attributes\n"
    5252  "source 0\n"
    53   "target 5\n"
    54   "source1 6\n"
    55   "target1 3\n";
    56 
     53  "target 5\n";
    5754
    5855void checkDfsCompile()
     
    183180  Digraph G;
    184181  Node s, t;
    185   Node s1, t1;
    186182
    187183  std::istringstream input(test_lgf);
     
    189185    node("source", s).
    190186    node("target", t).
    191     node("source1", s1).
    192     node("target1", t1).
    193187    run();
    194188
     
    217211
    218212  {
    219   Dfs<Digraph> dfs(G);
    220   check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
    221   }
    222  
    223   {
    224213    NullMap<Node,Arc> myPredMap;
    225214    dfs(G).predMap(myPredMap).run(s);
  • test/graph_copy_test.cc

    r984 r463  
    3030  const int nn = 10;
    3131
    32   // Build a digraph
    3332  SmartDigraph from;
    3433  SmartDigraph::NodeMap<int> fnm(from);
     
    5352  }
    5453
    55   // Test digraph copy
    5654  ListDigraph to;
    5755  ListDigraph::NodeMap<int> tnm(to);
     
    7169    nodeCrossRef(ncr).arcCrossRef(ecr).
    7270    node(fn, tn).arc(fa, ta).run();
    73  
    74   check(countNodes(from) == countNodes(to), "Wrong copy.");
    75   check(countArcs(from) == countArcs(to), "Wrong copy.");
    7671
    7772  for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) {
     
    9691  check(tn == nr[fn], "Wrong copy.");
    9792  check(ta == er[fa], "Wrong copy.");
    98 
    99   // Test repeated copy
    100   digraphCopy(from, to).run();
    101  
    102   check(countNodes(from) == countNodes(to), "Wrong copy.");
    103   check(countArcs(from) == countArcs(to), "Wrong copy.");
    10493}
    10594
     
    10796  const int nn = 10;
    10897
    109   // Build a graph
    11098  SmartGraph from;
    11199  SmartGraph::NodeMap<int> fnm(from);
     
    135123  }
    136124
    137   // Test graph copy
    138125  ListGraph to;
    139126  ListGraph::NodeMap<int> tnm(to);
     
    157144    nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr).
    158145    node(fn, tn).arc(fa, ta).edge(fe, te).run();
    159 
    160   check(countNodes(from) == countNodes(to), "Wrong copy.");
    161   check(countEdges(from) == countEdges(to), "Wrong copy.");
    162   check(countArcs(from) == countArcs(to), "Wrong copy.");
    163146
    164147  for (SmartGraph::NodeIt it(from); it != INVALID; ++it) {
     
    198181  check(ta == ar[fa], "Wrong copy.");
    199182  check(te == er[fe], "Wrong copy.");
    200 
    201   // Test repeated copy
    202   graphCopy(from, to).run();
    203  
    204   check(countNodes(from) == countNodes(to), "Wrong copy.");
    205   check(countEdges(from) == countEdges(to), "Wrong copy.");
    206   check(countArcs(from) == countArcs(to), "Wrong copy.");
    207183}
    208184
  • test/preflow_test.cc

    r1029 r956  
    157157}
    158158
    159 void initFlowTest()
    160 {
    161   DIGRAPH_TYPEDEFS(SmartDigraph);
    162  
    163   SmartDigraph g;
    164   SmartDigraph::ArcMap<int> cap(g),iflow(g);
    165   Node s=g.addNode(); Node t=g.addNode();
    166   Node n1=g.addNode(); Node n2=g.addNode();
    167   Arc a;
    168   a=g.addArc(s,n1); cap[a]=20; iflow[a]=20;
    169   a=g.addArc(n1,n2); cap[a]=10; iflow[a]=0;
    170   a=g.addArc(n2,t); cap[a]=20; iflow[a]=0;
    171 
    172   Preflow<SmartDigraph> pre(g,cap,s,t);
    173   pre.init(iflow);
    174   pre.startFirstPhase();
    175   check(pre.flowValue() == 10, "The incorrect max flow value.");
    176   check(pre.minCut(s), "Wrong min cut (Node s).");
    177   check(pre.minCut(n1), "Wrong min cut (Node n1).");
    178   check(!pre.minCut(n2), "Wrong min cut (Node n2).");
    179   check(!pre.minCut(t), "Wrong min cut (Node t).");
    180 }
    181 
    182 
    183159int main() {
    184160
     
    271247        "The max flow value or the three min cut values are incorrect.");
    272248
    273   initFlowTest();
    274  
    275249  return 0;
    276250}
Note: See TracChangeset for help on using the changeset viewer.