COIN-OR::LEMON - Graph Library

Ignore:
Files:
39 added
26 deleted
140 edited

Legend:

Unmodified
Added
Removed
  • .hgignore

    r610 r944  
    2323lemon/stamp-h2
    2424doc/Doxyfile
     25doc/references.dox
    2526cmake/version.cmake
    2627.dirstamp
  • AUTHORS

    r320 r1148  
    1 The authors of the 1.x series are
     1The main developers of release series 1.x are
    22
    33 * Balazs Dezso <deba@inf.elte.hu>
     
    66 * Akos Ladanyi <ladanyi@tmit.bme.hu>
    77
    8 For more details on the actual contribution, please visit the history
    9 of the main LEMON source repository: http://lemon.cs.elte.hu/hg/lemon
     8For more complete list of contributors, please visit the history of
     9the LEMON source code repository: http://lemon.cs.elte.hu/hg/lemon
    1010
    11 Moreover, this version is heavily based on the 0.x series of
    12 LEMON. Here is the list of people who contributed to those versions.
     11Moreover, this version is heavily based on version 0.x of LEMON. Here
     12is the list of people who contributed to those versions.
    1313
    1414 * Mihaly Barasz <klao@cs.elte.hu>
     
    2424
    2525Again, please visit the history of the old LEMON repository for more
    26 details: http://lemon.cs.elte.hu/svn/lemon/trunk
     26details: http://lemon.cs.elte.hu/hg/lemon-0.x
  • CMakeLists.txt

    r791 r1344  
    1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
     2
     3IF(POLICY CMP0048)
     4  CMAKE_POLICY(SET CMP0048 OLD)
     5ENDIF(POLICY CMP0048)
     6
     7IF(POLICY CMP0026)
     8  #This is for copying the dll's needed by glpk (in lp_test and mip_test)
     9  CMAKE_POLICY(SET CMP0026 OLD)
     10ENDIF(POLICY CMP0026)
    211
    312SET(PROJECT_NAME "LEMON")
    413PROJECT(${PROJECT_NAME})
     14
     15INCLUDE(FindPythonInterp)
     16INCLUDE(FindWget)
    517
    618IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     
    1022ELSE()
    1123  EXECUTE_PROCESS(
    12     COMMAND hg id -i
     24    COMMAND
     25    hg log -r. --template "{latesttag}"
    1326    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    14     OUTPUT_VARIABLE HG_REVISION
     27    OUTPUT_VARIABLE HG_REVISION_TAG
    1528    ERROR_QUIET
    1629    OUTPUT_STRIP_TRAILING_WHITESPACE
    1730  )
    18   IF(HG_REVISION STREQUAL "")
    19     SET(HG_REVISION "hg-tip")
     31  EXECUTE_PROCESS(
     32    COMMAND
     33    hg log -r. --template "{latesttagdistance}"
     34    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     35    OUTPUT_VARIABLE HG_REVISION_DIST
     36    ERROR_QUIET
     37    OUTPUT_STRIP_TRAILING_WHITESPACE
     38  )
     39  EXECUTE_PROCESS(
     40    COMMAND
     41    hg log -r. --template "{node|short}"
     42    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     43    OUTPUT_VARIABLE HG_REVISION_ID
     44    ERROR_QUIET
     45    OUTPUT_STRIP_TRAILING_WHITESPACE
     46  )
     47
     48  IF(HG_REVISION_TAG STREQUAL "")
     49    SET(HG_REVISION_ID "hg-tip")
     50  ELSE()
     51    IF(HG_REVISION_TAG STREQUAL "null")
     52      SET(HG_REVISION_TAG "trunk")
     53    ELSEIF(HG_REVISION_TAG MATCHES "^r")
     54      STRING(SUBSTRING ${HG_REVISION_TAG} 1 -1 HG_REVISION_TAG)
     55    ENDIF()
     56    IF(HG_REVISION_DIST STREQUAL "0")
     57      SET(HG_REVISION ${HG_REVISION_TAG})
     58    ELSE()
     59      SET(HG_REVISION
     60        "${HG_REVISION_TAG}+${HG_REVISION_DIST}-${HG_REVISION_ID}")
     61    ENDIF()
    2062  ENDIF()
     63
    2164  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    2265ENDIF()
     
    2871FIND_PACKAGE(Doxygen)
    2972FIND_PACKAGE(Ghostscript)
    30 FIND_PACKAGE(GLPK 4.33)
    31 FIND_PACKAGE(CPLEX)
    32 FIND_PACKAGE(COIN)
     73
     74IF(WIN32)
     75  SET(LEMON_WIN32 TRUE)
     76ENDIF(WIN32)
     77
     78SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
     79SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
     80SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
     81SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.")
     82
     83IF(LEMON_ENABLE_GLPK)
     84  FIND_PACKAGE(GLPK 4.33)
     85ENDIF(LEMON_ENABLE_GLPK)
     86IF(LEMON_ENABLE_ILOG)
     87  FIND_PACKAGE(ILOG)
     88ENDIF(LEMON_ENABLE_ILOG)
     89IF(LEMON_ENABLE_COIN)
     90  FIND_PACKAGE(COIN)
     91ENDIF(LEMON_ENABLE_COIN)
     92IF(LEMON_ENABLE_SOPLEX)
     93  FIND_PACKAGE(SOPLEX)
     94ENDIF(LEMON_ENABLE_SOPLEX)
     95
     96IF(GLPK_FOUND)
     97  SET(LEMON_HAVE_LP TRUE)
     98  SET(LEMON_HAVE_MIP TRUE)
     99  SET(LEMON_HAVE_GLPK TRUE)
     100ENDIF(GLPK_FOUND)
     101IF(ILOG_FOUND)
     102  SET(LEMON_HAVE_LP TRUE)
     103  SET(LEMON_HAVE_MIP TRUE)
     104  SET(LEMON_HAVE_CPLEX TRUE)
     105ENDIF(ILOG_FOUND)
     106IF(COIN_FOUND)
     107  SET(LEMON_HAVE_LP TRUE)
     108  SET(LEMON_HAVE_MIP TRUE)
     109  SET(LEMON_HAVE_CLP TRUE)
     110  SET(LEMON_HAVE_CBC TRUE)
     111ENDIF(COIN_FOUND)
     112IF(SOPLEX_FOUND)
     113  SET(LEMON_HAVE_LP TRUE)
     114  SET(LEMON_HAVE_SOPLEX TRUE)
     115ENDIF(SOPLEX_FOUND)
     116
     117IF(ILOG_FOUND)
     118  SET(DEFAULT_LP "CPLEX")
     119  SET(DEFAULT_MIP "CPLEX")
     120ELSEIF(COIN_FOUND)
     121  SET(DEFAULT_LP "CLP")
     122  SET(DEFAULT_MIP "CBC")
     123ELSEIF(GLPK_FOUND)
     124  SET(DEFAULT_LP "GLPK")
     125  SET(DEFAULT_MIP "GLPK")
     126ELSEIF(SOPLEX_FOUND)
     127  SET(DEFAULT_LP "SOPLEX")
     128ENDIF()
     129
     130IF(NOT LEMON_DEFAULT_LP OR
     131    (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
     132    (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
     133    (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR
     134    (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX")))
     135  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     136    "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
     137ELSE()
     138  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     139    "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)")
     140ENDIF()
     141IF(NOT LEMON_DEFAULT_MIP OR
     142    (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
     143    (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
     144    (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
     145  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
     146    "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
     147ELSE()
     148  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
     149    "Default MIP solver backend (GLPK, CPLEX or CBC)")
     150ENDIF()
     151
     152
     153IF(DEFINED ENV{LEMON_CXX_WARNING})
     154  SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
     155ELSE()
     156  IF(CMAKE_COMPILER_IS_GNUCXX)
     157    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 -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas")
     158    SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb")
     159    SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
     160  ELSEIF(MSVC)
     161    # This part is unnecessary 'casue the same is set by the lemon/core.h.
     162    # Still kept as an example.
     163
     164    # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
     165
     166    # Suppressed warnings:
     167    # C4250: 'class1' : inherits 'class2::member' via dominance
     168    # C4267: conversion from 'size_t' to 'type', possible loss of data
     169    # C4355: 'this' : used in base member initializer list
     170    # C4503: 'function' : decorated name length exceeded, name was truncated
     171    # C4800: 'type' : forcing value to bool 'true' or 'false'
     172    #        (performance warning)
     173    # C4996: 'function': was declared deprecated
     174  ELSE()
     175    SET(CXX_WARNING "-Wall")
     176  ENDIF()
     177ENDIF()
     178SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
     179
     180SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
     181
     182IF(MSVC)
     183  SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
     184  SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
     185    "Flags used by the C++ compiler during maintainer builds."
     186    )
     187  SET( CMAKE_C_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
     188    "Flags used by the C compiler during maintainer builds."
     189    )
     190  SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
     191    "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
     192    "Flags used for linking binaries during maintainer builds."
     193    )
     194  SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
     195    "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
     196    "Flags used by the shared libraries linker during maintainer builds."
     197    )
     198ELSE()
     199  SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
     200    "Flags used by the C++ compiler during maintainer builds."
     201    )
     202  SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
     203    "Flags used by the C compiler during maintainer builds."
     204    )
     205  SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
     206    "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
     207    "Flags used for linking binaries during maintainer builds."
     208    )
     209  SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
     210    "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
     211    "Flags used by the shared libraries linker during maintainer builds."
     212    )
     213ENDIF()
     214
     215MARK_AS_ADVANCED(
     216    CMAKE_CXX_FLAGS_MAINTAINER
     217    CMAKE_C_FLAGS_MAINTAINER
     218    CMAKE_EXE_LINKER_FLAGS_MAINTAINER
     219    CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
     220
     221IF(CMAKE_CONFIGURATION_TYPES)
     222  LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
     223  LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
     224  SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
     225      "Add the configurations that we need"
     226      FORCE)
     227 endif()
     228
     229IF(NOT CMAKE_BUILD_TYPE)
     230  SET(CMAKE_BUILD_TYPE "Release")
     231ENDIF()
     232
     233SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
     234    "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Maintainer."
     235    FORCE )
     236
    33237
    34238INCLUDE(CheckTypeSize)
     
    36240SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
    37241
    38 INCLUDE(FindPythonInterp)
     242INCLUDE(FindThreads)
     243
     244IF(NOT LEMON_THREADING)
     245  IF(CMAKE_USE_PTHREADS_INIT)
     246    SET(LEMON_THREADING "Pthread")
     247  ELSEIF(CMAKE_USE_WIN32_THREADS_INIT)
     248    SET(LEMON_THREADING "Win32")
     249  ELSE()
     250    SET(LEMON_THREADING "None")
     251  ENDIF()
     252ENDIF()
     253
     254SET( LEMON_THREADING "${LEMON_THREADING}" CACHE STRING
     255  "Choose the threading library, options are: Pthread Win32 None."
     256  FORCE )
     257
     258IF(LEMON_THREADING STREQUAL "Pthread")
     259  SET(LEMON_USE_PTHREAD TRUE)
     260ELSEIF(LEMON_THREADING STREQUAL "Win32")
     261  SET(LEMON_USE_WIN32_THREADS TRUE)
     262ENDIF()
    39263
    40264ENABLE_TESTING()
     265
     266IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
     267  ADD_CUSTOM_TARGET(check ALL COMMAND ${CMAKE_CTEST_COMMAND})
     268ELSE()
     269  ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
     270ENDIF()
    41271
    42272ADD_SUBDIRECTORY(lemon)
    43273IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     274  ADD_SUBDIRECTORY(contrib)
    44275  ADD_SUBDIRECTORY(demo)
    45276  ADD_SUBDIRECTORY(tools)
     
    65296ENDIF()
    66297
    67 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
     298CONFIGURE_FILE(
     299  ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in
     300  ${PROJECT_BINARY_DIR}/cmake/version.cmake
     301  @ONLY
     302)
     303
     304SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME})
     305STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME)
     306SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION})
     307ADD_CUSTOM_TARGET(dist
     308  COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
     309  COMMAND hg archive ${ARCHIVE_NAME}
     310  COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake
     311  COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME}
     312  COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME}
     313  COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html
     314  COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME}
     315  COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME}
     316  COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     317  COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     318  COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     319  COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
     320  COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     321  DEPENDS html
     322  WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
     323
     324# CPACK config (Basically for NSIS)
     325IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    68326  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    69327  SET(CPACK_PACKAGE_VENDOR "EGRES")
  • INSTALL

    r615 r1233  
    22=========================
    33
    4 Since you are reading this I assume you already obtained one of the release
    5 tarballs and successfully extracted it. The latest version of LEMON is
    6 available at our web page (http://lemon.cs.elte.hu/).
     4This file contains instructions for building and installing LEMON from
     5source on Linux. The process on Windows is similar.
    76
    8 LEMON provides two different build environments, one is based on "autotool",
    9 while the other is based on "cmake". This file contains instructions only for
    10 the former one, which is the recommended build environment on Linux, Mac OSX
    11 and other unices or if you use Cygwin on Windows. For cmake installation
    12 instructions visit http://lemon.cs.elte.hu.
     7Note that it is not necessary to install LEMON in order to use
     8it. Instead, you can easily integrate it with your own code
     9directly. For instructions, see
     10https://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile
     11
    1312
    1413In order to install LEMON from the extracted source tarball you have to
    1514issue the following commands:
    1615
    17    1. `cd lemon-x.y.z'
     16   1. Step into the root of the source directory.
    1817
    19       This command changes to the directory which was created when you
    20       extracted the sources. The x.y.z part is a version number.
     18      $ cd lemon-x.y.z
    2119
    22    2. `./configure'
     20   2. Create a build subdirectory and step into it.
    2321
    24       This command runs the configure shell script, which does some checks and
    25       creates the makefiles.
     22      $ mkdir build
     23      $ cd build
    2624
    27    3. `make'
     25   3. Perform system checks and create the makefiles.
    2826
    29       This command compiles the non-template part of LEMON into libemon.a
    30       file. It also compiles the programs in the tools subdirectory by
    31       default.
     27      $ cmake ..
    3228
    33    4. `make check'
     29   4. Build LEMON.
    3430
    35       This step is optional, but recommended. It runs the test programs that
    36       we developed for LEMON to check whether the library works properly on
    37       your platform.
     31      $ make
    3832
    39    5. `make install'
     33      This command compiles the non-template part of LEMON into
     34      libemon.a file. It also compiles the programs in the 'tools' and
     35      'demo' subdirectories.
     36
     37   5. [Optional] Compile and run the self-tests.
     38
     39      $ make check
     40
     41   5. [Optional] Generate the user documentation.
     42
     43      $ make html
     44
     45      The release tarballs already include the documentation.
     46
     47      Note that for this step you need to have the following tools
     48      installed: Python, Doxygen, Graphviz, Ghostscript, LaTeX.
     49
     50   6. [Optional] Install LEMON
     51
     52      $ make install
    4053
    4154      This command installs LEMON under /usr/local (you will need root
    42       privileges to be able to do that). If you want to install it to some
    43       other location, then pass the --prefix=DIRECTORY flag to configure in
    44       step 2. For example: `./configure --prefix=/home/username/lemon'.
    45 
    46    6. `make install-html'
    47 
    48       This command installs the documentation under share/doc/lemon/docs. The
    49       generated documentation is included in the tarball. If you want to
    50       generate it yourself, then run `make html'. Note that for this you need
    51       to have the following programs installed: Doxygen, Graphviz, Ghostscript,
    52       Latex.
    53 
     55      privileges to be able to do that). If you want to install it to
     56      some other location, then pass the
     57      -DCMAKE_INSTALL_PREFIX=DIRECTORY flag to cmake in Step 3.
     58      For example:
     59     
     60      $ cmake -DCMAKE_INSTALL_PREFIX=/home/username/lemon'
    5461
    5562Configure Options and Variables
    5663===============================
    5764
    58 In step 2 you can customize the actions of configure by setting variables
    59 and passing options to it. This can be done like this:
    60 `./configure [OPTION]... [VARIABLE=VALUE]...'
     65In Step 3, you can customize the build process by passing options to CMAKE.
    6166
    62 Below you will find some useful variables and options (see `./configure --help'
    63 for more):
     67$ cmake [OPTIONS] ..
    6468
    65 CXX='comp'
     69You find a list of the most useful options below.
    6670
    67   Change the C++ compiler to 'comp'.
    68 
    69 CXXFLAGS='flags'
    70 
    71   Pass the 'flags' to the compiler. For example CXXFLAGS='-O3 -march=pentium-m'
    72   turns on generation of aggressively optimized Pentium-M specific code.
    73 
    74 --prefix=PREFIX
     71-DCMAKE_INSTALL_PREFIX=PREFIX
    7572
    7673  Set the installation prefix to PREFIX. By default it is /usr/local.
    7774
    78 --enable-tools
     75-DCMAKE_BUILD_TYPE=[Release|Debug|Maintainer|...]
    7976
    80    Build the programs in the tools subdirectory (default).
     77  This sets the compiler options. The choices are the following
    8178
    82 --disable-tools
     79  'Release': A strong optimization is turned on (-O3 with gcc). This
     80    is the default setting and we strongly recommend using this for
     81    the final compilation.
    8382
    84    Do not build the programs in the tools subdirectory.
     83  'Debug': Optimization is turned off and debug info is added (-O0
     84    -ggdb with gcc). If is recommended during the development.
    8585
    86 --with-glpk[=PREFIX]
     86  'Maintainer': The same as 'Debug' but the compiler warnings are
     87    converted to errors (-Werror with gcc). In addition, 'make' will
     88    also automatically compile and execute the test codes. It is the
     89    best way of ensuring that LEMON codebase is clean and safe.
    8790
    88    Enable GLPK support (default). You should specify the prefix too if
    89    you installed GLPK to some non-standard location (e.g. your home
    90    directory). If it is not found, GLPK support will be disabled.
     91  'RelWithDebInfo': Optimized build with debug info.
    9192
    92 --with-glpk-includedir=DIR
     93  'MinSizeRel': Size optimized build (-Os with gcc)
    9394
    94    The directory where the GLPK header files are located. This is only
    95    useful when the GLPK headers and libraries are not under the same
    96    prefix (which is unlikely).
     95-DTEST_WITH_VALGRIND=YES
    9796
    98 --with-glpk-libdir=DIR
     97  Using this, the test codes will be executed using valgrind. It is a
     98  very effective way of identifying indexing problems and memory leaks.
    9999
    100    The directory where the GLPK libraries are located. This is only
    101    useful when the GLPK headers and libraries are not under the same
    102    prefix (which is unlikely).
     100-DCMAKE_CXX_COMPILER=path-to-compiler
    103101
    104 --without-glpk
     102  Change the compiler to be used.
    105103
    106    Disable GLPK support.
     104-DBUILD_SHARED_LIBS=TRUE
    107105
    108 --with-cplex[=PREFIX]
     106  Build shared library instead of static one. Think twice if you
     107  really want to use this option.
    109108
    110    Enable CPLEX support (default). You should specify the prefix too
    111    if you installed CPLEX to some non-standard location
    112    (e.g. /opt/ilog/cplex75). If it is not found, CPLEX support will be
    113    disabled.
     109-DLEMON_DOC_SOURCE_BROWSER=YES
    114110
    115 --with-cplex-includedir=DIR
     111  Include the browsable cross referenced LEMON source code into the
     112  doc. It makes the doc quite bloated, but may be useful for
     113  developing LEMON itself.
    116114
    117    The directory where the CPLEX header files are located. This is
    118    only useful when the CPLEX headers and libraries are not under the
    119    same prefix (e.g.  /usr/local/cplex/cplex75/include).
     115-DLEMON_DOC_USE_MATHJAX=YES
    120116
    121 --with-cplex-libdir=DIR
     117  Use MathJax (http://mathjax.org) for rendering the math formulae in
     118  the doc.  It of much higher quality compared to the default LaTeX
     119  generated static images and it allows copy&paste of the formulae to
     120  LaTeX, Open Office, MS Word etc. documents.
    122121
    123    The directory where the CPLEX libraries are located. This is only
    124    useful when the CPLEX headers and libraries are not under the same
    125    prefix (e.g.
    126    /usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt).
     122  On the other hand, it needs either Internet access or a locally
     123  installed version of MathJax to properly render the doc.
    127124
    128 --without-cplex
     125-DLEMON_DOC_MATHJAX_RELPATH=DIRECTORY
     126 
     127  The location of the MathJax library. It defaults to
     128  http://www.mathjax.org/mathjax, which necessitates Internet access
     129  for proper rendering. The easiest way to make it usable offline is
     130  to set this parameter to 'mathjax' and copy all files of the MathJax
     131  library into the 'doc/html/mathjax' subdirectory of the build
     132  location.
    129133
    130    Disable CPLEX support.
     134  See http://docs.mathjax.org/en/latest/installation.html for more details.
    131135
    132 --with-soplex[=PREFIX]
     136 
     137-DLEMON_ENABLE_GLPK=NO
     138-DLEMON_ENABLE_COIN=NO
     139-DLEMON_ENABLE_ILOG=NO
    133140
    134    Enable SoPlex support (default). You should specify the prefix too if
    135    you installed SoPlex to some non-standard location (e.g. your home
    136    directory). If it is not found, SoPlex support will be disabled.
     141  Enable optional third party libraries. They are all enabled by default.
    137142
    138 --with-soplex-includedir=DIR
     143-DLEMON_DEFAULT_LP=GLPK
    139144
    140    The directory where the SoPlex header files are located. This is only
    141    useful when the SoPlex headers and libraries are not under the same
    142    prefix (which is unlikely).
     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.
    143148
    144 --with-soplex-libdir=DIR
     149-DLEMON_DEFAULT_MIP=GLPK
    145150
    146    The directory where the SoPlex libraries are located. This is only
    147    useful when the SoPlex headers and libraries are not under the same
    148    prefix (which is unlikely).
     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.
    149154
    150 --without-soplex
     155-DGLPK_ROOT_DIR=DIRECTORY
     156-DCOIN_ROOT_DIR=DIRECTORY
     157-DILOG_ROOT_DIR=DIRECTORY
    151158
    152    Disable SoPlex support.
     159  Root directory prefixes of optional third party libraries.
    153160
    154 --with-coin[=PREFIX]
     161Makefile Variables
     162==================
    155163
    156    Enable support for COIN-OR solvers (CLP and CBC). You should
    157    specify the prefix too. (by default, COIN-OR tools install
    158    themselves to the source code directory). This command enables the
    159    solvers that are actually found.
     164make VERBOSE=1
    160165
    161 --with-coin-includedir=DIR
    162 
    163    The directory where the COIN-OR header files are located. This is
    164    only useful when the COIN-OR headers and libraries are not under
    165    the same prefix (which is unlikely).
    166 
    167 --with-coin-libdir=DIR
    168 
    169    The directory where the COIN-OR libraries are located. This is only
    170    useful when the COIN-OR headers and libraries are not under the
    171    same prefix (which is unlikely).
    172 
    173 --without-coin
    174 
    175    Disable COIN-OR support.
     166   This results in a more verbose output by showing the full
     167   compiler and linker commands.
  • LICENSE

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

    r712 r1320  
     12014-07-07 Version 1.3.1 released
     2
     3        Bugfix release.
     4
     5        #484: Require CMAKE 2.8
     6        #471, #472, #480: Various clang compatibility fixes
     7        #481, #482: Fix shared lib build and versioning
     8        #476: Fix invalid map query in NearestNeighborTsp
     9        #478: Bugfix in debug checking and lower bound handling
     10              in min cost flow algorithms
     11        #479, #465: Bugfix in default LP/MIP backend settings
     12        #476: Bugfix in tsp_test
     13        #487: Add missing include header and std:: namespace spec.
     14        #474: Fix division by zero error in NetworkSimplex
     15
     162013-08-10 Version 1.3 released
     17
     18        This is major feature release
     19
     20        * New data structures
     21
     22          #69 : Bipartite graph concepts and implementations
     23
     24        * New algorithms
     25
     26          #177: Port Edmonds-Karp algorithm
     27          #380, #405: Heuristic algorithm for the max clique problem
     28          #386: Heuristic algorithms for symmetric TSP
     29          ----: Nagamochi-Ibaraki algorithm [5087694945e4]
     30          #397, #56: Max. cardinality search
     31
     32        * Other new features
     33
     34          #223: Thread safe graph and graph map implementations
     35          #442: Different TimeStamp print formats
     36          #457: File export functionality to LpBase
     37          #362: Bidirectional iterator support for radixSort()
     38
     39        * Implementation improvements
     40
     41          ----: Network Simplex
     42                #391: Better update process, pivot rule and arc mixing
     43                #435: Improved Altering List pivot rule
     44          #417: Various fine tunings in CostScaling
     45          #438: Optional iteration limit in HowardMmc
     46          #436: Ensure strongly polynomial running time for CycleCanceling
     47                while keeping the same performance
     48          ----: Make the CBC interface be compatible with latest CBC releases
     49                [ee581a0ecfbf]
     50
     51        * CMAKE has become the default build environment (#434)
     52
     53          ----: Autotool support has been dropped
     54          ----: Improved LP/MIP configuration
     55                #465: Enable/disable options for LP/MIP backends
     56                #446: Better CPLEX discovery
     57                #460: Add cmake config to find SoPlex
     58          ----: Allow CPACK configuration on all platforms
     59          #390: Add 'Maintainer' CMAKE build type
     60          #388: Add 'check' target.
     61          #401: Add contrib dir
     62          #389: Better version string setting in CMAKE
     63          #433: Support shared library build   
     64          #416: Support testing with valgrind
     65 
     66        * Doc improvements
     67
     68          #395: SOURCE_BROWSER Doxygen switch is configurable from CMAKE
     69                update-external-tags CMAKE target
     70          #455: Optionally use MathJax for rendering the math formulae
     71          #402, #437, #459, #456, #463: Various doc improvements
     72
     73        * Bugfixes (compared to release 1.2):
     74
     75          #432: Add missing doc/template.h and doc/references.bib to release
     76                tarball
     77          ----: Intel C++ compatibility fixes
     78          #441: Fix buggy reinitialization in _solver_bits::VarIndex::clear()
     79          #444: Bugfix in path copy constructors and assignment operators
     80          #447: Bugfix in AllArcLookUp<>
     81          #448: Bugfix in adaptor_test.cc
     82          #449: Fix clang compilation warnings and errors
     83          #440: Fix a bug + remove redundant typedefs in dimacs-solver
     84          #453: Avoid GCC 4.7 compiler warnings
     85          #445: Fix missing initialization in CplexEnv::CplexEnv()
     86          #428: Add missing lemon/lemon.pc.cmake to the release tarball
     87          #393: Create and install lemon.pc
     88          #429: Fix VS warnings
     89          #430: Fix LpBase::Constr two-side limit bug
     90          #392: Bug fix in Dfs::start(s,t)
     91          #414: Fix wrong initialization in Preflow
     92          #418: Better Win CodeBlock/MinGW support
     93          #419: Build environment improvements
     94                - Build of mip_test and lp_test precede the running of the tests
     95                - Also search for coin libs under ${COIN_ROOT_DIR}/lib/coin
     96                - Do not look for COIN_VOL libraries
     97          #382: Allow lgf file without Arc maps
     98          #417: Bug fix in CostScaling
     99          #366: Fix Pred[Matrix]MapPath::empty()
     100          #371: Bug fix in (di)graphCopy()
     101                The target graph is cleared before adding nodes and arcs/edges.
     102          #364: Add missing UndirectedTags
     103          #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex
     104          #372: Fix a critical bug in preflow
     105          #461: Bugfix in assert.h
     106          #470: Fix compilation issues related to various gcc versions
     107          #446: Fix #define indicating CPLEX availability
     108          #294: Add explicit namespace to
     109                ignore_unused_variable_warning() usages
     110          #420: Bugfix in IterableValueMap
     111          #439: Bugfix in biNodeConnected()
     112
     113
     1142010-03-19 Version 1.2 released
     115
     116        This is major feature release
     117
     118        * New algorithms
     119          * Bellman-Ford algorithm (#51)
     120          * Minimum mean cycle algorithms (#179)
     121            * Karp, Hartman-Orlin and Howard algorithms
     122          * New minimum cost flow algorithms (#180)
     123            * Cost Scaling algorithms
     124            * Capacity Scaling algorithm
     125            * Cycle-Canceling algorithms
     126          * Planarity related algorithms (#62)
     127            * Planarity checking algorithm
     128            * Planar embedding algorithm
     129            * Schnyder's planar drawing algorithm
     130            * Coloring planar graphs with five or six colors
     131          * Fractional matching algorithms (#314)
     132        * New data structures
     133          * StaticDigraph structure (#68)
     134          * Several new priority queue structures (#50, #301)
     135            * Fibonacci, Radix, Bucket, Pairing, Binomial
     136              D-ary and fourary heaps (#301)
     137          * Iterable map structures (#73)
     138        * Other new tools and functionality
     139          * Map utility functions (#320)
     140          * Reserve functions are added to ListGraph and SmartGraph (#311)
     141          * A resize() function is added to HypercubeGraph (#311)
     142          * A count() function is added to CrossRefMap (#302)
     143          * Support for multiple targets in Suurballe using fullInit() (#181)
     144          * Traits class and named parameters for Suurballe (#323)
     145          * Separate reset() and resetParams() functions in NetworkSimplex
     146            to handle graph changes (#327)
     147          * tolerance() functions are added to HaoOrlin (#306)
     148        * Implementation improvements
     149          * Improvements in weighted matching algorithms (#314)
     150            * Jumpstart initialization
     151          * ArcIt iteration is based on out-arc lists instead of in-arc lists
     152            in ListDigraph (#311)
     153          * Faster add row operation in CbcMip (#203)
     154          * Better implementation for split() in ListDigraph (#311)
     155          * ArgParser can also throw exception instead of exit(1) (#332)
     156        * Miscellaneous
     157          * A simple interactive bootstrap script
     158          * Doc improvements (#62,#180,#299,#302,#303,#304,#307,#311,#331,#315,
     159                #316,#319)
     160            * BibTeX references in the doc (#184)
     161          * Optionally use valgrind when running tests
     162          * Also check ReferenceMapTag in concept checks (#312)
     163          * dimacs-solver uses long long type by default.
     164        * Several bugfixes (compared to release 1.1):
     165          #295: Suppress MSVC warnings using pragmas
     166          ----: Various CMAKE related improvements
     167                * Remove duplications from doc/CMakeLists.txt
     168                * Rename documentation install folder from 'docs' to 'html'
     169                * Add tools/CMakeLists.txt to the tarball
     170                * Generate and install LEMONConfig.cmake
     171                * Change the label of the html project in Visual Studio
     172                * Fix the check for the 'long long' type
     173                * Put the version string into config.h
     174                * Minor CMake improvements
     175                * Set the version to 'hg-tip' if everything fails
     176          #311: Add missing 'explicit' keywords
     177          #302: Fix the implementation and doc of CrossRefMap
     178          #308: Remove duplicate list_graph.h entry from source list
     179          #307: Bugfix in Preflow and Circulation
     180          #305: Bugfix and extension in the rename script
     181          #312: Also check ReferenceMapTag in concept checks
     182          #250: Bugfix in pathSource() and pathTarget()
     183          #321: Use pathCopy(from,to) instead of copyPath(to,from)
     184          #322: Distribure LEMONConfig.cmake.in
     185          #330: Bug fix in map_extender.h
     186          #336: Fix the date field comment of graphToEps() output
     187          #323: Bug fix in Suurballe
     188          #335: Fix clear() function in ExtendFindEnum
     189          #337: Use void* as the LPX object pointer
     190          #317: Fix (and improve) error message in mip_test.cc
     191                Remove unnecessary OsiCbc dependency
     192          #356: Allow multiple executions of weighted matching algorithms (#356)
     193
    11942009-05-13 Version 1.1 released
    2195
     
    73266          ----: Add missing unistd.h include to time_measure.h
    74267          #204: Compilation bug fixed in graph_to_eps.h with VS2005
    75           #214,#215: windows.h should never be included by lemon headers
     268          #214,#215: windows.h should never be included by LEMON headers
    76269          #230: Build systems check the availability of 'long long' type
    77270          #229: Default implementation of Tolerance<> is used for integer types
     
    952882008-10-13 Version 1.0 released
    96289
    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.
    101 
    102         * The major name changes compared to the 0.x series (see the
     290        This is the first stable release of LEMON. Compared to the 0.x
     291        release series, it features a considerably smaller but more
     292        matured set of tools. The API has also completely revised and
     293        changed in several places.
     294
     295        * The major name changes compared to the 0.x series (see the
    103296          Migration Guide in the doc for more details)
    104297          * Graph -> Digraph, UGraph -> Graph
    105298          * Edge -> Arc, UEdge -> Edge
    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)
     299          * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)
     300        * Other improvements
     301          * Better documentation
     302          * Reviewed and cleaned up codebase
     303          * CMake based build system (along with the autotools based one)
     304        * Contents of the library (ported from 0.x)
     305          * Algorithms
     306            * breadth-first search (bfs.h)
     307            * depth-first search (dfs.h)
     308            * Dijkstra's algorithm (dijkstra.h)
     309            * Kruskal's algorithm (kruskal.h)
     310          * Data structures
     311            * graph data structures (list_graph.h, smart_graph.h)
     312            * path data structures (path.h)
     313            * binary heap data structure (bin_heap.h)
     314            * union-find data structures (unionfind.h)
     315            * miscellaneous property maps (maps.h)
     316            * two dimensional vector and bounding box (dim2.h)
    124317          * Concepts
    125             * graph structure concepts (concepts/digraph.h, concepts/graph.h,
     318            * graph structure concepts (concepts/digraph.h, concepts/graph.h,
    126319              concepts/graph_components.h)
    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
     320            * concepts for other structures (concepts/heap.h, concepts/maps.h,
     321              concepts/path.h)
     322          * Tools
     323            * Mersenne twister random number generator (random.h)
     324            * tools for measuring cpu and wall clock time (time_measure.h)
     325            * tools for counting steps and events (counter.h)
     326            * tool for parsing command line arguments (arg_parser.h)
     327            * tool for visualizing graphs (graph_to_eps.h)
     328            * tools for reading and writing data in LEMON Graph Format
    136329              (lgf_reader.h, lgf_writer.h)
    137330            * tools to handle the anomalies of calculations with
    138               floating point numbers (tolerance.h)
     331              floating point numbers (tolerance.h)
    139332            * tools to manage RGB colors (color.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)
     333          * Infrastructure
     334            * extended assertion handling (assert.h)
     335            * exception classes and error handling (error.h)
     336            * concept checking (concept_check.h)
     337            * commonly used mathematical constants (math.h)
  • README

    r705 r921  
    1818   Copying, distribution and modification conditions and terms.
    1919
     20NEWS
     21
     22   News and version history.
     23
    2024INSTALL
    2125
     
    3438   Some example programs to make you easier to get familiar with LEMON.
    3539
     40scripts/
     41
     42   Scripts that make it easier to develop LEMON.
     43
    3644test/
    3745
  • cmake/FindCOIN.cmake

    r681 r1232  
    66FIND_LIBRARY(COIN_CBC_LIBRARY
    77  NAMES Cbc libCbc
     8  HINTS ${COIN_ROOT_DIR}/lib/coin
    89  HINTS ${COIN_ROOT_DIR}/lib
    910)
    1011FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
    1112  NAMES CbcSolver libCbcSolver
     13  HINTS ${COIN_ROOT_DIR}/lib/coin
    1214  HINTS ${COIN_ROOT_DIR}/lib
    1315)
    1416FIND_LIBRARY(COIN_CGL_LIBRARY
    1517  NAMES Cgl libCgl
     18  HINTS ${COIN_ROOT_DIR}/lib/coin
    1619  HINTS ${COIN_ROOT_DIR}/lib
    1720)
    1821FIND_LIBRARY(COIN_CLP_LIBRARY
    1922  NAMES Clp libClp
     23  HINTS ${COIN_ROOT_DIR}/lib/coin
    2024  HINTS ${COIN_ROOT_DIR}/lib
    2125)
    2226FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
    2327  NAMES CoinUtils libCoinUtils
     28  HINTS ${COIN_ROOT_DIR}/lib/coin
    2429  HINTS ${COIN_ROOT_DIR}/lib
    2530)
    2631FIND_LIBRARY(COIN_OSI_LIBRARY
    2732  NAMES Osi libOsi
     33  HINTS ${COIN_ROOT_DIR}/lib/coin
    2834  HINTS ${COIN_ROOT_DIR}/lib
    2935)
    3036FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
    3137  NAMES OsiCbc libOsiCbc
     38  HINTS ${COIN_ROOT_DIR}/lib/coin
    3239  HINTS ${COIN_ROOT_DIR}/lib
    3340)
    3441FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
    3542  NAMES OsiClp libOsiClp
     43  HINTS ${COIN_ROOT_DIR}/lib/coin
    3644  HINTS ${COIN_ROOT_DIR}/lib
    3745)
    3846FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
    3947  NAMES OsiVol libOsiVol
     48  HINTS ${COIN_ROOT_DIR}/lib/coin
    4049  HINTS ${COIN_ROOT_DIR}/lib
    4150)
    4251FIND_LIBRARY(COIN_VOL_LIBRARY
    4352  NAMES Vol libVol
     53  HINTS ${COIN_ROOT_DIR}/lib/coin
     54  HINTS ${COIN_ROOT_DIR}/lib
     55)
     56
     57FIND_LIBRARY(COIN_ZLIB_LIBRARY
     58  NAMES z libz
     59  HINTS ${COIN_ROOT_DIR}/lib/coin
     60  HINTS ${COIN_ROOT_DIR}/lib
     61)
     62FIND_LIBRARY(COIN_BZ2_LIBRARY
     63  NAMES bz2 libbz2
     64  HINTS ${COIN_ROOT_DIR}/lib/coin
    4465  HINTS ${COIN_ROOT_DIR}/lib
    4566)
     
    5677  COIN_OSI_CBC_LIBRARY
    5778  COIN_OSI_CLP_LIBRARY
    58   COIN_OSI_VOL_LIBRARY
    59   COIN_VOL_LIBRARY
     79  # COIN_OSI_VOL_LIBRARY
     80  # COIN_VOL_LIBRARY
    6081)
    6182
    6283IF(COIN_FOUND)
    6384  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    64   SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
    65   SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    66   SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
     85  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
     86  IF(COIN_ZLIB_LIBRARY)
     87    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
     88  ENDIF(COIN_ZLIB_LIBRARY)
     89   IF(COIN_BZ2_LIBRARY)
     90    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
     91  ENDIF(COIN_BZ2_LIBRARY)
     92  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
     93  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
    6794ENDIF(COIN_FOUND)
    6895
     
    79106  COIN_OSI_VOL_LIBRARY
    80107  COIN_VOL_LIBRARY
     108  COIN_ZLIB_LIBRARY
     109  COIN_BZ2_LIBRARY
    81110)
    82 
    83 IF(COIN_FOUND)
    84   SET(LEMON_HAVE_LP TRUE)
    85   SET(LEMON_HAVE_MIP TRUE)
    86   SET(LEMON_HAVE_CLP TRUE)
    87   SET(LEMON_HAVE_CBC TRUE)
    88 ENDIF(COIN_FOUND)
  • cmake/FindGLPK.cmake

    r685 r1232  
    5454
    5555MARK_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)
  • cmake/version.cmake.in

    r725 r1135  
    1 SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
     1SET(LEMON_VERSION "@LEMON_VERSION@" CACHE STRING "LEMON version string.")
  • demo/arg_parser_demo.cc

    r463 r956  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    6666    .other("...");
    6767
     68  // Throw an exception when problems occurs. The default behavior is to
     69  // exit(1) on these cases, but this makes Valgrind falsely warn
     70  // about memory leaks.
     71  ap.throwOnProblems();
     72
    6873  // Perform the parsing process
    6974  // (in case of any error it terminates the program)
    70   ap.parse();
     75  // The try {} construct is necessary only if the ap.trowOnProblems()
     76  // setting is in use.
     77  try {
     78    ap.parse();
     79  } catch (ArgParserException &) { return 1; }
    7180
    7281  // Check each option if it has been given and print its value
  • doc/CMakeLists.txt

    r791 r1251  
    33SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
    44SET(abs_top_builddir ${PROJECT_BINARY_DIR})
     5
     6SET(LEMON_DOC_SOURCE_BROWSER "NO" CACHE STRING "Include source into the doc (YES/NO).")
     7SET(LEMON_DOC_USE_MATHJAX "NO" CACHE STRING "Use MathJax to display math formulae (YES/NO).")
     8SET(LEMON_DOC_MATHJAX_RELPATH "http://www.mathjax.org/mathjax" CACHE STRING "MathJax library location.")
     9
     10SET(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
    514
    615CONFIGURE_FILE(
     
    1019)
    1120
     21CONFIGURE_FILE(
     22  ${PROJECT_SOURCE_DIR}/doc/mainpage.dox.in
     23  ${PROJECT_BINARY_DIR}/doc/mainpage.dox
     24  @ONLY
     25)
     26
     27# Copy doc from source (if exists)
     28IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html AND
     29    NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
     30  MESSAGE(STATUS "Copy doc from source tree")
     31  EXECUTE_PROCESS(
     32    COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/html ${CMAKE_CURRENT_BINARY_DIR}/html
     33    )
     34ENDIF()
     35
    1236IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
    1337  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
     
    1640    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
    1741    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
    18     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
    19     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
    20     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
    21     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
    22     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
    23     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
    24     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
    25     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
    26     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
    27     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
    28     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    29     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
     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
    3058    COMMAND ${CMAKE_COMMAND} -E remove_directory html
    31     COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
    3259    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    3360    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     
    5178
    5279ENDIF()
     80
     81IF(WGET_FOUND)
     82ADD_CUSTOM_TARGET(update-external-tags
     83  COMMAND ${WGET_EXECUTABLE} -N ${LEMON_DOC_LIBSTDC++_URL}/libstdc++.tag
     84  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     85  )
     86ENDIF()
  • doc/Doxyfile.in

    r803 r1251  
    1 # Doxyfile 1.5.9
     1# Doxyfile 1.7.3
    22
    33#---------------------------------------------------------------------------
     
    55#---------------------------------------------------------------------------
    66DOXYFILE_ENCODING      = UTF-8
    7 PROJECT_NAME           = @PACKAGE_NAME@
    8 PROJECT_NUMBER         = @PACKAGE_VERSION@
     7PROJECT_NAME           =
     8PROJECT_NUMBER         =
     9PROJECT_BRIEF          =
     10PROJECT_LOGO           =
    911OUTPUT_DIRECTORY       =
    1012CREATE_SUBDIRS         = NO
     
    3032OPTIMIZE_FOR_FORTRAN   = NO
    3133OPTIMIZE_OUTPUT_VHDL   = NO
     34EXTENSION_MAPPING      =
    3235BUILTIN_STL_SUPPORT    = YES
    3336CPP_CLI_SUPPORT        = NO
     
    5558HIDE_SCOPE_NAMES       = YES
    5659SHOW_INCLUDE_FILES     = YES
     60FORCE_LOCAL_INCLUDES   = NO
    5761INLINE_INFO            = YES
    5862SORT_MEMBER_DOCS       = NO
    5963SORT_BRIEF_DOCS        = NO
     64SORT_MEMBERS_CTORS_1ST = NO
    6065SORT_GROUP_NAMES       = NO
    6166SORT_BY_SCOPE_NAME     = NO
     67STRICT_PROTO_MATCHING  = NO
    6268GENERATE_TODOLIST      = YES
    6369GENERATE_TESTLIST      = YES
     
    7177SHOW_NAMESPACES        = YES
    7278FILE_VERSION_FILTER    =
    73 LAYOUT_FILE            = DoxygenLayout.xml
     79LAYOUT_FILE            = "@abs_top_srcdir@/doc/DoxygenLayout.xml"
     80CITE_BIB_FILES         = "@abs_top_srcdir@/doc/references.bib"
    7481#---------------------------------------------------------------------------
    7582# configuration options related to warning and progress messages
     
    9097                         "@abs_top_srcdir@/lemon/concepts" \
    9198                         "@abs_top_srcdir@/demo" \
     99                         "@abs_top_srcdir@/contrib" \
    92100                         "@abs_top_srcdir@/tools" \
    93101                         "@abs_top_srcdir@/test/test_tools.h" \
    94                          "@abs_top_builddir@/doc/references.dox"
     102                         "@abs_top_builddir@/doc/mainpage.dox"
    95103INPUT_ENCODING         = UTF-8
    96104FILE_PATTERNS          = *.h \
     
    112120FILTER_PATTERNS        =
    113121FILTER_SOURCE_FILES    = NO
     122FILTER_SOURCE_PATTERNS =
    114123#---------------------------------------------------------------------------
    115124# configuration options related to source browsing
    116125#---------------------------------------------------------------------------
    117 SOURCE_BROWSER         = NO
     126SOURCE_BROWSER         = @LEMON_DOC_SOURCE_BROWSER@
    118127INLINE_SOURCES         = NO
    119128STRIP_CODE_COMMENTS    = YES
     
    138147HTML_FOOTER            =
    139148HTML_STYLESHEET        =
     149HTML_COLORSTYLE_HUE    = 220
     150HTML_COLORSTYLE_SAT    = 100
     151HTML_COLORSTYLE_GAMMA  = 80
     152HTML_TIMESTAMP         = YES
    140153HTML_ALIGN_MEMBERS     = YES
    141 HTML_DYNAMIC_SECTIONS  = NO
     154HTML_DYNAMIC_SECTIONS  = YES
    142155GENERATE_DOCSET        = NO
    143156DOCSET_FEEDNAME        = "Doxygen generated docs"
    144157DOCSET_BUNDLE_ID       = org.doxygen.Project
     158DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
     159DOCSET_PUBLISHER_NAME  = Publisher
    145160GENERATE_HTMLHELP      = NO
    146161CHM_FILE               =
     
    154169QHP_NAMESPACE          = org.doxygen.Project
    155170QHP_VIRTUAL_FOLDER     = doc
     171QHP_CUST_FILTER_NAME   =
     172QHP_CUST_FILTER_ATTRS  =
     173QHP_SECT_FILTER_ATTRS  =
    156174QHG_LOCATION           =
     175GENERATE_ECLIPSEHELP   = NO
     176ECLIPSE_DOC_ID         = org.doxygen.Project
    157177DISABLE_INDEX          = NO
    158178ENUM_VALUES_PER_LINE   = 4
    159179GENERATE_TREEVIEW      = NO
     180USE_INLINE_TREES       = NO
    160181TREEVIEW_WIDTH         = 250
     182EXT_LINKS_IN_WINDOW    = NO
    161183FORMULA_FONTSIZE       = 10
     184FORMULA_TRANSPARENT    = YES
     185USE_MATHJAX            = @LEMON_DOC_USE_MATHJAX@
     186MATHJAX_RELPATH        = @LEMON_DOC_MATHJAX_RELPATH@
     187SEARCHENGINE           = YES
     188SERVER_BASED_SEARCH    = NO
    162189#---------------------------------------------------------------------------
    163190# configuration options related to the LaTeX output
     
    176203LATEX_BATCHMODE        = NO
    177204LATEX_HIDE_INDICES     = NO
     205LATEX_SOURCE_CODE      = NO
    178206#---------------------------------------------------------------------------
    179207# configuration options related to the RTF output
     
    224252SKIP_FUNCTION_MACROS   = YES
    225253#---------------------------------------------------------------------------
    226 # Options related to the search engine   
    227 #---------------------------------------------------------------------------
    228 TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
     254# Configuration::additions related to external references
     255#---------------------------------------------------------------------------
     256TAGFILES               = "@abs_top_builddir@/doc/libstdc++.tag = @LEMON_DOC_LIBSTDC++_URL@"
    229257GENERATE_TAGFILE       = html/lemon.tag
    230258ALLEXTERNALS           = NO
     
    238266HIDE_UNDOC_RELATIONS   = YES
    239267HAVE_DOT               = YES
     268DOT_NUM_THREADS        = 0
    240269DOT_FONTNAME           = FreeSans
    241270DOT_FONTSIZE           = 10
     
    255284DOT_PATH               =
    256285DOTFILE_DIRS           =
     286MSCFILE_DIRS           =
    257287DOT_GRAPH_MAX_NODES    = 50
    258288MAX_DOT_GRAPH_DEPTH    = 0
     
    261291GENERATE_LEGEND        = YES
    262292DOT_CLEANUP            = YES
    263 #---------------------------------------------------------------------------
    264 # Configuration::additions related to the search engine   
    265 #---------------------------------------------------------------------------
    266 SEARCHENGINE           = NO
  • doc/DoxygenLayout.xml

    r316 r1251  
    33  <navindex>
    44    <tab type="mainpage" visible="yes" title=""/>
    5     <tab type="modules" visible="yes" title=""/>
     5    <tab type="modules" visible="yes" title="" intro=""/>
    66    <tab type="classes" visible="yes" title="">
    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=""/>
     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=""/>
    1111    </tab>
    1212    <tab type="namespaces" visible="yes" title="">
    13       <tab type="namespaces" visible="yes" title=""/>
    14       <tab type="namespacemembers" visible="yes" title=""/>
     13      <tab type="namespaces" visible="yes" title="" intro=""/>
     14      <tab type="namespacemembers" visible="yes" title="" intro=""/>
    1515    </tab>
    1616    <tab type="files" visible="yes" title="">
    17       <tab type="files" visible="yes" title=""/>
    18       <tab type="globals" visible="yes" title=""/>
     17      <tab type="files" visible="yes" title="" intro=""/>
     18      <tab type="globals" visible="yes" title="" intro=""/>
    1919    </tab>
    20     <tab type="dirs" visible="yes" title=""/>
    21     <tab type="examples" visible="yes" title=""/> 
    22     <tab type="pages" visible="yes" title=""/>
     20    <tab type="examples" visible="yes" title="" intro=""/>
     21    <tab type="pages" visible="yes" title="" intro=""/>
    2322  </navindex>
    2423
  • doc/coding_style.dox

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    9999\subsection pri-loc-var Private member variables
    100100
    101 Private member variables should start with underscore
     101Private member variables should start with underscore.
    102102
    103103\code
    104 _start_with_underscores
     104_start_with_underscore
    105105\endcode
    106106
  • doc/dirs.dox

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    3232documentation.
    3333*/
     34
     35/**
     36\dir contrib
     37\brief Directory for user contributed source codes.
     38
     39You can place your own C++ code using LEMON into this directory, which
     40will compile to an executable along with LEMON when you build the
     41library. This is probably the easiest way of compiling short to medium
     42codes, for this does require neither a LEMON installed system-wide nor
     43adding several paths to the compiler.
     44
     45Please have a look at <tt>contrib/CMakeLists.txt</tt> for
     46instruction on how to add your own files into the build process.  */
    3447
    3548/**
  • doc/groups.dox

    r879 r1280  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    113113detailed documentation of particular adaptors.
    114114
     115Since the adaptor classes conform to the \ref graph_concepts "graph concepts",
     116an adaptor can even be applied to another one.
     117The following image illustrates a situation when a \ref SubDigraph adaptor
     118is 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
    115123The behavior of graph adaptors can be very different. Some of them keep
    116124capabilities of the original graph while in other cases this would be
     
    264272
    265273/**
    266 @defgroup matrices Matrices
    267 @ingroup datas
    268 \brief Two dimensional data storages implemented in LEMON.
    269 
    270 This group contains two dimensional data storages implemented in LEMON.
    271 */
    272 
    273 /**
    274274@defgroup auxdat Auxiliary Data Structures
    275275@ingroup datas
     
    295295
    296296/**
    297 @defgroup matrices Matrices
    298 @ingroup auxdat
    299 \brief Two dimensional data storages implemented in LEMON.
    300 
    301 This group contains two dimensional data storages implemented in LEMON.
    302 */
    303 
    304 /**
    305297@defgroup algs Algorithms
    306298\brief This group contains the several algorithms
     
    318310This group contains the common graph search algorithms, namely
    319311\e breadth-first \e search (BFS) and \e depth-first \e search (DFS)
    320 \ref clrs01algorithms.
     312\cite clrs01algorithms.
    321313*/
    322314
     
    327319
    328320This group contains the algorithms for finding shortest paths in digraphs
    329 \ref clrs01algorithms.
     321\cite clrs01algorithms.
    330322
    331323 - \ref Dijkstra algorithm for finding shortest paths from a source node
     
    335327   but the digraph should not contain directed cycles with negative total
    336328   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.
    341329 - \ref Suurballe A successive shortest path algorithm for finding
    342330   arc-disjoint paths between two nodes having minimum total length.
     
    349337
    350338This group contains the algorithms for finding minimum cost spanning
    351 trees and arborescences \ref clrs01algorithms.
     339trees and arborescences \cite clrs01algorithms.
    352340*/
    353341
     
    358346
    359347This group contains the algorithms for finding maximum flows and
    360 feasible circulations \ref clrs01algorithms, \ref amo93networkflows.
     348feasible circulations \cite clrs01algorithms, \cite amo93networkflows.
    361349
    362350The \e maximum \e flow \e problem is to find a flow of maximum value between
     
    372360\f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f]
    373361
    374 LEMON 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 
    384 In most cases the \ref Preflow algorithm provides the
    385 fastest method for computing a maximum flow. All implementations
    386 also provide functions to query the minimum cut, which is the dual
    387 problem of maximum flow.
    388 
    389 \ref Circulation is a preflow push-relabel algorithm implemented directly
     362\ref Preflow is an efficient implementation of Goldberg-Tarjan's
     363preflow push-relabel algorithm \cite goldberg88newapproach for finding
     364maximum flows. It also provides functions to query the minimum cut,
     365which is the dual problem of maximum flow.
     366
     367\ref Circulation is a preflow push-relabel algorithm implemented directly
    390368for finding feasible circulations, which is a somewhat different problem,
    391369but it is strongly related to maximum flow.
     
    400378
    401379This group contains the algorithms for finding minimum cost flows and
    402 circulations \ref amo93networkflows. For more information about this
    403 problem and its dual solution, see \ref min_cost_flow
     380circulations \cite amo93networkflows. For more information about this
     381problem and its dual solution, see: \ref min_cost_flow
    404382"Minimum Cost Flow Problem".
    405383
    406384LEMON contains several algorithms for this problem.
    407385 - \ref NetworkSimplex Primal Network Simplex algorithm with various
    408    pivot strategies \ref dantzig63linearprog, \ref kellyoneill91netsimplex.
     386   pivot strategies \cite dantzig63linearprog, \cite kellyoneill91netsimplex.
    409387 - \ref CostScaling Cost Scaling algorithm based on push/augment and
    410    relabel operations \ref goldberg90approximation, \ref goldberg97efficient,
    411    \ref bunnagel98efficient.
     388   relabel operations \cite goldberg90approximation, \cite goldberg97efficient,
     389   \cite bunnagel98efficient.
    412390 - \ref CapacityScaling Capacity Scaling algorithm based on the successive
    413    shortest path method \ref edmondskarp72theoretical.
     391   shortest path method \cite edmondskarp72theoretical.
    414392 - \ref CycleCanceling Cycle-Canceling algorithms, two of which are
    415    strongly polynomial \ref klein67primal, \ref goldberg89cyclecanceling.
    416 
    417 In general NetworkSimplex is the most efficient implementation,
    418 but in special cases other algorithms could be faster.
     393   strongly polynomial \cite klein67primal, \cite goldberg89cyclecanceling.
     394
     395In general, \ref NetworkSimplex and \ref CostScaling are the most efficient
     396implementations.
     397\ref NetworkSimplex is usually the fastest on relatively small graphs (up to
     398several thousands of nodes) and on dense graphs, while \ref CostScaling is
     399typically more efficient on large graphs (e.g. hundreds of thousands of
     400nodes or above), especially if they are sparse.
     401However, other algorithms could be faster in special cases.
    419402For example, if the total supply and/or capacities are rather small,
    420 CapacityScaling is usually the fastest algorithm (without effective scaling).
     403\ref CapacityScaling is usually the fastest algorithm
     404(without effective scaling).
     405
     406These classes are intended to be used with integer-valued input data
     407(capacities, supply values, and costs), except for \ref CapacityScaling,
     408which is capable of handling real-valued arc costs (other numerical
     409data are required to be integer).
     410
     411For more details about these implementations and for a comprehensive
     412experimental study, see the paper \cite KiralyKovacs12MCF.
     413It also compares these codes to other publicly available
     414minimum cost flow solvers.
    421415*/
    422416
     
    457451
    458452This group contains the algorithms for finding minimum mean cycles
    459 \ref clrs01algorithms, \ref amo93networkflows.
     453\cite amo93networkflows, \cite karp78characterization.
    460454
    461455The \e minimum \e mean \e cycle \e problem is to find a directed cycle
     
    473467
    474468LEMON contains three algorithms for solving the minimum mean cycle problem:
    475 - \ref Karp "Karp"'s original algorithm \ref amo93networkflows,
    476   \ref dasdan98minmeancycle.
    477 - \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved
    478   version of Karp's algorithm \ref dasdan98minmeancycle.
    479 - \ref Howard "Howard"'s policy iteration algorithm
    480   \ref dasdan98minmeancycle.
    481 
    482 In practice, the Howard algorithm proved to be by far the most efficient
    483 one, though the best known theoretical bound on its running time is
    484 exponential.
    485 Both Karp and HartmannOrlin algorithms run in time O(ne) and use space
    486 O(n<sup>2</sup>+e), but the latter one is typically faster due to the
    487 applied early termination scheme.
     469- \ref KarpMmc Karp's original algorithm \cite karp78characterization.
     470- \ref HartmannOrlinMmc Hartmann-Orlin's algorithm, which is an improved
     471  version of Karp's algorithm \cite hartmann93finding.
     472- \ref HowardMmc Howard's policy iteration algorithm
     473  \cite dasdan98minmeancycle, \cite dasdan04experimental.
     474
     475In practice, the \ref HowardMmc "Howard" algorithm turned out to be by far the
     476most efficient one, though the best known theoretical bound on its running
     477time is exponential.
     478Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms
     479run in time O(nm) and use space O(n<sup>2</sup>+m).
    488480*/
    489481
     
    506498
    507499The 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.
    518500- \ref MaxMatching Edmond's blossom shrinking algorithm for calculating
    519501  maximum cardinality matching in general graphs.
     
    523505  Edmond's blossom shrinking algorithm for calculating maximum weighted
    524506  perfect matching in general graphs.
    525 
    526 \image html bipartite_matching.png
    527 \image latex bipartite_matching.eps "Bipartite Matching" width=\textwidth
     507- \ref MaxFractionalMatching Push-relabel algorithm for calculating
     508  maximum cardinality fractional matching in general graphs.
     509- \ref MaxWeightedFractionalMatching Augmenting path algorithm for calculating
     510  maximum weighted fractional matching in general graphs.
     511- \ref MaxWeightedPerfectFractionalMatching
     512  Augmenting path algorithm for calculating maximum weighted
     513  perfect fractional matching in general graphs.
     514
     515\image html matching.png
     516\image latex matching.eps "Min Cost Perfect Matching" width=\textwidth
    528517*/
    529518
     
    541530
    542531/**
    543 @defgroup planar Planarity Embedding and Drawing
     532@defgroup planar Planar Embedding and Drawing
    544533@ingroup algs
    545534\brief Algorithms for planarity checking, embedding and drawing
     
    553542
    554543/**
    555 @defgroup approx Approximation Algorithms
     544@defgroup tsp Traveling Salesman Problem
     545@ingroup algs
     546\brief Algorithms for the symmetric traveling salesman problem
     547
     548This group contains basic heuristic algorithms for the the symmetric
     549\e traveling \e salesman \e problem (TSP).
     550Given an \ref FullGraph "undirected full graph" with a cost map on its edges,
     551the problem is to find a shortest possible tour that visits each node exactly
     552once (i.e. the minimum cost Hamiltonian cycle).
     553
     554These TSP algorithms are intended to be used with a \e metric \e cost
     555\e function, i.e. the edge costs should satisfy the triangle inequality.
     556Otherwise the algorithms could yield worse results.
     557
     558LEMON provides five well-known heuristics for solving symmetric TSP:
     559 - \ref NearestNeighborTsp Neareast neighbor algorithm
     560 - \ref GreedyTsp Greedy algorithm
     561 - \ref InsertionTsp Insertion heuristic (with four selection methods)
     562 - \ref ChristofidesTsp Christofides algorithm
     563 - \ref Opt2Tsp 2-opt algorithm
     564
     565\ref NearestNeighborTsp, \ref GreedyTsp, and \ref InsertionTsp are the fastest
     566solution methods. Furthermore, \ref InsertionTsp is usually quite effective.
     567
     568\ref ChristofidesTsp is somewhat slower, but it has the best guaranteed
     569approximation factor: 3/2.
     570
     571\ref Opt2Tsp usually provides the best results in practice, but
     572it is the slowest method. It can also be used to improve given tours,
     573for example, the results of other algorithms.
     574
     575\image html tsp.png
     576\image latex tsp.eps "Traveling salesman problem" width=\textwidth
     577*/
     578
     579/**
     580@defgroup approx_algs Approximation Algorithms
    556581@ingroup algs
    557582\brief Approximation algorithms.
     
    559584This group contains the approximation and heuristic algorithms
    560585implemented in LEMON.
     586
     587<b>Maximum Clique Problem</b>
     588  - \ref GrossoLocatelliPullanMc An efficient heuristic algorithm of
     589    Grosso, Locatelli, and Pullan.
    561590*/
    562591
     
    588617high-level interface.
    589618
    590 The currently supported solvers are \ref glpk, \ref clp, \ref cbc,
    591 \ref cplex, \ref soplex.
    592 */
    593 
    594 /**
    595 @defgroup lp_utils Tools for Lp and Mip Solvers
    596 @ingroup lp_group
    597 \brief Helper tools to the Lp and Mip solvers.
    598 
    599 This group adds some helper tools to general optimization framework
    600 implemented in LEMON.
    601 */
    602 
    603 /**
    604 @defgroup metah Metaheuristics
    605 @ingroup gen_opt_group
    606 \brief Metaheuristics for LEMON library.
    607 
    608 This group contains some metaheuristic optimization tools.
     619The currently supported solvers are \cite glpk, \cite clp, \cite cbc,
     620\cite cplex, \cite soplex.
    609621*/
    610622
     
    676688This group contains general \c EPS drawing methods and special
    677689graph exporting tools.
     690
     691\image html graph_to_eps.png
    678692*/
    679693
  • doc/images/bipartite_partitions.eps

    r634 r1213  
    11%!PS-Adobe-2.0 EPSF-2.0
    22%%Creator: LEMON, graphToEps()
    3 %%CreationDate: Tue Nov 15 16:51:43 2005
     3%%CreationDate: Fri Mar  8 00:18:43 2013
    44%%BoundingBox: 0 0 842 596
    55%%EndComments
     
    5454%Edges:
    5555gsave
    56 513.857 -446.322 296.569 -487.43 79.2808 -528.539 0 0 0 2 lb
    57 513.857 -446.322 575.52 -315.655 637.183 -184.989 0 0 0 2 lb
    58 393.468 566.711 494.771 434.577 596.074 302.442 0 0 0 2 lb
    59 393.468 566.711 155.625 579.925 -82.2171 593.138 0 0 0 2 lb
    60 393.468 566.711 251.056 450.726 108.644 334.741 0 0 0 2 lb
    61 869.153 52.8539 732.613 177.648 596.074 302.442 0 0 0 2 lb
    62 869.153 52.8539 753.168 -66.0676 637.183 -184.989 0 0 0 2 lb
    63 -82.2171 593.138 -91.0261 346.487 -99.8351 99.8351 0 0 0 2 lb
    64 -663.61 546.157 -753.168 394.936 -842.726 243.715 0 0 0 2 lb
    65 -663.61 546.157 -574.052 437.513 -484.494 328.869 0 0 0 2 lb
    66 -1077.63 161.498 -960.178 202.606 -842.726 243.715 0 0 0 2 lb
    67 -1077.63 161.498 -968.987 66.0674 -860.344 -29.3633 0 0 0 2 lb
    68 -1177.47 -234.906 -1029.18 -381.722 -880.898 -528.539 0 0 0 2 lb
    69 -1177.47 -234.906 -1018.91 -132.135 -860.344 -29.3633 0 0 0 2 lb
    70 -880.898 -528.539 -744.359 -387.595 -607.82 -246.651 0 0 0 2 lb
    71 -499.175 -499.175 -355.295 -475.685 -211.415 -452.194 0 0 0 2 lb
    72 -499.175 -499.175 -553.498 -372.913 -607.82 -246.651 0 0 0 2 lb
    73 -499.175 -499.175 -386.587 -315.087 -274 -131 0 0 0 2 lb
    74 79.2808 -528.539 -66.0671 -490.366 -211.415 -452.194 0 0 0 2 lb
    75 637.183 -184.989 421.363 -253.993 205.543 -322.996 0 0 0 2 lb
    76 205.543 -322.996 162.966 -226.097 120.389 -129.198 0 0 0 2 lb
    77 399.34 88.0898 259.865 -20.5541 120.389 -129.198 0 0 0 2 lb
    78 399.34 88.0898 253.992 211.415 108.644 334.741 0 0 0 2 lb
    79 -842.726 243.715 -471.281 171.775 -99.8351 99.8351 0 0 0 2 lb
    80 -842.726 243.715 -558.363 56.3575 -274 -131 0 0 0 2 lb
    81 -860.344 -29.3633 -734.082 -138.007 -607.82 -246.651 0 0 0 2 lb
    82 -211.415 -452.194 -45.513 -290.696 120.389 -129.198 0 0 0 2 lb
    83 -99.8351 99.8351 4.40445 217.288 108.644 334.741 0 0 0 2 lb
    84 -99.8351 99.8351 -292.165 214.352 -484.494 328.869 0 0 0 2 lb
    85 120.389 -129.198 -76.8055 -130.099 -274 -131 0 0 0 2 lb
     56513.857 -446.322 296.569 -487.43 79.2808 -528.539 0 0 0 7.00153 lb
     57513.857 -446.322 575.52 -315.656 637.183 -184.989 0 0 0 7.00153 lb
     58393.468 566.711 494.771 434.577 596.074 302.442 0 0 0 7.00153 lb
     59393.468 566.711 155.625 579.925 -82.2171 593.138 0 0 0 7.00153 lb
     60393.468 566.711 251.056 450.726 108.644 334.741 0 0 0 7.00153 lb
     61869.153 52.8539 732.613 177.648 596.074 302.442 0 0 0 7.00153 lb
     62869.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
     7479.2808 -528.539 -66.0671 -490.366 -211.415 -452.194 0 0 0 7.00153 lb
     75637.183 -184.989 421.363 -253.993 205.543 -322.996 0 0 0 7.00153 lb
     76205.543 -322.996 162.966 -226.097 120.389 -129.198 0 0 0 7.00153 lb
     77399.34 88.0898 259.865 -20.5541 120.389 -129.198 0 0 0 7.00153 lb
     78399.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
     85120.389 -129.198 -76.8055 -130.099 -274 -131 0 0 0 7.00153 lb
    8686grestore
    8787%Nodes:
    8888gsave
    89 -274 -131 20 1 0 0 nc
    90 -607.82 -246.651 20 1 0 0 nc
    91 -484.494 328.869 20 0 0 1 nc
    92 108.644 334.741 20 0 0 1 nc
    93 120.389 -129.198 20 0 0 1 nc
    94 -99.8351 99.8351 20 1 0 0 nc
    95 -211.415 -452.194 20 1 0 0 nc
    96 -860.344 -29.3633 20 0 0 1 nc
    97 -842.726 243.715 20 0 0 1 nc
    98 399.34 88.0898 20 1 0 0 nc
    99 205.543 -322.996 20 1 0 0 nc
    100 637.183 -184.989 20 0 0 1 nc
    101 79.2808 -528.539 20 0 0 1 nc
    102 -499.175 -499.175 20 0 0 1 nc
    103 -880.898 -528.539 20 0 0 1 nc
    104 -1177.47 -234.906 20 1 0 0 nc
    105 -1077.63 161.498 20 1 0 0 nc
    106 -663.61 546.157 20 1 0 0 nc
    107 -82.2171 593.138 20 0 0 1 nc
    108 596.074 302.442 20 0 0 1 nc
    109 869.153 52.8539 20 1 0 0 nc
    110 393.468 566.711 20 1 0 0 nc
    111 513.857 -446.322 20 1 0 0 nc
     89-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
     92108.644 334.741 23.3384 0 0 1 nc
     93120.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
     98399.34 88.0898 23.3384 1 0 0 nc
     99205.543 -322.996 23.3384 1 0 0 nc
     100637.183 -184.989 23.3384 0 0 1 nc
     10179.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
     108596.074 302.442 23.3384 0 0 1 nc
     109869.153 52.8539 23.3384 1 0 0 nc
     110393.468 566.711 23.3384 1 0 0 nc
     111513.857 -446.322 23.3384 1 0 0 nc
    112112grestore
    113113grestore
  • doc/images/connected_components.eps

    r634 r1213  
    11%!PS-Adobe-2.0 EPSF-2.0
    22%%Creator: LEMON, graphToEps()
    3 %%CreationDate: Fri Nov  4 13:47:12 2005
     3%%CreationDate: Fri Mar  8 00:18:43 2013
    44%%BoundingBox: 0 0 842 596
    55%%EndComments
     
    5454%Edges:
    5555gsave
    56 574.035 177.301 622.149 225.748 670.264 274.195 0 0 0 2 lb
    57 694.579 115.483 682.421 194.839 670.264 274.195 0 0 0 2 lb
    58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 0 2 lb
    59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 0 2 lb
    60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 0 2 lb
    61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 0 2 lb
    62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 0 2 lb
    63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 0 2 lb
    64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 0 2 lb
    65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 0 2 lb
    66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 0 2 lb
    67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 0 2 lb
    68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 0 2 lb
    69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 0 2 lb
    70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0 0 2 lb
    71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0 2 lb
    72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0 2 lb
    73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0 2 lb
    74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 0 2 lb
    75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 0 2 lb
    76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 0 2 lb
    77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0 0 0 2 lb
    78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 0 2 lb
    79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 0 2 lb
    80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 0 2 lb
    81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 0 2 lb
    82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 0 2 lb
    83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 0 2 lb
    84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 0 2 lb
    85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 0 2 lb
    86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 0 2 lb
    87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 0 2 lb
    88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 0 0 0 2 lb
    89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 0 2 lb
    90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 0 2 lb
    91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 0 2 lb
    92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 0 2 lb
    93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 0 2 lb
    94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 0 2 lb
    95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 0 2 lb
    96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 0 2 lb
    97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 0 2 lb
    98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 0 2 lb
    99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 0 2 lb
    100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 0 2 lb
    101 -180.397 245.045 -142.256 345.099 -132.697 451.748 0 0 0 2 lb
    102 -180.397 245.045 -170.838 351.694 -132.697 451.748 0 0 0 2 lb
    103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 0 2 lb
    104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 0 2 lb
    105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 0 2 lb
    106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 0 2 lb
    107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 0 2 lb
    108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 0 2 lb
    109 -689.204 -237.261 -614.799 -102.648 -567.302 43.6423 0 0 0 2 lb
    110 -689.204 -237.261 -641.707 -90.9706 -567.302 43.6423 0 0 0 2 lb
     56574.035 177.301 622.149 225.748 670.264 274.195 0 0 0 6.25356 lb
     57694.579 115.483 682.421 194.839 670.264 274.195 0 0 0 6.25356 lb
     58280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 0 6.25356 lb
     59280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 0 6.25356 lb
     60212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 0 6.25356 lb
     61286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 0 6.25356 lb
     62286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 0 6.25356 lb
     63438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 0 6.25356 lb
     64438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 0 6.25356 lb
     65397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 0 6.25356 lb
     66366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 0 6.25356 lb
     67271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 0 6.25356 lb
     68271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 0 6.25356 lb
     69277.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
     74906.312 201.403 946.592 42.798 986.873 -115.807 0 0 0 6.25356 lb
     75906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 0 6.25356 lb
     76986.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
     78422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 0 6.25356 lb
     79422.945 521.129 376.371 417.911 329.797 314.692 0 0 0 6.25356 lb
     80422.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
     82329.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
     84762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 0 6.25356 lb
     85762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 0 6.25356 lb
     86526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 0 6.25356 lb
     87730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 0 6.25356 lb
     88415.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
     97116.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
     106670.264 274.195 629.188 409.347 588.113 544.499 0 0 0 6.25356 lb
     107670.264 274.195 797.466 341.771 924.667 409.347 0 0 0 6.25356 lb
     108588.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
    111111grestore
    112112%Nodes:
    113113gsave
    114 -567.302 43.6423 20 0 0 0 nc
    115 -689.204 -237.261 20 0 0 0 nc
    116 924.667 409.347 20 1 0 0 nc
    117 588.113 544.499 20 1 0 0 nc
    118 670.264 274.195 20 1 0 0 nc
    119 -371.2 568.349 20 0 1 0 nc
    120 -132.697 451.748 20 0 1 0 nc
    121 -416.25 345.746 20 0 1 0 nc
    122 -180.397 245.045 20 0 1 0 nc
    123 -13.4452 133.743 20 0 1 0 nc
    124 -262.548 107.243 20 0 1 0 nc
    125 201.208 38.3422 20 0 1 0 nc
    126 116.407 -173.66 20 0 1 0 nc
    127 -26.6953 -19.9585 20 0 1 0 nc
    128 -539.894 -262.64 20 0 0 1 nc
    129 -323.543 -433.964 20 0 0 1 nc
    130 -309.657 -57.9033 20 0 0 1 nc
    131 -67.9734 -347.42 20 0 0 1 nc
    132 415.393 -289.516 20 0 0 1 nc
    133 730.084 -307.139 20 0 0 1 nc
    134 526.164 32.7279 20 0 0 1 nc
    135 762.812 -17.6227 20 0 0 1 nc
    136 -67.9734 319.727 20 0 0 1 nc
    137 329.797 314.692 20 0 0 1 nc
    138 -5.03507 561.41 20 0 0 1 nc
    139 422.945 521.129 20 0 0 1 nc
    140 -470.779 158.605 20 0 0 1 nc
    141 986.873 -115.807 20 0 0 1 nc
    142 906.312 201.403 20 0 0 1 nc
    143 -767.847 113.289 20 0 0 1 nc
    144 -579.033 445.603 20 0 0 1 nc
    145 -840.856 -246.718 20 0 0 1 nc
    146 206.221 -205.967 20 1 1 0 nc
    147 277.311 -252.33 20 1 1 0 nc
    148 271.13 -175.058 20 1 1 0 nc
    149 366.947 -110.15 20 1 1 0 nc
    150 397.855 -196.694 20 1 1 0 nc
    151 438.037 -88.514 20 1 1 0 nc
    152 286.584 -48.3327 20 1 1 0 nc
    153 212.403 -23.6057 20 1 1 0 nc
    154 280.402 10.3938 20 1 1 0 nc
    155 694.579 115.483 20 1 0 0 nc
    156 574.035 177.301 20 1 0 0 nc
     114-567.302 43.6423 20.8452 0 0 0 nc
     115-689.204 -237.261 20.8452 0 0 0 nc
     116924.667 409.347 20.8452 1 0 0 nc
     117588.113 544.499 20.8452 1 0 0 nc
     118670.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
     125201.208 38.3422 20.8452 0 1 0 nc
     126116.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
     132415.393 -289.516 20.8452 0 0 1 nc
     133730.084 -307.139 20.8452 0 0 1 nc
     134526.164 32.7279 20.8452 0 0 1 nc
     135762.812 -17.6227 20.8452 0 0 1 nc
     136-67.9734 319.727 20.8452 0 0 1 nc
     137329.797 314.692 20.8452 0 0 1 nc
     138-5.03507 561.41 20.8452 0 0 1 nc
     139422.945 521.129 20.8452 0 0 1 nc
     140-470.779 158.605 20.8452 0 0 1 nc
     141986.873 -115.807 20.8452 0 0 1 nc
     142906.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
     146206.221 -205.967 20.8452 1 1 0 nc
     147277.311 -252.33 20.8452 1 1 0 nc
     148271.13 -175.058 20.8452 1 1 0 nc
     149366.947 -110.15 20.8452 1 1 0 nc
     150397.855 -196.694 20.8452 1 1 0 nc
     151438.037 -88.514 20.8452 1 1 0 nc
     152286.584 -48.3327 20.8452 1 1 0 nc
     153212.403 -23.6057 20.8452 1 1 0 nc
     154280.402 10.3938 20.8452 1 1 0 nc
     155694.579 115.483 20.8452 1 0 0 nc
     156574.035 177.301 20.8452 1 0 0 nc
    157157grestore
    158158grestore
  • doc/images/edge_biconnected_components.eps

    r634 r1213  
    11%!PS-Adobe-2.0 EPSF-2.0
    22%%Creator: LEMON, graphToEps()
    3 %%CreationDate: Fri Nov  4 13:47:12 2005
     3%%CreationDate: Fri Mar  8 00:18:43 2013
    44%%BoundingBox: 0 0 842 596
    55%%EndComments
     
    5454%Edges:
    5555gsave
    56 574.035 177.301 622.149 225.748 670.264 274.195 1 0 0 2 lb
    57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 2 lb
    58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 1 2 lb
    59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 1 2 lb
    60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 1 2 lb
    61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 1 2 lb
    62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 1 2 lb
    63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 1 2 lb
    64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 1 2 lb
    65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 1 2 lb
    66 366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 1 2 lb
    67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 1 2 lb
    68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 1 2 lb
    69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0 0 1 2 lb
    70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 1 0 0 2 lb
    71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 1 2 lb
    72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 1 2 lb
    73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 1 2 lb
    74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0 1 2 lb
    75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 1 2 lb
    76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0 1 2 lb
    77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 1 0 0 2 lb
    78 422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 1 2 lb
    79 422.945 521.129 376.371 417.911 329.797 314.692 0 0 1 2 lb
    80 422.945 521.129 474.554 276.928 526.164 32.7279 0 0 1 2 lb
    81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0 0 1 2 lb
    82 329.797 314.692 130.912 317.209 -67.9734 319.727 0 0 1 2 lb
    83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0 0 1 2 lb
    84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 1 2 lb
    85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 1 2 lb
    86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 1 2 lb
    87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 1 2 lb
    88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0 0 2 lb
    89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0 0 1 2 lb
    90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0 0 1 2 lb
    91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0 0 1 2 lb
    92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0 0 1 2 lb
    93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 0 0 1 2 lb
    94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 0 0 1 2 lb
    95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 0 0 1 2 lb
    96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 0 0 1 2 lb
    97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 0 0 1 2 lb
    98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 0 0 1 2 lb
    99 -262.548 107.243 -221.472 176.144 -180.397 245.045 0 0 1 2 lb
    100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 0 0 1 2 lb
    101 -180.397 245.045 -142.256 345.099 -132.697 451.748 0 0 1 2 lb
    102 -180.397 245.045 -170.838 351.694 -132.697 451.748 0 0 1 2 lb
    103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0 0 1 2 lb
    104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0 0 1 2 lb
    105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0 0 1 2 lb
    106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 2 lb
    107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 2 lb
    108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 2 lb
    109 -689.204 -237.261 -614.799 -102.648 -567.302 43.6423 0 0 1 2 lb
    110 -689.204 -237.261 -641.707 -90.9706 -567.302 43.6423 0 0 1 2 lb
     56574.035 177.301 622.149 225.748 670.264 274.195 1 0 0 6.25356 lb
     57694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 6.25356 lb
     58280.402 10.3938 246.402 -6.60595 212.403 -23.6057 0 0 1 6.25356 lb
     59280.402 10.3938 283.493 -18.9695 286.584 -48.3327 0 0 1 6.25356 lb
     60212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 0 0 1 6.25356 lb
     61286.584 -48.3327 326.765 -79.2414 366.947 -110.15 0 0 1 6.25356 lb
     62286.584 -48.3327 278.857 -111.695 271.13 -175.058 0 0 1 6.25356 lb
     63438.037 -88.514 417.946 -142.604 397.855 -196.694 0 0 1 6.25356 lb
     64438.037 -88.514 402.492 -99.332 366.947 -110.15 0 0 1 6.25356 lb
     65397.855 -196.694 382.401 -153.422 366.947 -110.15 0 0 1 6.25356 lb
     66366.947 -110.15 319.038 -142.604 271.13 -175.058 0 0 1 6.25356 lb
     67271.13 -175.058 274.221 -213.694 277.311 -252.33 0 0 1 6.25356 lb
     68271.13 -175.058 238.675 -190.512 206.221 -205.967 0 0 1 6.25356 lb
     69277.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
     74906.312 201.403 946.592 42.798 986.873 -115.807 0 0 1 6.25356 lb
     75906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0 1 6.25356 lb
     76986.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
     78422.945 521.129 208.955 541.269 -5.03507 561.41 0 0 1 6.25356 lb
     79422.945 521.129 376.371 417.911 329.797 314.692 0 0 1 6.25356 lb
     80422.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
     82329.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
     84762.812 -17.6227 644.488 7.5526 526.164 32.7279 0 0 1 6.25356 lb
     85762.812 -17.6227 746.448 -162.381 730.084 -307.139 0 0 1 6.25356 lb
     86526.164 32.7279 470.779 -128.394 415.393 -289.516 0 0 1 6.25356 lb
     87730.084 -307.139 572.738 -298.327 415.393 -289.516 0 0 1 6.25356 lb
     88415.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
     97116.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
     106670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 6.25356 lb
     107670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 6.25356 lb
     108588.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
    111111grestore
    112112%Nodes:
    113113gsave
    114 -567.302 43.6423 20 0 0 0 nc
    115 -689.204 -237.261 20 0 0 0 nc
    116 924.667 409.347 20 0 0 1 nc
    117 588.113 544.499 20 0 0 1 nc
    118 670.264 274.195 20 0 0 1 nc
    119 -371.2 568.349 20 1 1 0 nc
    120 -132.697 451.748 20 1 1 0 nc
    121 -416.25 345.746 20 1 1 0 nc
    122 -180.397 245.045 20 1 1 0 nc
    123 -13.4452 133.743 20 1 1 0 nc
    124 -262.548 107.243 20 1 1 0 nc
    125 201.208 38.3422 20 1 1 0 nc
    126 116.407 -173.66 20 1 1 0 nc
    127 -26.6953 -19.9585 20 1 1 0 nc
    128 -539.894 -262.64 20 0 0.5 0 nc
    129 -323.543 -433.964 20 0 0.5 0 nc
    130 -309.657 -57.9033 20 0 0.5 0 nc
    131 -67.9734 -347.42 20 0 0.5 0 nc
    132 415.393 -289.516 20 0.5 0 0 nc
    133 730.084 -307.139 20 0.5 0 0 nc
    134 526.164 32.7279 20 0.5 0 0 nc
    135 762.812 -17.6227 20 0.5 0 0 nc
    136 -67.9734 319.727 20 0.5 0 0 nc
    137 329.797 314.692 20 0.5 0 0 nc
    138 -5.03507 561.41 20 0.5 0 0 nc
    139 422.945 521.129 20 0.5 0 0 nc
    140 -470.779 158.605 20 0 1 1 nc
    141 986.873 -115.807 20 0.5 0 0 nc
    142 906.312 201.403 20 0.5 0 0 nc
    143 -767.847 113.289 20 0 1 1 nc
    144 -579.033 445.603 20 0 1 1 nc
    145 -840.856 -246.718 20 1 0 1 nc
    146 206.221 -205.967 20 0 0 0.5 nc
    147 277.311 -252.33 20 0 0 0.5 nc
    148 271.13 -175.058 20 0 0 0.5 nc
    149 366.947 -110.15 20 0 0 0.5 nc
    150 397.855 -196.694 20 0 0 0.5 nc
    151 438.037 -88.514 20 0 0 0.5 nc
    152 286.584 -48.3327 20 0 0 0.5 nc
    153 212.403 -23.6057 20 0 0 0.5 nc
    154 280.402 10.3938 20 0 0 0.5 nc
    155 694.579 115.483 20 1 0 0 nc
    156 574.035 177.301 20 0 1 0 nc
     114-567.302 43.6423 20.8452 0 0 0 nc
     115-689.204 -237.261 20.8452 0 0 0 nc
     116924.667 409.347 20.8452 0 0 1 nc
     117588.113 544.499 20.8452 0 0 1 nc
     118670.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
     125201.208 38.3422 20.8452 1 1 0 nc
     126116.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
     132415.393 -289.516 20.8452 0.5 0 0 nc
     133730.084 -307.139 20.8452 0.5 0 0 nc
     134526.164 32.7279 20.8452 0.5 0 0 nc
     135762.812 -17.6227 20.8452 0.5 0 0 nc
     136-67.9734 319.727 20.8452 0.5 0 0 nc
     137329.797 314.692 20.8452 0.5 0 0 nc
     138-5.03507 561.41 20.8452 0.5 0 0 nc
     139422.945 521.129 20.8452 0.5 0 0 nc
     140-470.779 158.605 20.8452 0 1 1 nc
     141986.873 -115.807 20.8452 0.5 0 0 nc
     142906.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
     146206.221 -205.967 20.8452 0 0 0.5 nc
     147277.311 -252.33 20.8452 0 0 0.5 nc
     148271.13 -175.058 20.8452 0 0 0.5 nc
     149366.947 -110.15 20.8452 0 0 0.5 nc
     150397.855 -196.694 20.8452 0 0 0.5 nc
     151438.037 -88.514 20.8452 0 0 0.5 nc
     152286.584 -48.3327 20.8452 0 0 0.5 nc
     153212.403 -23.6057 20.8452 0 0 0.5 nc
     154280.402 10.3938 20.8452 0 0 0.5 nc
     155694.579 115.483 20.8452 1 0 0 nc
     156574.035 177.301 20.8452 0 1 0 nc
    157157grestore
    158158grestore
  • doc/images/node_biconnected_components.eps

    r634 r1213  
    11%!PS-Adobe-2.0 EPSF-2.0
    22%%Creator: LEMON, graphToEps()
    3 %%CreationDate: Fri Nov  4 13:47:12 2005
     3%%CreationDate: Fri Mar  8 00:18:43 2013
    44%%BoundingBox: 0 0 842 596
    55%%EndComments
     
    5454%Edges:
    5555gsave
    56 574.035 177.301 622.149 225.748 670.264 274.195 0 1 0 5 lb
    57 694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 5 lb
    58 280.402 10.3938 246.402 -6.60595 212.403 -23.6057 1 1 0.5 5 lb
    59 280.402 10.3938 283.493 -18.9695 286.584 -48.3327 1 1 0.5 5 lb
    60 212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 1 1 0.5 5 lb
    61 286.584 -48.3327 326.765 -79.2414 366.947 -110.15 1 0.5 1 5 lb
    62 286.584 -48.3327 278.857 -111.695 271.13 -175.058 1 0.5 1 5 lb
    63 438.037 -88.514 417.946 -142.604 397.855 -196.694 0.5 0.5 1 5 lb
    64 438.037 -88.514 402.492 -99.332 366.947 -110.15 0.5 0.5 1 5 lb
    65 397.855 -196.694 382.401 -153.422 366.947 -110.15 0.5 0.5 1 5 lb
    66 366.947 -110.15 319.038 -142.604 271.13 -175.058 1 0.5 1 5 lb
    67 271.13 -175.058 274.221 -213.694 277.311 -252.33 0.5 1 1 5 lb
    68 271.13 -175.058 238.675 -190.512 206.221 -205.967 0.5 1 1 5 lb
    69 277.311 -252.33 241.766 -229.149 206.221 -205.967 0.5 1 1 5 lb
    70 -840.856 -246.718 -804.351 -66.7145 -767.847 113.289 0 0.5 0 5 lb
    71 -579.033 445.603 -673.44 279.446 -767.847 113.289 0 0 0.5 5 lb
    72 -579.033 445.603 -524.906 302.104 -470.779 158.605 0 0 0.5 5 lb
    73 -767.847 113.289 -619.313 135.947 -470.779 158.605 0 0 0.5 5 lb
    74 906.312 201.403 946.592 42.798 986.873 -115.807 0 0.5 0.5 5 lb
    75 906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0.5 0.5 5 lb
    76 986.873 -115.807 874.842 -66.7148 762.812 -17.6227 0 0.5 0.5 5 lb
    77 -470.779 158.605 -390.218 50.3508 -309.657 -57.9033 0.5 0.5 0 5 lb
    78 422.945 521.129 208.955 541.269 -5.03507 561.41 0.5 0 0.5 5 lb
    79 422.945 521.129 376.371 417.911 329.797 314.692 0.5 0 0.5 5 lb
    80 422.945 521.129 474.554 276.928 526.164 32.7279 0.5 0 0.5 5 lb
    81 -5.03507 561.41 -36.5042 440.568 -67.9734 319.727 0.5 0 0.5 5 lb
    82 329.797 314.692 130.912 317.209 -67.9734 319.727 0.5 0 0.5 5 lb
    83 -67.9734 319.727 229.095 176.227 526.164 32.7279 0.5 0 0.5 5 lb
    84 762.812 -17.6227 644.488 7.5526 526.164 32.7279 0.5 0.5 0.5 5 lb
    85 762.812 -17.6227 746.448 -162.381 730.084 -307.139 0.5 0.5 0.5 5 lb
    86 526.164 32.7279 470.779 -128.394 415.393 -289.516 0.5 0.5 0.5 5 lb
    87 730.084 -307.139 572.738 -298.327 415.393 -289.516 0.5 0.5 0.5 5 lb
    88 415.393 -289.516 173.71 -318.468 -67.9734 -347.42 1 0.5 0.5 5 lb
    89 -67.9734 -347.42 -188.815 -202.662 -309.657 -57.9033 0.5 1 0.5 5 lb
    90 -67.9734 -347.42 -195.758 -390.692 -323.543 -433.964 0.5 1 0.5 5 lb
    91 -309.657 -57.9033 -424.775 -160.272 -539.894 -262.64 0.5 1 0.5 5 lb
    92 -323.543 -433.964 -431.719 -348.302 -539.894 -262.64 0.5 1 0.5 5 lb
    93 -26.6953 -19.9585 44.8558 -96.8093 116.407 -173.66 1 1 0 5 lb
    94 -26.6953 -19.9585 87.2563 9.19185 201.208 38.3422 1 1 0 5 lb
    95 -26.6953 -19.9585 -144.622 43.6422 -262.548 107.243 1 0 1 5 lb
    96 -26.6953 -19.9585 -20.0703 56.8923 -13.4452 133.743 1 0 1 5 lb
    97 116.407 -173.66 158.808 -67.6589 201.208 38.3422 1 1 0 5 lb
    98 -262.548 107.243 -137.997 120.493 -13.4452 133.743 1 0 1 5 lb
    99 -262.548 107.243 -221.472 176.144 -180.397 245.045 1 0 1 5 lb
    100 -13.4452 133.743 -96.9211 189.394 -180.397 245.045 1 0 1 5 lb
    101 -180.397 245.045 -140.307 344.649 -132.697 451.748 0 1 1 5 lb
    102 -180.397 245.045 -172.787 352.144 -132.697 451.748 0 1 1 5 lb
    103 -416.25 345.746 -274.474 398.747 -132.697 451.748 0.5 0 0 5 lb
    104 -416.25 345.746 -393.725 457.048 -371.2 568.349 0.5 0 0 5 lb
    105 -132.697 451.748 -251.948 510.048 -371.2 568.349 0.5 0 0 5 lb
    106 670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 5 lb
    107 670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 5 lb
    108 588.113 544.499 756.39 476.923 924.667 409.347 0 0 1 5 lb
    109 -689.204 -237.261 -612.964 -103.444 -567.302 43.6423 0 0 0 5 lb
    110 -689.204 -237.261 -643.542 -90.1744 -567.302 43.6423 0 0 0 5 lb
     56574.035 177.301 622.149 225.748 670.264 274.195 0 1 0 6.25356 lb
     57694.579 115.483 682.421 194.839 670.264 274.195 1 0 0 6.25356 lb
     58280.402 10.3938 246.402 -6.60595 212.403 -23.6057 1 1 0.5 6.25356 lb
     59280.402 10.3938 283.493 -18.9695 286.584 -48.3327 1 1 0.5 6.25356 lb
     60212.403 -23.6057 249.493 -35.9692 286.584 -48.3327 1 1 0.5 6.25356 lb
     61286.584 -48.3327 326.765 -79.2414 366.947 -110.15 1 0.5 1 6.25356 lb
     62286.584 -48.3327 278.857 -111.695 271.13 -175.058 1 0.5 1 6.25356 lb
     63438.037 -88.514 417.946 -142.604 397.855 -196.694 0.5 0.5 1 6.25356 lb
     64438.037 -88.514 402.492 -99.332 366.947 -110.15 0.5 0.5 1 6.25356 lb
     65397.855 -196.694 382.401 -153.422 366.947 -110.15 0.5 0.5 1 6.25356 lb
     66366.947 -110.15 319.038 -142.604 271.13 -175.058 1 0.5 1 6.25356 lb
     67271.13 -175.058 274.221 -213.694 277.311 -252.33 0.5 1 1 6.25356 lb
     68271.13 -175.058 238.675 -190.512 206.221 -205.967 0.5 1 1 6.25356 lb
     69277.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
     74906.312 201.403 946.592 42.798 986.873 -115.807 0 0.5 0.5 6.25356 lb
     75906.312 201.403 834.562 91.8901 762.812 -17.6227 0 0.5 0.5 6.25356 lb
     76986.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
     78422.945 521.129 208.955 541.269 -5.03507 561.41 0.5 0 0.5 6.25356 lb
     79422.945 521.129 376.371 417.911 329.797 314.692 0.5 0 0.5 6.25356 lb
     80422.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
     82329.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
     84762.812 -17.6227 644.488 7.5526 526.164 32.7279 0.5 0.5 0.5 6.25356 lb
     85762.812 -17.6227 746.448 -162.381 730.084 -307.139 0.5 0.5 0.5 6.25356 lb
     86526.164 32.7279 470.779 -128.394 415.393 -289.516 0.5 0.5 0.5 6.25356 lb
     87730.084 -307.139 572.738 -298.327 415.393 -289.516 0.5 0.5 0.5 6.25356 lb
     88415.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
     97116.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
     106670.264 274.195 629.188 409.347 588.113 544.499 0 0 1 6.25356 lb
     107670.264 274.195 797.466 341.771 924.667 409.347 0 0 1 6.25356 lb
     108588.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
    111111grestore
    112112%Nodes:
    113113gsave
    114 -567.302 43.6423 20 0 0 1 nc
    115 -689.204 -237.261 20 0 0 1 nc
    116 924.667 409.347 20 0 0 1 nc
    117 588.113 544.499 20 0 0 1 nc
    118 670.264 274.195 20 1 0 0 nc
    119 -371.2 568.349 20 0 0 1 nc
    120 -132.697 451.748 20 1 0 0 nc
    121 -416.25 345.746 20 0 0 1 nc
    122 -180.397 245.045 20 1 0 0 nc
    123 -13.4452 133.743 20 0 0 1 nc
    124 -262.548 107.243 20 0 0 1 nc
    125 201.208 38.3422 20 0 0 1 nc
    126 116.407 -173.66 20 0 0 1 nc
    127 -26.6953 -19.9585 20 1 0 0 nc
    128 -539.894 -262.64 20 0 0 1 nc
    129 -323.543 -433.964 20 0 0 1 nc
    130 -309.657 -57.9033 20 1 0 0 nc
    131 -67.9734 -347.42 20 1 0 0 nc
    132 415.393 -289.516 20 1 0 0 nc
    133 730.084 -307.139 20 0 0 1 nc
    134 526.164 32.7279 20 1 0 0 nc
    135 762.812 -17.6227 20 1 0 0 nc
    136 -67.9734 319.727 20 0 0 1 nc
    137 329.797 314.692 20 0 0 1 nc
    138 -5.03507 561.41 20 0 0 1 nc
    139 422.945 521.129 20 0 0 1 nc
    140 -470.779 158.605 20 1 0 0 nc
    141 986.873 -115.807 20 0 0 1 nc
    142 906.312 201.403 20 0 0 1 nc
    143 -767.847 113.289 20 1 0 0 nc
    144 -579.033 445.603 20 0 0 1 nc
    145 -840.856 -246.718 20 0 0 1 nc
    146 206.221 -205.967 20 0 0 1 nc
    147 277.311 -252.33 20 0 0 1 nc
    148 271.13 -175.058 20 1 0 0 nc
    149 366.947 -110.15 20 1 0 0 nc
    150 397.855 -196.694 20 0 0 1 nc
    151 438.037 -88.514 20 0 0 1 nc
    152 286.584 -48.3327 20 1 0 0 nc
    153 212.403 -23.6057 20 0 0 1 nc
    154 280.402 10.3938 20 0 0 1 nc
    155 694.579 115.483 20 0 0 1 nc
    156 574.035 177.301 20 0 0 1 nc
     114-567.302 43.6423 20.8452 0 0 1 nc
     115-689.204 -237.261 20.8452 0 0 1 nc
     116924.667 409.347 20.8452 0 0 1 nc
     117588.113 544.499 20.8452 0 0 1 nc
     118670.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
     125201.208 38.3422 20.8452 0 0 1 nc
     126116.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
     132415.393 -289.516 20.8452 1 0 0 nc
     133730.084 -307.139 20.8452 0 0 1 nc
     134526.164 32.7279 20.8452 1 0 0 nc
     135762.812 -17.6227 20.8452 1 0 0 nc
     136-67.9734 319.727 20.8452 0 0 1 nc
     137329.797 314.692 20.8452 0 0 1 nc
     138-5.03507 561.41 20.8452 0 0 1 nc
     139422.945 521.129 20.8452 0 0 1 nc
     140-470.779 158.605 20.8452 1 0 0 nc
     141986.873 -115.807 20.8452 0 0 1 nc
     142906.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
     146206.221 -205.967 20.8452 0 0 1 nc
     147277.311 -252.33 20.8452 0 0 1 nc
     148271.13 -175.058 20.8452 1 0 0 nc
     149366.947 -110.15 20.8452 1 0 0 nc
     150397.855 -196.694 20.8452 0 0 1 nc
     151438.037 -88.514 20.8452 0 0 1 nc
     152286.584 -48.3327 20.8452 1 0 0 nc
     153212.403 -23.6057 20.8452 0 0 1 nc
     154280.402 10.3938 20.8452 0 0 1 nc
     155694.579 115.483 20.8452 0 0 1 nc
     156574.035 177.301 20.8452 0 0 1 nc
    157157grestore
    158158grestore
  • doc/images/strongly_connected_components.eps

    r634 r1213  
    11%!PS-Adobe-2.0 EPSF-2.0
    22%%Creator: LEMON, graphToEps()
    3 %%CreationDate: Fri Nov  4 13:47:12 2005
     3%%CreationDate: Fri Mar  8 00:22:15 2013
    44%%BoundingBox: 0 0 842 596
    55%%EndComments
     
    5454%Edges:
    5555gsave
    56 2 setlinewidth 0 0 1 setrgbcolor newpath
     564.56973 setlinewidth 0 0 1 setrgbcolor newpath
    5757218.178 27.2723 moveto
    58 192.373 -40.1551 188.622 -49.9556 169.228 -100.631 curveto stroke
    59 newpath 164.939 -111.838 moveto 165.492 -99.2013 lineto 172.964 -102.061 lineto closepath fill
    60 2 setlinewidth 0 0 1 setrgbcolor newpath
     58195.849 -31.0725 190.033 -46.2697 176.306 -82.1369 curveto stroke
     59newpath 163.235 -116.291 moveto 165.206 -77.8889 lineto 187.405 -86.3849 lineto closepath fill
     604.56973 setlinewidth 0 0 1 setrgbcolor newpath
    616144.8044 15.5841 moveto
    62 119.293 20.6059 129.775 21.3125 186.25 25.1199 curveto stroke
    63 newpath 198.223 25.927 moveto 186.519 21.1289 lineto 185.981 29.1108 lineto closepath fill
    64 2 setlinewidth 1 0 0 setrgbcolor newpath
     62109.705 19.9594 126.016 21.0591 166.493 23.7879 curveto stroke
     63newpath 202.98 26.2477 moveto 167.292 11.9299 lineto 165.694 35.6458 lineto closepath fill
     644.56973 setlinewidth 1 0 0 setrgbcolor newpath
    6565218.178 27.2723 moveto
    66 285.395 -87.4449 290.763 -96.6058 348.102 -194.464 curveto stroke
    67 newpath 354.169 -204.818 moveto 344.651 -196.487 lineto 351.554 -192.442 lineto closepath fill
    68 2 setlinewidth 0 0 1 setrgbcolor newpath
     66281.264 -80.3935 289.87 -95.0808 338.092 -177.379 curveto stroke
     67newpath 356.579 -208.932 moveto 327.837 -183.388 lineto 348.346 -171.371 lineto closepath fill
     684.56973 setlinewidth 0 0 1 setrgbcolor newpath
    6969157.79 -130.517 moveto
    70 108.71 -67.0521 102.27 -58.7243 64.3804 -9.72954 curveto stroke
    71 newpath 57.0394 -0.236898 moveto 67.5446 -7.28254 lineto 61.2162 -12.1765 lineto closepath fill
    72 2 setlinewidth 1 0 0 setrgbcolor newpath
     70114.446 -74.4692 104.358 -61.4239 76.4943 -25.394 curveto stroke
     71newpath 54.1228 3.53455 moveto 85.8959 -18.1234 lineto 67.0928 -32.6646 lineto closepath fill
     724.56973 setlinewidth 1 0 0 setrgbcolor newpath
    7373-105.193 -261.035 moveto
    74 -35.6576 -132.801 -30.5923 -123.459 29.5506 -12.5464 curveto stroke
    75 newpath 35.2708 -1.99743 moveto 33.0669 -14.4531 lineto 26.0343 -10.6397 lineto closepath fill
    76 2 setlinewidth 0 0 1 setrgbcolor newpath
     74-39.4801 -139.85 -31.344 -124.846 20.1113 -29.9539 curveto stroke
     75newpath 37.5434 2.19358 moveto 30.559 -35.6192 lineto 9.66361 -24.2886 lineto closepath fill
     764.56973 setlinewidth 0 0 1 setrgbcolor newpath
    7777-465.576 -42.8564 moveto
    78 -559.078 -25.5413 -569.47 -23.6169 -644.498 -9.72286 curveto stroke
    79 newpath -656.297 -7.5378 moveto -643.77 -5.78973 lineto -645.226 -13.656 lineto closepath fill
    80 2 setlinewidth 0 0 1 setrgbcolor newpath
     78-550.335 -27.1603 -566.8 -24.1113 -625.027 -13.3286 curveto stroke
     79newpath -660.985 -6.66971 moveto -622.863 -1.64245 lineto -627.191 -25.0148 lineto closepath fill
     804.56973 setlinewidth 0 0 1 setrgbcolor newpath
    8181-574.666 -153.893 moveto
    82 -528.842 -107.252 -521.515 -99.794 -488.002 -65.683 curveto stroke
    83 newpath -479.592 -57.123 moveto -485.149 -68.4863 lineto -490.856 -62.8797 lineto closepath fill
    84 2 setlinewidth 1 0 0 setrgbcolor newpath
     82-535.911 -114.447 -524.692 -103.027 -501.88 -79.8085 curveto stroke
     83newpath -476.251 -53.7222 moveto -493.402 -88.1377 lineto -510.358 -71.4793 lineto closepath fill
     844.56973 setlinewidth 1 0 0 setrgbcolor newpath
    8585-490.901 120.777 moveto
    86 -480.122 51.1328 -478.519 40.7713 -470.47 -11.2329 curveto stroke
    87 newpath -468.635 -23.0917 moveto -474.423 -11.8447 lineto -466.517 -10.6212 lineto closepath fill
    88 2 setlinewidth 0 0 1 setrgbcolor newpath
     86-481.623 60.8277 -479.143 44.8049 -473.499 8.33636 curveto stroke
     87newpath -467.906 -27.8032 moveto -485.244 6.51862 lineto -461.754 10.1541 lineto closepath fill
     884.56973 setlinewidth 0 0 1 setrgbcolor newpath
    8989-675.963 -3.89604 moveto
    90 -632.116 -68.8235 -626.228 -77.5422 -592.575 -127.374 curveto stroke
    91 newpath -585.859 -137.319 moveto -595.89 -129.612 lineto -589.26 -125.135 lineto closepath fill
    92 2 setlinewidth 0 0 1 setrgbcolor newpath
     90-637.405 -60.9909 -628.201 -74.6206 -603.658 -110.963 curveto stroke
     91newpath -583.191 -141.27 moveto -613.507 -117.615 lineto -593.808 -104.312 lineto closepath fill
     924.56973 setlinewidth 0 0 1 setrgbcolor newpath
    9393-490.901 120.777 moveto
    94 -435.445 215.844 -430.107 224.995 -384.3 303.522 curveto stroke
    95 newpath -378.253 313.887 moveto -380.845 301.507 lineto -387.755 305.537 lineto closepath fill
    96 2 setlinewidth 0 0 1 setrgbcolor newpath
     94-439.75 208.465 -431.238 223.057 -394.278 286.417 curveto stroke
     95newpath -375.851 318.006 moveto -384.012 280.429 lineto -404.543 292.406 lineto closepath fill
     964.56973 setlinewidth 0 0 1 setrgbcolor newpath
    9797-266.879 114.933 moveto
    98 -367.067 117.547 -377.642 117.822 -458.912 119.943 curveto stroke
    99 newpath -470.908 120.255 moveto -458.807 123.941 lineto -459.016 115.944 lineto closepath fill
    100 2 setlinewidth 0 0 1 setrgbcolor newpath
     98-358.311 117.318 -375.109 117.756 -439.117 119.426 curveto stroke
     99newpath -475.674 120.38 moveto -438.807 131.307 lineto -439.426 107.545 lineto closepath fill
     1004.56973 setlinewidth 0 0 1 setrgbcolor newpath
    101101-368.176 331.163 moveto
    102 -322.511 233.685 -318.018 224.095 -280.454 143.911 curveto stroke
    103 newpath -275.364 133.044 moveto -284.076 142.214 lineto -276.832 145.608 lineto closepath fill
    104 2 setlinewidth 1 0 0 setrgbcolor newpath
     102-326.156 241.466 -318.997 226.186 -288.855 161.843 curveto stroke
     103newpath -273.341 128.727 moveto -299.617 156.801 lineto -278.092 166.885 lineto closepath fill
     1044.56973 setlinewidth 1 0 0 setrgbcolor newpath
    105105-266.879 114.933 moveto
    106 -224.004 235.52 -220.448 245.52 -184.094 347.765 curveto stroke
    107 newpath -180.074 359.072 moveto -180.325 346.425 lineto -187.863 349.105 lineto closepath fill
    108 2 setlinewidth 0 0 1 setrgbcolor newpath
     106-226.764 227.755 -221.069 243.774 -190.728 329.107 curveto stroke
     107newpath -178.477 363.564 moveto -179.53 325.126 lineto -201.926 333.089 lineto closepath fill
     1084.56973 setlinewidth 0 0 1 setrgbcolor newpath
    109109-251.294 -335.059 moveto
    110 -189.25 -303.624 -179.902 -298.887 -133.738 -275.498 curveto stroke
    111 newpath -123.034 -270.074 moveto -131.93 -279.066 lineto -135.546 -271.93 lineto closepath fill
    112 2 setlinewidth 0 0 1 setrgbcolor newpath
     110-198.044 -308.079 -183.61 -300.766 -151.402 -284.448 curveto stroke
     111newpath -118.781 -267.92 moveto -146.031 -295.049 lineto -156.774 -273.846 lineto closepath fill
     1124.56973 setlinewidth 0 0 1 setrgbcolor newpath
    113113-389.604 -136.361 moveto
    114 -327.15 -226.083 -321.098 -234.777 -269.576 -308.795 curveto stroke
    115 newpath -262.72 -318.644 moveto -272.859 -311.081 lineto -266.293 -306.51 lineto closepath fill
    116 2 setlinewidth 1 0 0 setrgbcolor newpath
     114-332.039 -219.059 -322.392 -232.919 -280.889 -292.543 curveto stroke
     115newpath -259.996 -322.557 moveto -290.643 -299.333 lineto -271.134 -285.753 lineto closepath fill
     1164.56973 setlinewidth 1 0 0 setrgbcolor newpath
    1171175.84406 175.322 moveto
    118 -76.0754 267.926 -83.1051 275.873 -152.172 353.948 curveto stroke
    119 newpath -160.122 362.936 moveto -149.176 356.598 lineto -155.168 351.298 lineto closepath fill
    120 2 setlinewidth 0 0 1 setrgbcolor newpath
     118-70.5724 261.706 -81.8227 274.423 -139.051 339.116 curveto stroke
     119newpath -163.281 366.507 moveto -130.149 346.991 lineto -147.953 331.242 lineto closepath fill
     1204.56973 setlinewidth 0 0 1 setrgbcolor newpath
    121121169.478 311.683 moveto
    122 96.8003 251.119 88.6819 244.353 30.4273 195.808 curveto stroke
    123 newpath 21.2086 188.126 moveto 27.8666 198.881 lineto 32.988 192.735 lineto closepath fill
    124 2 setlinewidth 0 0 1 setrgbcolor newpath
     122103.641 256.819 90.7821 246.103 45.6398 208.485 curveto stroke
     123newpath 17.546 185.074 moveto 38.0313 217.615 lineto 53.2483 199.355 lineto closepath fill
     1244.56973 setlinewidth 0 0 1 setrgbcolor newpath
    125125342.851 111.037 moveto
    126 263.766 202.563 256.831 210.589 190.4 287.47 curveto stroke
    127 newpath 182.554 296.55 moveto 193.427 290.085 lineto 187.373 284.855 lineto closepath fill
    128 2 setlinewidth 0 0 1 setrgbcolor newpath
     126269.224 196.246 258.132 209.083 203.347 272.486 curveto stroke
     127newpath 179.437 300.157 moveto 212.34 280.257 lineto 194.354 264.716 lineto closepath fill
     1284.56973 setlinewidth 0 0 1 setrgbcolor newpath
    1291295.84406 175.322 moveto
    130 163.16 145.314 173.605 143.321 311.418 117.033 curveto stroke
    131 newpath 323.205 114.784 moveto 310.668 113.104 lineto 312.167 120.962 lineto closepath fill
    132 2 setlinewidth 0 0 1 setrgbcolor newpath
     130155.419 146.79 172.221 143.585 291.966 120.743 curveto stroke
     131newpath 327.888 113.891 moveto 289.739 109.069 lineto 294.193 132.418 lineto closepath fill
     1324.56973 setlinewidth 0 0 1 setrgbcolor newpath
    133133342.851 111.037 moveto
    134 497.255 2.58683 505.964 -3.53033 643.932 -100.436 curveto stroke
    135 newpath 653.752 -107.334 moveto 641.633 -103.71 lineto 646.231 -97.163 lineto closepath fill
    136 2 setlinewidth 0 0 1 setrgbcolor newpath
     134490.978 6.99574 505.015 -2.86383 627.727 -89.0547 curveto stroke
     135newpath 657.653 -110.074 moveto 620.896 -98.7802 lineto 634.558 -79.3291 lineto closepath fill
     1364.56973 setlinewidth 0 0 1 setrgbcolor newpath
    137137364.28 -222.074 moveto
    138 354.298 -66.9063 353.616 -56.2971 344.905 79.1029 curveto stroke
    139 newpath 344.135 91.0781 moveto 348.897 79.3597 lineto 340.914 78.8461 lineto closepath fill
    140 2 setlinewidth 0 0 1 setrgbcolor newpath
     138354.807 -74.8128 353.709 -57.7536 346.177 59.3416 curveto stroke
     139newpath 343.829 95.836 moveto 358.037 60.1045 lineto 334.316 58.5786 lineto closepath fill
     1404.56973 setlinewidth 0 0 1 setrgbcolor newpath
    141141670.118 -118.829 moveto
    142 528.037 -166.793 517.967 -170.192 394.599 -211.839 curveto stroke
    143 newpath 383.229 -215.677 moveto 393.32 -208.049 lineto 395.878 -215.629 lineto closepath fill
    144 2 setlinewidth 1 0 0 setrgbcolor newpath
     142535.595 -164.241 519.412 -169.704 413.361 -205.505 curveto stroke
     143newpath 378.712 -217.202 moveto 409.559 -194.245 lineto 417.162 -216.766 lineto closepath fill
     1444.56973 setlinewidth 1 0 0 setrgbcolor newpath
    145145-105.193 -261.035 moveto
    146 118.401 -242.479 129.015 -241.598 332.39 -224.721 curveto stroke
    147 newpath 344.348 -223.728 moveto 332.72 -228.707 lineto 332.059 -220.734 lineto closepath fill
    148 2 setlinewidth 0 0 1 setrgbcolor newpath
     146110.939 -243.099 128.069 -241.677 312.655 -226.358 curveto stroke
     147newpath 349.1 -223.334 moveto 313.638 -238.202 lineto 311.672 -214.514 lineto closepath fill
     1484.56973 setlinewidth 0 0 1 setrgbcolor newpath
    149149-105.193 -261.035 moveto
    150 -160.867 -161.176 -166.028 -151.918 -212.336 -68.858 curveto stroke
    151 newpath -218.179 -58.3769 moveto -208.842 -66.9102 lineto -215.829 -70.8058 lineto closepath fill
    152 2 setlinewidth 0 0 1 setrgbcolor newpath
     150-156.746 -168.566 -164.987 -153.784 -202.693 -86.1539 curveto stroke
     151newpath -220.5 -54.2129 moveto -192.312 -80.3665 lineto -213.073 -91.9413 lineto closepath fill
     1524.56973 setlinewidth 0 0 1 setrgbcolor newpath
    153153-227.918 -40.9084 moveto
    154 -298.35 -82.4884 -307.42 -87.8432 -362.048 -120.093 curveto stroke
    155 newpath -372.381 -126.193 moveto -364.081 -116.648 lineto -360.014 -123.537 lineto closepath fill
     154-290.327 -77.7521 -304.558 -86.1532 -344.995 -110.026 curveto stroke
     155newpath -376.487 -128.617 moveto -351.037 -99.7914 lineto -338.953 -120.26 lineto closepath fill
    156156grestore
    157157%Nodes:
    158158gsave
    159 -389.604 -136.361 20 0 1 0 nc
    160 -227.918 -40.9084 20 0 1 0 nc
    161 -105.193 -261.035 20 0 1 0 nc
    162 364.28 -222.074 20 1 1 0 nc
    163 670.118 -118.829 20 1 1 0 nc
    164 342.851 111.037 20 1 1 0 nc
    165 5.84406 175.322 20 1 1 0 nc
    166 169.478 311.683 20 1 1 0 nc
    167 -173.374 377.916 20 1 0 1 nc
    168 -251.294 -335.059 20 0 1 0 nc
    169 -266.879 114.933 20 0 0 0 nc
    170 -368.176 331.163 20 0 0 0 nc
    171 -490.901 120.777 20 0 0 0 nc
    172 -574.666 -153.893 20 1 0 0 nc
    173 -675.963 -3.89604 20 1 0 0 nc
    174 -465.576 -42.8564 20 1 0 0 nc
    175 44.8044 15.5841 20 0 0 1 nc
    176 157.79 -130.517 20 0 0 1 nc
    177 218.178 27.2723 20 0 0 1 nc
     159-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
     162364.28 -222.074 15.2324 1 1 0 nc
     163670.118 -118.829 15.2324 1 1 0 nc
     164342.851 111.037 15.2324 1 1 0 nc
     1655.84406 175.322 15.2324 1 1 0 nc
     166169.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
     17544.8044 15.5841 15.2324 0 0 1 nc
     176157.79 -130.517 15.2324 0 0 1 nc
     177218.178 27.2723 15.2324 0 0 1 nc
    178178grestore
    179179grestore
  • doc/lgf.dox

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    6464\endcode
    6565
     66The \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 the
     68graph. If a map is in both of these sections, then it can be used as a
     69regular node map.
     70
     71\code
     72 @red_nodes
     73 label  only_red_map   name
     74 1      "cherry"       "John"
     75 2      "Santa Claus"  "Jack"
     76 3      "blood"        "Jason"
     77 @blue_nodes
     78 label  name
     79 4      "Elisabeth"
     80 5      "Eve"
     81\endcode
     82
    6683The \c \@arcs section is very similar to the \c \@nodes section,
    6784it again starts with a header line describing the names of the maps,
     
    7996\endcode
    8097
     98If there is no map in the \c \@arcs section at all, then it must be
     99indicated by a sole '-' sign in the first line.
     100
     101\code
     102 @arcs
     103         -
     104 1   2
     105 1   3
     106 2   3
     107\endcode
     108
    81109The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can
    82110also store the edge set of an undirected graph. In such case there is
    83111a conventional method for store arc maps in the file, if two columns
    84 has the same caption with \c '+' and \c '-' prefix, then these columns
     112have the same caption with \c '+' and \c '-' prefix, then these columns
    85113can be regarded as the values of an arc map.
    86114
  • doc/min_cost_flow.dox

    r835 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2727minimum total cost from a set of supply nodes to a set of demand nodes
    2828in a network with capacity constraints (lower and upper bounds)
    29 and arc costs \ref amo93networkflows.
     29and arc costs \cite amo93networkflows.
    3030
    3131Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower: A\rightarrow\mathbf{R}\f$,
     
    8282   - if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
    8383     then \f$\pi(u)=0\f$.
    84  
     84
    8585Here \f$cost^\pi(uv)\f$ denotes the \e reduced \e cost of the arc
    8686\f$uv\in A\f$ with respect to the potential function \f$\pi\f$, i.e.
     
    102102\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f]
    103103
    104 However if the sum of the supply values is zero, then these two problems
     104However, if the sum of the supply values is zero, then these two problems
    105105are equivalent.
    106106The \ref min_cost_flow_algs "algorithms" in LEMON support the general
     
    120120\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f]
    121121
    122 It means that the total demand must be less or equal to the 
     122It means that the total demand must be less or equal to the
    123123total supply (i.e. \f$\sum_{u\in V} sup(u)\f$ must be zero or
    124124positive) and all the demands have to be satisfied, but there
  • doc/references.bib

    r802 r1219  
    55  title =        {{LEMON} -- {L}ibrary for {E}fficient {M}odeling and
    66                  {O}ptimization in {N}etworks},
    7   howpublished = {\url{http://lemon.cs.elte.hu/}},
    8   year =         2009
     7  howpublished = {\url{http://lemon.cs.elte.hu/}}
    98}
    109
     
    2120                  {O}perations {R}esearch},
    2221  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}
    2344}
    2445
     
    212233  volume =       23,
    213234  pages =        {309-311}
     235}
     236
     237@article{hartmann93finding,
     238  author =       {Mark Hartmann and James B. Orlin},
     239  title =        {Finding minimum cost to time ratio cycles with small
     240                  integral transit times},
     241  journal =      {Networks},
     242  year =         1993,
     243  volume =       23,
     244  pages =        {567-574}
    214245}
    215246
     
    226257}
    227258
     259@article{dasdan04experimental,
     260  author =       {Ali Dasdan},
     261  title =        {Experimental analysis of the fastest optimum cycle
     262                  ratio and mean algorithms},
     263  journal =      {ACM Trans. Des. Autom. Electron. Syst.},
     264  year =         2004,
     265  volume =       9,
     266  issue =        4,
     267  pages =        {385-418}
     268}
     269
    228270
    229271%%%%% Minimum cost flow algorithms %%%%%
     
    298340  address =      {Dublin, Ireland},
    299341  year =         1991,
    300   month =        sep,
    301 }
     342  month =        sep
     343}
     344
     345%%%%% Other algorithms %%%%%
     346
     347@article{grosso08maxclique,
     348  author =       {Andrea Grosso and Marco Locatelli and Wayne Pullan},
     349  title =        {Simple ingredients leading to very efficient
     350                  heuristics for the maximum clique problem},
     351  journal =      {Journal of Heuristics},
     352  year =         2008,
     353  volume =       14,
     354  number =       6,
     355  pages =        {587--612}
     356}
  • lemon/CMakeLists.txt

    r726 r1315  
    55
    66CONFIGURE_FILE(
    7   ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
     7  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
    88  ${CMAKE_CURRENT_BINARY_DIR}/config.h
     9)
     10
     11CONFIGURE_FILE(
     12  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.in
     13  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
     14  @ONLY
    915)
    1016
     
    3137IF(LEMON_HAVE_CPLEX)
    3238  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    33   INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
     39  INCLUDE_DIRECTORIES(${ILOG_INCLUDE_DIRS})
    3440ENDIF()
    3541
     
    4450ENDIF()
    4551
     52IF(LEMON_HAVE_SOPLEX)
     53  SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc)
     54  INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS})
     55ENDIF()
     56
    4657ADD_LIBRARY(lemon ${LEMON_SOURCES})
     58
     59TARGET_LINK_LIBRARIES(lemon
     60  ${GLPK_LIBRARIES} ${COIN_LIBRARIES} ${ILOG_LIBRARIES} ${SOPLEX_LIBRARIES}
     61  )
     62
    4763IF(UNIX)
    48   SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
     64  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon VERSION ${LEMON_VERSION} SOVERSION ${LEMON_VERSION})
    4965ENDIF()
    5066
     
    5268  TARGETS lemon
    5369  ARCHIVE DESTINATION lib
     70  LIBRARY DESTINATION lib
    5471  COMPONENT library
    5572)
     
    6784  COMPONENT headers
    6885)
     86
     87INSTALL(
     88  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
     89  DESTINATION lib/pkgconfig
     90)
     91
  • lemon/adaptors.h

    r834 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    422422      Parent::initialize(digraph);
    423423      _node_filter = &node_filter;
    424       _arc_filter = &arc_filter;     
     424      _arc_filter = &arc_filter;
    425425    }
    426426
     
    509509
    510510    template <typename V>
    511     class NodeMap 
    512       : public SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>, 
    513               LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> {
     511    class NodeMap
     512      : public SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>,
     513              LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> {
    514514      typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>,
    515         LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> Parent;
     515        LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> Parent;
    516516
    517517    public:
     
    536536
    537537    template <typename V>
    538     class ArcMap 
     538    class ArcMap
    539539      : public SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>,
    540               LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> {
     540              LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> {
    541541      typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, ch>,
    542542        LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> Parent;
     
    583583      Parent::initialize(digraph);
    584584      _node_filter = &node_filter;
    585       _arc_filter = &arc_filter;     
     585      _arc_filter = &arc_filter;
    586586    }
    587587
     
    652652
    653653    template <typename V>
    654     class NodeMap 
     654    class NodeMap
    655655      : public SubMapExtender<SubDigraphBase<DGR, NF, AF, false>,
    656656          LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> {
    657       typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, false>, 
     657      typedef SubMapExtender<SubDigraphBase<DGR, NF, AF, false>,
    658658        LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, NodeMap<V>)> Parent;
    659659
     
    679679
    680680    template <typename V>
    681     class ArcMap 
     681    class ArcMap
    682682      : public SubMapExtender<SubDigraphBase<DGR, NF, AF, false>,
    683683          LEMON_SCOPE_FIX(DigraphAdaptorBase<DGR>, ArcMap<V>)> {
     
    10221022
    10231023    template <typename V>
    1024     class NodeMap 
     1024    class NodeMap
    10251025      : public SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10261026          LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> {
    1027       typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, 
     1027      typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10281028        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> Parent;
    10291029
     
    10491049
    10501050    template <typename V>
    1051     class ArcMap 
     1051    class ArcMap
    10521052      : public SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10531053          LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> {
    1054       typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, 
     1054      typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10551055        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> Parent;
    10561056
     
    10761076
    10771077    template <typename V>
    1078     class EdgeMap 
     1078    class EdgeMap
    10791079      : public SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10801080        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> {
    1081       typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>, 
     1081      typedef SubMapExtender<SubGraphBase<GR, NF, EF, ch>,
    10821082        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> Parent;
    10831083
     
    11181118    NF* _node_filter;
    11191119    EF* _edge_filter;
    1120     SubGraphBase() 
    1121           : Parent(), _node_filter(0), _edge_filter(0) { }
     1120    SubGraphBase()
     1121          : Parent(), _node_filter(0), _edge_filter(0) { }
    11221122
    11231123    void initialize(GR& graph, NF& node_filter, EF& edge_filter) {
     
    12201220
    12211221    template <typename V>
    1222     class NodeMap 
     1222    class NodeMap
    12231223      : public SubMapExtender<SubGraphBase<GR, NF, EF, false>,
    12241224          LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> {
    1225       typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, 
     1225      typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>,
    12261226        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, NodeMap<V>)> Parent;
    12271227
     
    12471247
    12481248    template <typename V>
    1249     class ArcMap 
     1249    class ArcMap
    12501250      : public SubMapExtender<SubGraphBase<GR, NF, EF, false>,
    12511251          LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> {
    1252       typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, 
     1252      typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>,
    12531253        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, ArcMap<V>)> Parent;
    12541254
     
    12741274
    12751275    template <typename V>
    1276     class EdgeMap 
     1276    class EdgeMap
    12771277      : public SubMapExtender<SubGraphBase<GR, NF, EF, false>,
    12781278        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> {
    1279       typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>, 
    1280         LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> Parent;
     1279      typedef SubMapExtender<SubGraphBase<GR, NF, EF, false>,
     1280        LEMON_SCOPE_FIX(GraphAdaptorBase<GR>, EdgeMap<V>)> Parent;
    12811281
    12821282    public:
     
    13721372    /// and edge filter maps.
    13731373    SubGraph(GR& graph, NF& node_filter, EF& edge_filter) {
    1374       initialize(graph, node_filter, edge_filter);
     1374      this->initialize(graph, node_filter, edge_filter);
    13751375    }
    13761376
     
    15051505#endif
    15061506    typedef DigraphAdaptorExtender<
    1507       SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, Const<bool, true> >, 
     1507      SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, Const<bool, true> >,
    15081508                     true> > Parent;
    15091509
     
    15261526    /// Creates a subgraph for the given digraph or graph with the
    15271527    /// given node filter map.
    1528     FilterNodes(GR& graph, NF& node_filter) 
     1528    FilterNodes(GR& graph, NF& node_filter)
    15291529      : Parent(), const_true_map()
    15301530    {
     
    15641564                    typename enable_if<UndirectedTagIndicator<GR> >::type> :
    15651565    public GraphAdaptorExtender<
    1566       SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >, 
     1566      SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >,
    15671567                   true> > {
    15681568
    15691569    typedef GraphAdaptorExtender<
    1570       SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >, 
     1570      SubGraphBase<GR, NF, ConstMap<typename GR::Edge, Const<bool, true> >,
    15711571                   true> > Parent;
    15721572
     
    16541654#endif
    16551655    typedef DigraphAdaptorExtender<
    1656       SubDigraphBase<DGR, ConstMap<typename DGR::Node, Const<bool, true> >, 
     1656      SubDigraphBase<DGR, ConstMap<typename DGR::Node, Const<bool, true> >,
    16571657                     AF, false> > Parent;
    16581658
     
    17621762  class FilterEdges :
    17631763    public GraphAdaptorExtender<
    1764       SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true> >, 
     1764      SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true> >,
    17651765                   EF, false> > {
    17661766#endif
    17671767    typedef GraphAdaptorExtender<
    1768       SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true > >, 
     1768      SubGraphBase<GR, ConstMap<typename GR::Node, Const<bool, true > >,
    17691769                   EF, false> > Parent;
    17701770
     
    17911791    /// Creates a subgraph for the given graph with the given edge
    17921792    /// filter map.
    1793     FilterEdges(GR& graph, EF& edge_filter) 
     1793    FilterEdges(GR& graph, EF& edge_filter)
    17941794      : Parent(), const_true_map() {
    17951795      Parent::initialize(graph, const_true_map, edge_filter);
     
    18591859      bool _forward;
    18601860
    1861       Arc(const Edge& edge, bool forward) 
     1861      Arc(const Edge& edge, bool forward)
    18621862        : _edge(edge), _forward(forward) {}
    18631863
     
    20992099
    21002100      ArcMapBase(const UndirectorBase<DGR>& adaptor, const V& value)
    2101         : _forward(*adaptor._digraph, value), 
     2101        : _forward(*adaptor._digraph, value),
    21022102          _backward(*adaptor._digraph, value) {}
    21032103
     
    22172217    typedef typename ItemSetTraits<DGR, Edge>::ItemNotifier EdgeNotifier;
    22182218    EdgeNotifier& notifier(Edge) const { return _digraph->notifier(Edge()); }
    2219    
     2219
    22202220    typedef EdgeNotifier ArcNotifier;
    22212221    ArcNotifier& notifier(Arc) const { return _digraph->notifier(Edge()); }
     
    22782278    /// Creates an undirected graph from the given digraph.
    22792279    Undirector(DGR& digraph) {
    2280       initialize(digraph);
     2280      this->initialize(digraph);
    22812281    }
    22822282
     
    27292729           typename FM = CM,
    27302730           typename TL = Tolerance<typename CM::Value> >
    2731   class ResidualDigraph 
     2731  class ResidualDigraph
    27322732    : public SubDigraph<
    27332733        Undirector<const DGR>,
     
    27862786    ResidualDigraph(const DGR& digraph, const CM& capacity,
    27872787                    FM& flow, const TL& tolerance = Tolerance())
    2788       : Parent(), _capacity(&capacity), _flow(&flow), 
     2788      : Parent(), _capacity(&capacity), _flow(&flow),
    27892789        _graph(digraph), _node_filter(),
    27902790        _forward_filter(capacity, flow, tolerance),
     
    28682868
    28692869      /// Constructor
    2870       ResidualCapacity(const ResidualDigraph<DGR, CM, FM, TL>& adaptor) 
     2870      ResidualCapacity(const ResidualDigraph<DGR, CM, FM, TL>& adaptor)
    28712871        : _adaptor(&adaptor) {}
    28722872
     
    34483448    /// to get a node map of the split digraph.
    34493449    /// Its value type is inherited from the first node map type (\c IN).
    3450     /// \tparam IN The type of the node map for the in-nodes. 
     3450    /// \tparam IN The type of the node map for the in-nodes.
    34513451    /// \tparam OUT The type of the node map for the out-nodes.
    34523452    template <typename IN, typename OUT>
  • lemon/arg_parser.cc

    r463 r956  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2121namespace lemon {
    2222
     23  void ArgParser::_terminate(ArgParserException::Reason reason) const
     24  {
     25    if(_exit_on_problems)
     26      exit(1);
     27    else throw(ArgParserException(reason));
     28  }
     29
     30
    2331  void ArgParser::_showHelp(void *p)
    2432  {
    2533    (static_cast<ArgParser*>(p))->showHelp();
    26     exit(1);
     34    (static_cast<ArgParser*>(p))->_terminate(ArgParserException::HELP);
    2735  }
    2836
    2937  ArgParser::ArgParser(int argc, const char * const *argv)
    30     :_argc(argc), _argv(argv), _command_name(argv[0]) {
     38    :_argc(argc), _argv(argv), _command_name(argv[0]),
     39    _exit_on_problems(true) {
    3140    funcOption("-help","Print a short help message",_showHelp,this);
    3241    synonym("help","-help");
     
    343352        i!=_others_help.end();++i) showHelp(i);
    344353    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i);
    345     exit(1);
     354    _terminate(ArgParserException::HELP);
    346355  }
    347356
     
    352361    std::cerr << "\nType '" << _command_name <<
    353362      " --help' to obtain a short summary on the usage.\n\n";
    354     exit(1);
     363    _terminate(ArgParserException::UNKNOWN_OPT);
    355364  }
    356365
     
    415424      std::cerr << "\nType '" << _command_name <<
    416425        " --help' to obtain a short summary on the usage.\n\n";
    417       exit(1);
     426      _terminate(ArgParserException::INVALID_OPT);
    418427    }
    419428  }
  • lemon/arg_parser.h

    r463 r1327  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2727#include <sstream>
    2828#include <algorithm>
     29#include <lemon/core.h>
    2930#include <lemon/assert.h>
    3031
     
    3435
    3536namespace lemon {
     37
     38  ///Exception used by ArgParser
     39
     40  ///Exception used by ArgParser.
     41  ///
     42  class ArgParserException : public Exception {
     43  public:
     44    /// Reasons for failure
     45
     46    /// Reasons for failure.
     47    ///
     48    enum Reason {
     49      HELP,         ///< <tt>--help</tt> option was given.
     50      UNKNOWN_OPT,  ///< Unknown option was given.
     51      INVALID_OPT   ///< Invalid combination of options.
     52    };
     53
     54  private:
     55    Reason _reason;
     56
     57  public:
     58    ///Constructor
     59    ArgParserException(Reason r) throw() : _reason(r) {}
     60    ///Virtual destructor
     61    virtual ~ArgParserException() throw() {}
     62    ///A short description of the exception
     63    virtual const char* what() const throw() {
     64      switch(_reason)
     65        {
     66        case HELP:
     67          return "lemon::ArgParseException: ask for help";
     68          break;
     69        case UNKNOWN_OPT:
     70          return "lemon::ArgParseException: unknown option";
     71          break;
     72        case INVALID_OPT:
     73          return "lemon::ArgParseException: invalid combination of options";
     74          break;
     75        }
     76      return "";
     77    }
     78    ///Return the reason for the failure
     79    Reason reason() const {return _reason; }
     80  };
     81
    3682
    3783  ///Command line arguments parser
     
    116162                    const std::string &help,
    117163                    void (*func)(void *),void *data);
     164
     165    bool _exit_on_problems;
     166
     167    void _terminate(ArgParserException::Reason reason) const;
    118168
    119169  public:
     
    381431    const std::vector<std::string> &files() const { return _file_args; }
    382432
     433    ///Throw instead of exit in case of problems
     434    void throwOnProblems()
     435    {
     436      _exit_on_problems=false;
     437    }
    383438  };
    384439}
  • lemon/assert.h

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    200200                             ::lemon::_assert_bits::cstringify(msg),    \
    201201                             #exp), 0)))
    202 #    if LEMON_ENABLE_DEBUG
     202#    if defined LEMON_ENABLE_DEBUG
    203203#      define LEMON_DEBUG(exp, msg)                                     \
    204204         (static_cast<void> (!!(exp) ? 0 : (                            \
  • lemon/base.cc

    r554 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2222#include<lemon/tolerance.h>
    2323#include<lemon/core.h>
     24#include<lemon/time_measure.h>
    2425namespace lemon {
    2526
     
    3233#endif
    3334
     35  TimeStamp::Format TimeStamp::_format = TimeStamp::NORMAL;
     36
    3437} //namespace lemon
  • lemon/bellman_ford.h

    r870 r1270  
    1 /* -*- C++ -*-
     1/* -*- mode: C++; indent-tabs-mode: nil; -*-
    22 *
    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.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    3636
    3737  /// \brief Default OperationTraits for the BellmanFord algorithm class.
    38   /// 
     38  ///
    3939  /// This operation traits class defines all computational operations
    4040  /// and constants that are used in the Bellman-Ford algorithm.
     
    4343  /// value is used as extremal infinity value.
    4444  template <
    45     typename V, 
     45    typename V,
    4646    bool has_inf = std::numeric_limits<V>::has_infinity>
    4747  struct BellmanFordDefaultOperationTraits {
     
    8484    }
    8585  };
    86  
     86
    8787  /// \brief Default traits class of BellmanFord class.
    8888  ///
     
    9292  template<typename GR, typename LEN>
    9393  struct BellmanFordDefaultTraits {
    94     /// The type of the digraph the algorithm runs on. 
     94    /// The type of the digraph the algorithm runs on.
    9595    typedef GR Digraph;
    9696
     
    110110    /// \see BellmanFordDefaultOperationTraits
    111111    typedef BellmanFordDefaultOperationTraits<Value> OperationTraits;
    112  
    113     /// \brief The type of the map that stores the last arcs of the 
     112
     113    /// \brief The type of the map that stores the last arcs of the
    114114    /// shortest paths.
    115     /// 
     115    ///
    116116    /// The type of the map that stores the last
    117117    /// arcs of the shortest paths.
     
    120120
    121121    /// \brief Instantiates a \c PredMap.
    122     /// 
    123     /// This function instantiates a \ref PredMap. 
     122    ///
     123    /// This function instantiates a \ref PredMap.
    124124    /// \param g is the digraph to which we would like to define the
    125125    /// \ref PredMap.
     
    136136    /// \brief Instantiates a \c DistMap.
    137137    ///
    138     /// This function instantiates a \ref DistMap. 
    139     /// \param g is the digraph to which we would like to define the 
     138    /// This function instantiates a \ref DistMap.
     139    /// \param g is the digraph to which we would like to define the
    140140    /// \ref DistMap.
    141141    static DistMap *createDistMap(const GR& g) {
     
    144144
    145145  };
    146  
     146
    147147  /// \brief %BellmanFord algorithm class.
    148148  ///
    149149  /// \ingroup shortest_path
    150   /// This class provides an efficient implementation of the Bellman-Ford 
     150  /// This class provides an efficient implementation of the Bellman-Ford
    151151  /// algorithm. The maximum time complexity of the algorithm is
    152   /// <tt>O(ne)</tt>.
     152  /// <tt>O(nm)</tt>.
    153153  ///
    154154  /// The Bellman-Ford algorithm solves the single-source shortest path
     
    159159  ///
    160160  /// The arc lengths are passed to the algorithm using a
    161   /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any 
     161  /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any
    162162  /// kind of length. The type of the length values is determined by the
    163163  /// \ref concepts::ReadMap::Value "Value" type of the length map.
     
    172172  /// the lengths of the arcs. The default map type is
    173173  /// \ref concepts::Digraph::ArcMap "GR::ArcMap<int>".
     174  /// \tparam TR The traits class that defines various types used by the
     175  /// algorithm. By default, it is \ref BellmanFordDefaultTraits
     176  /// "BellmanFordDefaultTraits<GR, LEN>".
     177  /// In most cases, this parameter should not be set directly,
     178  /// consider to use the named template parameters instead.
    174179#ifdef DOXYGEN
    175180  template <typename GR, typename LEN, typename TR>
     
    184189    ///The type of the underlying digraph.
    185190    typedef typename TR::Digraph Digraph;
    186    
     191
    187192    /// \brief The type of the arc lengths.
    188193    typedef typename TR::LengthMap::Value Value;
     
    196201    /// The type of the paths.
    197202    typedef PredMapPath<Digraph, PredMap> Path;
    198     ///\brief The \ref BellmanFordDefaultOperationTraits
     203    ///\brief The \ref lemon::BellmanFordDefaultOperationTraits
    199204    /// "operation traits class" of the algorithm.
    200205    typedef typename TR::OperationTraits OperationTraits;
    201206
    202     ///The \ref BellmanFordDefaultTraits "traits class" of the algorithm.
     207    ///\brief The \ref lemon::BellmanFordDefaultTraits "traits class"
     208    ///of the algorithm.
    203209    typedef TR Traits;
    204210
     
    231237    void create_maps() {
    232238      if(!_pred) {
    233         _local_pred = true;
    234         _pred = Traits::createPredMap(*_gr);
     239        _local_pred = true;
     240        _pred = Traits::createPredMap(*_gr);
    235241      }
    236242      if(!_dist) {
    237         _local_dist = true;
    238         _dist = Traits::createDistMap(*_gr);
     243        _local_dist = true;
     244        _dist = Traits::createDistMap(*_gr);
    239245      }
    240246      if(!_mask) {
     
    242248      }
    243249    }
    244    
     250
    245251  public :
    246  
     252
    247253    typedef BellmanFord Create;
    248254
     
    267273    /// It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    268274    template <class T>
    269     struct SetPredMap 
     275    struct SetPredMap
    270276      : public BellmanFord< Digraph, LengthMap, SetPredMapTraits<T> > {
    271277      typedef BellmanFord< Digraph, LengthMap, SetPredMapTraits<T> > Create;
    272278    };
    273    
     279
    274280    template <class T>
    275281    struct SetDistMapTraits : public Traits {
     
    288294    /// It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    289295    template <class T>
    290     struct SetDistMap 
     296    struct SetDistMap
    291297      : public BellmanFord< Digraph, LengthMap, SetDistMapTraits<T> > {
    292298      typedef BellmanFord< Digraph, LengthMap, SetDistMapTraits<T> > Create;
     
    297303      typedef T OperationTraits;
    298304    };
    299    
    300     /// \brief \ref named-templ-param "Named parameter" for setting 
     305
     306    /// \brief \ref named-templ-param "Named parameter" for setting
    301307    /// \c OperationTraits type.
    302308    ///
     
    310316      Create;
    311317    };
    312    
     318
    313319    ///@}
    314320
    315321  protected:
    316    
     322
    317323    BellmanFord() {}
    318324
    319   public:     
    320    
     325  public:
     326
    321327    /// \brief Constructor.
    322328    ///
     
    328334      _pred(0), _local_pred(false),
    329335      _dist(0), _local_dist(false), _mask(0) {}
    330    
     336
    331337    ///Destructor.
    332338    ~BellmanFord() {
     
    355361    BellmanFord &predMap(PredMap &map) {
    356362      if(_local_pred) {
    357         delete _pred;
    358         _local_pred=false;
     363        delete _pred;
     364        _local_pred=false;
    359365      }
    360366      _pred = &map;
     
    373379    BellmanFord &distMap(DistMap &map) {
    374380      if(_local_dist) {
    375         delete _dist;
    376         _local_dist=false;
     381        delete _dist;
     382        _local_dist=false;
    377383      }
    378384      _dist = &map;
     
    392398
    393399    /// \brief Initializes the internal data structures.
    394     /// 
     400    ///
    395401    /// Initializes the internal data structures. The optional parameter
    396402    /// is the initial distance of each node.
     
    398404      create_maps();
    399405      for (NodeIt it(*_gr); it != INVALID; ++it) {
    400         _pred->set(it, INVALID);
    401         _dist->set(it, value);
     406        _pred->set(it, INVALID);
     407        _dist->set(it, value);
    402408      }
    403409      _process.clear();
    404410      if (OperationTraits::less(value, OperationTraits::infinity())) {
    405         for (NodeIt it(*_gr); it != INVALID; ++it) {
    406           _process.push_back(it);
    407           _mask->set(it, true);
    408         }
     411        for (NodeIt it(*_gr); it != INVALID; ++it) {
     412          _process.push_back(it);
     413          _mask->set(it, true);
     414        }
    409415      } else {
    410         for (NodeIt it(*_gr); it != INVALID; ++it) {
    411           _mask->set(it, false);
    412         }
    413       }
    414     }
    415    
     416        for (NodeIt it(*_gr); it != INVALID; ++it) {
     417          _mask->set(it, false);
     418        }
     419      }
     420    }
     421
    416422    /// \brief Adds a new source node.
    417423    ///
     
    421427      _dist->set(source, dst);
    422428      if (!(*_mask)[source]) {
    423         _process.push_back(source);
    424         _mask->set(source, true);
     429        _process.push_back(source);
     430        _mask->set(source, true);
    425431      }
    426432    }
     
    447453    bool processNextRound() {
    448454      for (int i = 0; i < int(_process.size()); ++i) {
    449         _mask->set(_process[i], false);
     455        _mask->set(_process[i], false);
    450456      }
    451457      std::vector<Node> nextProcess;
    452458      std::vector<Value> values(_process.size());
    453459      for (int i = 0; i < int(_process.size()); ++i) {
    454         values[i] = (*_dist)[_process[i]];
     460        values[i] = (*_dist)[_process[i]];
    455461      }
    456462      for (int i = 0; i < int(_process.size()); ++i) {
    457         for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
    458           Node target = _gr->target(it);
    459           Value relaxed = OperationTraits::plus(values[i], (*_length)[it]);
    460           if (OperationTraits::less(relaxed, (*_dist)[target])) {
    461             _pred->set(target, it);
    462             _dist->set(target, relaxed);
    463             if (!(*_mask)[target]) {
    464               _mask->set(target, true);
    465               nextProcess.push_back(target);
    466             }
    467           }       
    468         }
     463        for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
     464          Node target = _gr->target(it);
     465          Value relaxed = OperationTraits::plus(values[i], (*_length)[it]);
     466          if (OperationTraits::less(relaxed, (*_dist)[target])) {
     467            _pred->set(target, it);
     468            _dist->set(target, relaxed);
     469            if (!(*_mask)[target]) {
     470              _mask->set(target, true);
     471              nextProcess.push_back(target);
     472            }
     473          }
     474        }
    469475      }
    470476      _process.swap(nextProcess);
     
    488494    bool processNextWeakRound() {
    489495      for (int i = 0; i < int(_process.size()); ++i) {
    490         _mask->set(_process[i], false);
     496        _mask->set(_process[i], false);
    491497      }
    492498      std::vector<Node> nextProcess;
    493499      for (int i = 0; i < int(_process.size()); ++i) {
    494         for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
    495           Node target = _gr->target(it);
    496           Value relaxed =
    497             OperationTraits::plus((*_dist)[_process[i]], (*_length)[it]);
    498           if (OperationTraits::less(relaxed, (*_dist)[target])) {
    499             _pred->set(target, it);
    500             _dist->set(target, relaxed);
    501             if (!(*_mask)[target]) {
    502               _mask->set(target, true);
    503               nextProcess.push_back(target);
    504             }
    505           }       
    506         }
     500        for (OutArcIt it(*_gr, _process[i]); it != INVALID; ++it) {
     501          Node target = _gr->target(it);
     502          Value relaxed =
     503            OperationTraits::plus((*_dist)[_process[i]], (*_length)[it]);
     504          if (OperationTraits::less(relaxed, (*_dist)[target])) {
     505            _pred->set(target, it);
     506            _dist->set(target, relaxed);
     507            if (!(*_mask)[target]) {
     508              _mask->set(target, true);
     509              nextProcess.push_back(target);
     510            }
     511          }
     512        }
    507513      }
    508514      _process.swap(nextProcess);
     
    526532      int num = countNodes(*_gr) - 1;
    527533      for (int i = 0; i < num; ++i) {
    528         if (processNextWeakRound()) break;
     534        if (processNextWeakRound()) break;
    529535      }
    530536    }
     
    538544    /// if the digraph contains cycles with negative total length.
    539545    ///
    540     /// The algorithm computes 
     546    /// The algorithm computes
    541547    /// - the shortest path tree (forest),
    542548    /// - the distance of each node from the root(s).
    543     /// 
     549    ///
    544550    /// \return \c false if there is a negative cycle in the digraph.
    545551    ///
    546552    /// \pre init() must be called and at least one root node should be
    547     /// added with addSource() before using this function. 
     553    /// added with addSource() before using this function.
    548554    bool checkedStart() {
    549555      int num = countNodes(*_gr);
    550556      for (int i = 0; i < num; ++i) {
    551         if (processNextWeakRound()) return true;
     557        if (processNextWeakRound()) return true;
    552558      }
    553559      return _process.empty();
     
    573579    ///
    574580    /// \pre init() must be called and at least one root node should be
    575     /// added with addSource() before using this function. 
     581    /// added with addSource() before using this function.
    576582    void limitedStart(int num) {
    577583      for (int i = 0; i < num; ++i) {
    578         if (processNextRound()) break;
    579       }
    580     }
    581    
     584        if (processNextRound()) break;
     585      }
     586    }
     587
    582588    /// \brief Runs the algorithm from the given root node.
    583     ///   
     589    ///
    584590    /// This method runs the Bellman-Ford algorithm from the given root
    585591    /// node \c s in order to compute the shortest path to each node.
     
    600606      start();
    601607    }
    602    
     608
    603609    /// \brief Runs the algorithm from the given root node with arc
    604610    /// number limit.
    605     ///   
     611    ///
    606612    /// This method runs the Bellman-Ford algorithm from the given root
    607613    /// node \c s in order to compute the shortest path distance for each
     
    629635      limitedStart(num);
    630636    }
    631    
     637
    632638    ///@}
    633639
     
    644650      ///
    645651      /// Constructor for getting the active nodes of the given BellmanFord
    646       /// instance. 
     652      /// instance.
    647653      ActiveIt(const BellmanFord& algorithm) : _algorithm(&algorithm)
    648654      {
     
    658664      ///
    659665      /// Conversion to \c Node.
    660       operator Node() const { 
     666      operator Node() const {
    661667        return _index >= 0 ? _algorithm->_process[_index] : INVALID;
    662668      }
     
    667673      ActiveIt& operator++() {
    668674        --_index;
    669         return *this; 
    670       }
    671 
    672       bool operator==(const ActiveIt& it) const { 
    673         return static_cast<Node>(*this) == static_cast<Node>(it); 
    674       }
    675       bool operator!=(const ActiveIt& it) const { 
    676         return static_cast<Node>(*this) != static_cast<Node>(it); 
    677       }
    678       bool operator<(const ActiveIt& it) const { 
    679         return static_cast<Node>(*this) < static_cast<Node>(it); 
    680       }
    681      
     675        return *this;
     676      }
     677
     678      bool operator==(const ActiveIt& it) const {
     679        return static_cast<Node>(*this) == static_cast<Node>(it);
     680      }
     681      bool operator!=(const ActiveIt& it) const {
     682        return static_cast<Node>(*this) != static_cast<Node>(it);
     683      }
     684      bool operator<(const ActiveIt& it) const {
     685        return static_cast<Node>(*this) < static_cast<Node>(it);
     686      }
     687
    682688    private:
    683689      const BellmanFord* _algorithm;
    684690      int _index;
    685691    };
    686    
     692
    687693    /// \name Query Functions
    688694    /// The result of the Bellman-Ford algorithm can be obtained using these
    689695    /// functions.\n
    690696    /// Either \ref run() or \ref init() should be called before using them.
    691    
     697
    692698    ///@{
    693699
    694700    /// \brief The shortest path to the given node.
    695     ///   
     701    ///
    696702    /// Gives back the shortest path to the given node from the root(s).
    697703    ///
     
    704710      return Path(*_gr, *_pred, t);
    705711    }
    706          
     712
    707713    /// \brief The distance of the given node from the root(s).
    708714    ///
     
    744750    /// \pre Either \ref run() or \ref init() must be called before
    745751    /// using this function.
    746     Node predNode(Node v) const { 
    747       return (*_pred)[v] == INVALID ? INVALID : _gr->source((*_pred)[v]); 
    748     }
    749    
     752    Node predNode(Node v) const {
     753      return (*_pred)[v] == INVALID ? INVALID : _gr->source((*_pred)[v]);
     754    }
     755
    750756    /// \brief Returns a const reference to the node map that stores the
    751757    /// distances of the nodes.
     
    757763    /// using this function.
    758764    const DistMap &distMap() const { return *_dist;}
    759  
     765
    760766    /// \brief Returns a const reference to the node map that stores the
    761767    /// predecessor arcs.
     
    767773    /// using this function.
    768774    const PredMap &predMap() const { return *_pred; }
    769  
     775
    770776    /// \brief Checks if a node is reached from the root(s).
    771777    ///
     
    779785
    780786    /// \brief Gives back a negative cycle.
    781     ///   
     787    ///
    782788    /// This function gives back a directed cycle with negative total
    783789    /// length if the algorithm has already found one.
     
    806812      return cycle;
    807813    }
    808    
     814
    809815    ///@}
    810816  };
    811  
     817
    812818  /// \brief Default traits class of bellmanFord() function.
    813819  ///
     
    817823  template <typename GR, typename LEN>
    818824  struct BellmanFordWizardDefaultTraits {
    819     /// The type of the digraph the algorithm runs on. 
     825    /// The type of the digraph the algorithm runs on.
    820826    typedef GR Digraph;
    821827
     
    838844    /// \brief The type of the map that stores the last
    839845    /// arcs of the shortest paths.
    840     /// 
     846    ///
    841847    /// The type of the map that stores the last arcs of the shortest paths.
    842848    /// It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     
    844850
    845851    /// \brief Instantiates a \c PredMap.
    846     /// 
     852    ///
    847853    /// This function instantiates a \ref PredMap.
    848854    /// \param g is the digraph to which we would like to define the
     
    860866    /// \brief Instantiates a \c DistMap.
    861867    ///
    862     /// This function instantiates a \ref DistMap. 
     868    /// This function instantiates a \ref DistMap.
    863869    /// \param g is the digraph to which we would like to define the
    864870    /// \ref DistMap.
     
    873879    typedef lemon::Path<Digraph> Path;
    874880  };
    875  
     881
    876882  /// \brief Default traits class used by BellmanFordWizard.
    877883  ///
     
    880886  /// \tparam LEN The type of the length map.
    881887  template <typename GR, typename LEN>
    882   class BellmanFordWizardBase 
     888  class BellmanFordWizardBase
    883889    : public BellmanFordWizardDefaultTraits<GR, LEN> {
    884890
     
    903909    public:
    904910    /// Constructor.
    905    
     911
    906912    /// This constructor does not require parameters, it initiates
    907913    /// all of the attributes to default values \c 0.
     
    910916
    911917    /// Constructor.
    912    
     918
    913919    /// This constructor requires two parameters,
    914920    /// others are initiated to \c 0.
    915921    /// \param gr The digraph the algorithm runs on.
    916922    /// \param len The length map.
    917     BellmanFordWizardBase(const GR& gr, 
    918                           const LEN& len) :
    919       _graph(reinterpret_cast<void*>(const_cast<GR*>(&gr))), 
    920       _length(reinterpret_cast<void*>(const_cast<LEN*>(&len))), 
     923    BellmanFordWizardBase(const GR& gr,
     924                          const LEN& len) :
     925      _graph(reinterpret_cast<void*>(const_cast<GR*>(&gr))),
     926      _length(reinterpret_cast<void*>(const_cast<LEN*>(&len))),
    921927      _pred(0), _dist(0), _path(0), _di(0) {}
    922928
    923929  };
    924  
     930
    925931  /// \brief Auxiliary class for the function-type interface of the
    926932  /// \ref BellmanFord "Bellman-Ford" algorithm.
     
    934940  /// This class should only be used through the \ref bellmanFord()
    935941  /// function, which makes it easier to use the algorithm.
     942  ///
     943  /// \tparam TR The traits class that defines various types used by the
     944  /// algorithm.
    936945  template<class TR>
    937946  class BellmanFordWizard : public TR {
     
    944953    typedef typename Digraph::Arc Arc;
    945954    typedef typename Digraph::OutArcIt ArcIt;
    946    
     955
    947956    typedef typename TR::LengthMap LengthMap;
    948957    typedef typename LengthMap::Value Value;
     
    961970    /// \param gr The digraph the algorithm runs on.
    962971    /// \param len The length map.
    963     BellmanFordWizard(const Digraph& gr, const LengthMap& len) 
     972    BellmanFordWizard(const Digraph& gr, const LengthMap& len)
    964973      : TR(gr, len) {}
    965974
     
    970979
    971980    /// \brief Runs the Bellman-Ford algorithm from the given source node.
    972     ///   
     981    ///
    973982    /// This method runs the Bellman-Ford algorithm from the given source
    974983    /// node in order to compute the shortest path to each node.
    975984    void run(Node s) {
    976       BellmanFord<Digraph,LengthMap,TR> 
    977         bf(*reinterpret_cast<const Digraph*>(Base::_graph),
     985      BellmanFord<Digraph,LengthMap,TR>
     986        bf(*reinterpret_cast<const Digraph*>(Base::_graph),
    978987           *reinterpret_cast<const LengthMap*>(Base::_length));
    979988      if (Base::_pred) bf.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
     
    10101019      SetPredMapBase(const TR &b) : TR(b) {}
    10111020    };
    1012    
     1021
    10131022    /// \brief \ref named-templ-param "Named parameter" for setting
    10141023    /// the predecessor map.
     
    10211030      return BellmanFordWizard<SetPredMapBase<T> >(*this);
    10221031    }
    1023    
     1032
    10241033    template<class T>
    10251034    struct SetDistMapBase : public Base {
     
    10281037      SetDistMapBase(const TR &b) : TR(b) {}
    10291038    };
    1030    
     1039
    10311040    /// \brief \ref named-templ-param "Named parameter" for setting
    10321041    /// the distance map.
     
    10691078      return *this;
    10701079    }
    1071    
     1080
    10721081  };
    1073  
     1082
    10741083  /// \brief Function type interface for the \ref BellmanFord "Bellman-Ford"
    10751084  /// algorithm.
     
    10791088  /// algorithm.
    10801089  ///
    1081   /// This function also has several \ref named-templ-func-param 
    1082   /// "named parameters", they are declared as the members of class 
     1090  /// This function also has several \ref named-templ-func-param
     1091  /// "named parameters", they are declared as the members of class
    10831092  /// \ref BellmanFordWizard.
    10841093  /// The following examples show how to use these parameters.
     
    10971106  BellmanFordWizard<BellmanFordWizardBase<GR,LEN> >
    10981107  bellmanFord(const GR& digraph,
    1099               const LEN& length)
     1108              const LEN& length)
    11001109  {
    11011110    return BellmanFordWizard<BellmanFordWizardBase<GR,LEN> >(digraph, length);
  • lemon/bfs.h

    r835 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    8383
    8484    ///The type of the map that indicates which nodes are reached.
    85     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     85    ///It must conform to
     86    ///the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    8687    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    8788    ///Instantiates a \c ReachedMap.
     
    122123  ///\tparam GR The type of the digraph the algorithm runs on.
    123124  ///The default type is \ref ListDigraph.
     125  ///\tparam TR The traits class that defines various types used by the
     126  ///algorithm. By default, it is \ref BfsDefaultTraits
     127  ///"BfsDefaultTraits<GR>".
     128  ///In most cases, this parameter should not be set directly,
     129  ///consider to use the named template parameters instead.
    124130#ifdef DOXYGEN
    125131  template <typename GR,
     
    147153    typedef PredMapPath<Digraph, PredMap> Path;
    148154
    149     ///The \ref BfsDefaultTraits "traits class" of the algorithm.
     155    ///The \ref lemon::BfsDefaultTraits "traits class" of the algorithm.
    150156    typedef TR Traits;
    151157
     
    267273    ///\ref named-templ-param "Named parameter" for setting
    268274    ///\c ReachedMap type.
    269     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     275    ///It must conform to
     276    ///the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    270277    template <class T>
    271278    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
     
    868875
    869876    ///The type of the map that indicates which nodes are reached.
    870     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     877    ///It must conform to
     878    ///the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    871879    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    872880    ///Instantiates a ReachedMap.
     
    958966  /// This class should only be used through the \ref bfs() function,
    959967  /// which makes it easier to use the algorithm.
     968  ///
     969  /// \tparam TR The traits class that defines various types used by the
     970  /// algorithm.
    960971  template<class TR>
    961972  class BfsWizard : public TR
     
    12411252      }
    12421253      _Visitor& visitor;
     1254      Constraints() {}
    12431255    };
    12441256  };
     
    12581270    ///
    12591271    /// The type of the map that indicates which nodes are reached.
    1260     /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1272    /// It must conform to
     1273    ///the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    12611274    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    12621275
     
    12961309  /// does not observe the BFS events. If you want to observe the BFS
    12971310  /// events, you should implement your own visitor class.
    1298   /// \tparam TR Traits class to set various data types used by the
    1299   /// algorithm. The default traits class is
    1300   /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<GR>".
    1301   /// See \ref BfsVisitDefaultTraits for the documentation of
    1302   /// a BFS visit traits class.
     1311  /// \tparam TR The traits class that defines various types used by the
     1312  /// algorithm. By default, it is \ref BfsVisitDefaultTraits
     1313  /// "BfsVisitDefaultTraits<GR>".
     1314  /// In most cases, this parameter should not be set directly,
     1315  /// consider to use the named template parameters instead.
    13031316#ifdef DOXYGEN
    13041317  template <typename GR, typename VS, typename TR>
  • lemon/bin_heap.h

    r758 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/bits/alteration_notifier.h

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    2424
    2525#include <lemon/core.h>
     26#include <lemon/bits/lock.h>
    2627
    2728//\ingroup graphbits
     
    252253    typedef std::list<ObserverBase*> Observers;
    253254    Observers _observers;
    254 
     255    lemon::bits::Lock _lock;
    255256
    256257  public:
     
    333334
    334335    void attach(ObserverBase& observer) {
     336      _lock.lock();
    335337      observer._index = _observers.insert(_observers.begin(), &observer);
    336338      observer._notifier = this;
     339      _lock.unlock();
    337340    }
    338341
    339342    void detach(ObserverBase& observer) {
     343      _lock.lock();
    340344      _observers.erase(observer._index);
    341345      observer._index = _observers.end();
    342346      observer._notifier = 0;
     347      _lock.unlock();
    343348    }
    344349
  • lemon/bits/array_map.h

    r664 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    7171
    7272  private:
    73  
     73
    7474    // The MapBase of the Map which imlements the core regisitry function.
    7575    typedef typename Notifier::ObserverBase Parent;
  • lemon/bits/bezier.h

    r463 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    160160    const Point d=(a+b)/2;
    161161    const Point e=(b+c)/2;
    162     const Point f=(d+e)/2;
     162    // const Point f=(d+e)/2;
    163163    R f1=_f(Bezier3(p1,a,d,e),_d);
    164164    R f2=_f(Bezier3(e,d,c,p4),_d);
  • lemon/bits/default_map.h

    r674 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    158158  public:
    159159    typedef DefaultMap<_Graph, _Item, _Value> Map;
    160    
     160
    161161    typedef typename Parent::GraphType GraphType;
    162162    typedef typename Parent::Value Value;
  • lemon/bits/edge_set_extender.h

    r732 r1270  
    1 /* -*- C++ -*-
     1/* -*- mode: C++; indent-tabs-mode: nil; -*-
    22 *
    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.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    6464    Node oppositeNode(const Node &n, const Arc &e) const {
    6565      if (n == Parent::source(e))
    66         return Parent::target(e);
     66        return Parent::target(e);
    6767      else if(n==Parent::target(e))
    68         return Parent::source(e);
     68        return Parent::source(e);
    6969      else
    70         return INVALID;
     70        return INVALID;
    7171    }
    7272
     
    9292    // Iterable extensions
    9393
    94     class NodeIt : public Node { 
     94    class NodeIt : public Node {
    9595      const Digraph* digraph;
    9696    public:
     
    101101
    102102      explicit NodeIt(const Digraph& _graph) : digraph(&_graph) {
    103         _graph.first(static_cast<Node&>(*this));
    104       }
    105 
    106       NodeIt(const Digraph& _graph, const Node& node) 
    107         : Node(node), digraph(&_graph) {}
    108 
    109       NodeIt& operator++() { 
    110         digraph->next(*this);
    111         return *this;
    112       }
    113 
    114     };
    115 
    116 
    117     class ArcIt : public Arc { 
     103        _graph.first(static_cast<Node&>(*this));
     104      }
     105
     106      NodeIt(const Digraph& _graph, const Node& node)
     107        : Node(node), digraph(&_graph) {}
     108
     109      NodeIt& operator++() {
     110        digraph->next(*this);
     111        return *this;
     112      }
     113
     114    };
     115
     116
     117    class ArcIt : public Arc {
    118118      const Digraph* digraph;
    119119    public:
     
    124124
    125125      explicit ArcIt(const Digraph& _graph) : digraph(&_graph) {
    126         _graph.first(static_cast<Arc&>(*this));
    127       }
    128 
    129       ArcIt(const Digraph& _graph, const Arc& e) : 
    130         Arc(e), digraph(&_graph) { }
    131 
    132       ArcIt& operator++() { 
    133         digraph->next(*this);
    134         return *this;
    135       }
    136 
    137     };
    138 
    139 
    140     class OutArcIt : public Arc { 
     126        _graph.first(static_cast<Arc&>(*this));
     127      }
     128
     129      ArcIt(const Digraph& _graph, const Arc& e) :
     130        Arc(e), digraph(&_graph) { }
     131
     132      ArcIt& operator++() {
     133        digraph->next(*this);
     134        return *this;
     135      }
     136
     137    };
     138
     139
     140    class OutArcIt : public Arc {
    141141      const Digraph* digraph;
    142142    public:
     
    146146      OutArcIt(Invalid i) : Arc(i) { }
    147147
    148       OutArcIt(const Digraph& _graph, const Node& node) 
    149         : digraph(&_graph) {
    150         _graph.firstOut(*this, node);
    151       }
    152 
    153       OutArcIt(const Digraph& _graph, const Arc& arc) 
    154         : Arc(arc), digraph(&_graph) {}
    155 
    156       OutArcIt& operator++() { 
    157         digraph->nextOut(*this);
    158         return *this;
    159       }
    160 
    161     };
    162 
    163 
    164     class InArcIt : public Arc { 
     148      OutArcIt(const Digraph& _graph, const Node& node)
     149        : digraph(&_graph) {
     150        _graph.firstOut(*this, node);
     151      }
     152
     153      OutArcIt(const Digraph& _graph, const Arc& arc)
     154        : Arc(arc), digraph(&_graph) {}
     155
     156      OutArcIt& operator++() {
     157        digraph->nextOut(*this);
     158        return *this;
     159      }
     160
     161    };
     162
     163
     164    class InArcIt : public Arc {
    165165      const Digraph* digraph;
    166166    public:
     
    170170      InArcIt(Invalid i) : Arc(i) { }
    171171
    172       InArcIt(const Digraph& _graph, const Node& node) 
    173         : digraph(&_graph) {
    174         _graph.firstIn(*this, node);
    175       }
    176 
    177       InArcIt(const Digraph& _graph, const Arc& arc) : 
    178         Arc(arc), digraph(&_graph) {}
    179 
    180       InArcIt& operator++() { 
    181         digraph->nextIn(*this);
    182         return *this;
     172      InArcIt(const Digraph& _graph, const Node& node)
     173        : digraph(&_graph) {
     174        _graph.firstIn(*this, node);
     175      }
     176
     177      InArcIt(const Digraph& _graph, const Arc& arc) :
     178        Arc(arc), digraph(&_graph) {}
     179
     180      InArcIt& operator++() {
     181        digraph->nextIn(*this);
     182        return *this;
    183183      }
    184184
     
    216216
    217217    // Mappable extension
    218    
     218
    219219    template <typename _Value>
    220     class ArcMap 
     220    class ArcMap
    221221      : public MapExtender<DefaultMap<Digraph, Arc, _Value> > {
    222222      typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent;
    223223
    224224    public:
    225       explicit ArcMap(const Digraph& _g) 
    226         : Parent(_g) {}
    227       ArcMap(const Digraph& _g, const _Value& _v) 
    228         : Parent(_g, _v) {}
     225      explicit ArcMap(const Digraph& _g)
     226        : Parent(_g) {}
     227      ArcMap(const Digraph& _g, const _Value& _v)
     228        : Parent(_g, _v) {}
    229229
    230230      ArcMap& operator=(const ArcMap& cmap) {
    231         return operator=<ArcMap>(cmap);
     231        return operator=<ArcMap>(cmap);
    232232      }
    233233
     
    235235      ArcMap& operator=(const CMap& cmap) {
    236236        Parent::operator=(cmap);
    237         return *this;
     237        return *this;
    238238      }
    239239
     
    248248      return arc;
    249249    }
    250    
     250
    251251    void clear() {
    252252      notifier(Arc()).clear();
     
    281281    typedef EdgeSetExtender Graph;
    282282
     283    typedef True UndirectedTag;
     284
    283285    typedef typename Parent::Node Node;
    284286    typedef typename Parent::Arc Arc;
     
    311313    Node oppositeNode(const Node &n, const Edge &e) const {
    312314      if( n == Parent::u(e))
    313         return Parent::v(e);
     315        return Parent::v(e);
    314316      else if( n == Parent::v(e))
    315         return Parent::u(e);
     317        return Parent::u(e);
    316318      else
    317         return INVALID;
     319        return INVALID;
    318320    }
    319321
     
    339341
    340342    using Parent::notifier;
    341    
     343
    342344    ArcNotifier& notifier(Arc) const {
    343345      return arc_notifier;
     
    349351
    350352
    351     class NodeIt : public Node { 
     353    class NodeIt : public Node {
    352354      const Graph* graph;
    353355    public:
     
    358360
    359361      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
    360         _graph.first(static_cast<Node&>(*this));
    361       }
    362 
    363       NodeIt(const Graph& _graph, const Node& node) 
    364         : Node(node), graph(&_graph) {}
    365 
    366       NodeIt& operator++() { 
    367         graph->next(*this);
    368         return *this;
    369       }
    370 
    371     };
    372 
    373 
    374     class ArcIt : public Arc { 
     362        _graph.first(static_cast<Node&>(*this));
     363      }
     364
     365      NodeIt(const Graph& _graph, const Node& node)
     366        : Node(node), graph(&_graph) {}
     367
     368      NodeIt& operator++() {
     369        graph->next(*this);
     370        return *this;
     371      }
     372
     373    };
     374
     375
     376    class ArcIt : public Arc {
    375377      const Graph* graph;
    376378    public:
     
    381383
    382384      explicit ArcIt(const Graph& _graph) : graph(&_graph) {
    383         _graph.first(static_cast<Arc&>(*this));
    384       }
    385 
    386       ArcIt(const Graph& _graph, const Arc& e) : 
    387         Arc(e), graph(&_graph) { }
    388 
    389       ArcIt& operator++() { 
    390         graph->next(*this);
    391         return *this;
    392       }
    393 
    394     };
    395 
    396 
    397     class OutArcIt : public Arc { 
     385        _graph.first(static_cast<Arc&>(*this));
     386      }
     387
     388      ArcIt(const Graph& _graph, const Arc& e) :
     389        Arc(e), graph(&_graph) { }
     390
     391      ArcIt& operator++() {
     392        graph->next(*this);
     393        return *this;
     394      }
     395
     396    };
     397
     398
     399    class OutArcIt : public Arc {
    398400      const Graph* graph;
    399401    public:
     
    403405      OutArcIt(Invalid i) : Arc(i) { }
    404406
    405       OutArcIt(const Graph& _graph, const Node& node) 
    406         : graph(&_graph) {
    407         _graph.firstOut(*this, node);
    408       }
    409 
    410       OutArcIt(const Graph& _graph, const Arc& arc) 
    411         : Arc(arc), graph(&_graph) {}
    412 
    413       OutArcIt& operator++() { 
    414         graph->nextOut(*this);
    415         return *this;
    416       }
    417 
    418     };
    419 
    420 
    421     class InArcIt : public Arc { 
     407      OutArcIt(const Graph& _graph, const Node& node)
     408        : graph(&_graph) {
     409        _graph.firstOut(*this, node);
     410      }
     411
     412      OutArcIt(const Graph& _graph, const Arc& arc)
     413        : Arc(arc), graph(&_graph) {}
     414
     415      OutArcIt& operator++() {
     416        graph->nextOut(*this);
     417        return *this;
     418      }
     419
     420    };
     421
     422
     423    class InArcIt : public Arc {
    422424      const Graph* graph;
    423425    public:
     
    427429      InArcIt(Invalid i) : Arc(i) { }
    428430
    429       InArcIt(const Graph& _graph, const Node& node) 
    430         : graph(&_graph) {
    431         _graph.firstIn(*this, node);
    432       }
    433 
    434       InArcIt(const Graph& _graph, const Arc& arc) : 
    435         Arc(arc), graph(&_graph) {}
    436 
    437       InArcIt& operator++() { 
    438         graph->nextIn(*this);
    439         return *this;
    440       }
    441 
    442     };
    443 
    444 
    445     class EdgeIt : public Parent::Edge { 
     431      InArcIt(const Graph& _graph, const Node& node)
     432        : graph(&_graph) {
     433        _graph.firstIn(*this, node);
     434      }
     435
     436      InArcIt(const Graph& _graph, const Arc& arc) :
     437        Arc(arc), graph(&_graph) {}
     438
     439      InArcIt& operator++() {
     440        graph->nextIn(*this);
     441        return *this;
     442      }
     443
     444    };
     445
     446
     447    class EdgeIt : public Parent::Edge {
    446448      const Graph* graph;
    447449    public:
     
    452454
    453455      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
    454         _graph.first(static_cast<Edge&>(*this));
    455       }
    456 
    457       EdgeIt(const Graph& _graph, const Edge& e) : 
    458         Edge(e), graph(&_graph) { }
    459 
    460       EdgeIt& operator++() { 
    461         graph->next(*this);
    462         return *this;
     456        _graph.first(static_cast<Edge&>(*this));
     457      }
     458
     459      EdgeIt(const Graph& _graph, const Edge& e) :
     460        Edge(e), graph(&_graph) { }
     461
     462      EdgeIt& operator++() {
     463        graph->next(*this);
     464        return *this;
    463465      }
    464466
     
    476478
    477479      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
    478         _graph.firstInc(*this, direction, n);
     480        _graph.firstInc(*this, direction, n);
    479481      }
    480482
    481483      IncEdgeIt(const Graph& _graph, const Edge &ue, const Node &n)
    482         : graph(&_graph), Edge(ue) {
    483         direction = (_graph.source(ue) == n);
     484        : graph(&_graph), Edge(ue) {
     485        direction = (_graph.source(ue) == n);
    484486      }
    485487
    486488      IncEdgeIt& operator++() {
    487         graph->nextInc(*this, direction);
    488         return *this;
     489        graph->nextInc(*this, direction);
     490        return *this;
    489491      }
    490492    };
     
    522524    // Returns the base node of the iterator
    523525    Node baseNode(const IncEdgeIt &e) const {
    524       return e.direction ? u(e) : v(e);
     526      return e.direction ? this->u(e) : this->v(e);
    525527    }
    526528    // Running node of the iterator
     
    528530    // Returns the running node of the iterator
    529531    Node runningNode(const IncEdgeIt &e) const {
    530       return e.direction ? v(e) : u(e);
     532      return e.direction ? this->v(e) : this->u(e);
    531533    }
    532534
    533535
    534536    template <typename _Value>
    535     class ArcMap 
     537    class ArcMap
    536538      : public MapExtender<DefaultMap<Graph, Arc, _Value> > {
    537539      typedef MapExtender<DefaultMap<Graph, Arc, _Value> > Parent;
    538540
    539541    public:
    540       explicit ArcMap(const Graph& _g) 
    541         : Parent(_g) {}
    542       ArcMap(const Graph& _g, const _Value& _v) 
    543         : Parent(_g, _v) {}
     542      explicit ArcMap(const Graph& _g)
     543        : Parent(_g) {}
     544      ArcMap(const Graph& _g, const _Value& _v)
     545        : Parent(_g, _v) {}
    544546
    545547      ArcMap& operator=(const ArcMap& cmap) {
    546         return operator=<ArcMap>(cmap);
     548        return operator=<ArcMap>(cmap);
    547549      }
    548550
     
    550552      ArcMap& operator=(const CMap& cmap) {
    551553        Parent::operator=(cmap);
    552         return *this;
     554        return *this;
    553555      }
    554556
     
    557559
    558560    template <typename _Value>
    559     class EdgeMap 
     561    class EdgeMap
    560562      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
    561563      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
    562564
    563565    public:
    564       explicit EdgeMap(const Graph& _g) 
    565         : Parent(_g) {}
    566 
    567       EdgeMap(const Graph& _g, const _Value& _v) 
    568         : Parent(_g, _v) {}
     566      explicit EdgeMap(const Graph& _g)
     567        : Parent(_g) {}
     568
     569      EdgeMap(const Graph& _g, const _Value& _v)
     570        : Parent(_g, _v) {}
    569571
    570572      EdgeMap& operator=(const EdgeMap& cmap) {
    571         return operator=<EdgeMap>(cmap);
     573        return operator=<EdgeMap>(cmap);
    572574      }
    573575
     
    575577      EdgeMap& operator=(const CMap& cmap) {
    576578        Parent::operator=(cmap);
    577         return *this;
     579        return *this;
    578580      }
    579581
     
    592594      return edge;
    593595    }
    594    
     596
    595597    void clear() {
    596598      notifier(Arc()).clear();
     
    618620      arc_notifier.clear();
    619621    }
    620    
     622
    621623  };
    622624
  • lemon/bits/graph_adaptor_extender.h

    r664 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    182182    typedef GraphAdaptorExtender Adaptor;
    183183
     184    typedef True UndirectedTag;
     185
    184186    typedef typename Parent::Node Node;
    185187    typedef typename Parent::Arc Arc;
  • lemon/bits/graph_extender.h

    r825 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    588588    // Returns the base node of the iterator
    589589    Node baseNode(const IncEdgeIt &edge) const {
    590       return edge._direction ? u(edge) : v(edge);
     590      return edge._direction ? this->u(edge) : this->v(edge);
    591591    }
    592592    // Running node of the iterator
     
    594594    // Returns the running node of the iterator
    595595    Node runningNode(const IncEdgeIt &edge) const {
    596       return edge._direction ? v(edge) : u(edge);
     596      return edge._direction ? this->v(edge) : this->u(edge);
    597597    }
    598598
     
    747747  };
    748748
     749  // \ingroup _graphbits
     750  //
     751  // \brief Extender for the BpGraphs
     752  template <typename Base>
     753  class BpGraphExtender : public Base {
     754    typedef Base Parent;
     755
     756  public:
     757
     758    typedef BpGraphExtender BpGraph;
     759
     760    typedef True UndirectedTag;
     761
     762    typedef typename Parent::Node Node;
     763    typedef typename Parent::RedNode RedNode;
     764    typedef typename Parent::BlueNode BlueNode;
     765    typedef typename Parent::Arc Arc;
     766    typedef typename Parent::Edge Edge;
     767
     768    // BpGraph extension
     769
     770    using Parent::first;
     771    using Parent::next;
     772    using Parent::id;
     773
     774    int maxId(Node) const {
     775      return Parent::maxNodeId();
     776    }
     777
     778    int maxId(RedNode) const {
     779      return Parent::maxRedId();
     780    }
     781
     782    int maxId(BlueNode) const {
     783      return Parent::maxBlueId();
     784    }
     785
     786    int maxId(Arc) const {
     787      return Parent::maxArcId();
     788    }
     789
     790    int maxId(Edge) const {
     791      return Parent::maxEdgeId();
     792    }
     793
     794    static Node fromId(int id, Node) {
     795      return Parent::nodeFromId(id);
     796    }
     797
     798    static Arc fromId(int id, Arc) {
     799      return Parent::arcFromId(id);
     800    }
     801
     802    static Edge fromId(int id, Edge) {
     803      return Parent::edgeFromId(id);
     804    }
     805
     806    Node u(Edge e) const { return this->redNode(e); }
     807    Node v(Edge e) const { return this->blueNode(e); }
     808
     809    Node oppositeNode(const Node &n, const Edge &e) const {
     810      if( n == u(e))
     811        return v(e);
     812      else if( n == v(e))
     813        return u(e);
     814      else
     815        return INVALID;
     816    }
     817
     818    Arc oppositeArc(const Arc &arc) const {
     819      return Parent::direct(arc, !Parent::direction(arc));
     820    }
     821
     822    using Parent::direct;
     823    Arc direct(const Edge &edge, const Node &node) const {
     824      return Parent::direct(edge, Parent::redNode(edge) == node);
     825    }
     826
     827    RedNode asRedNode(const Node& node) const {
     828      if (node == INVALID || Parent::blue(node)) {
     829        return INVALID;
     830      } else {
     831        return Parent::asRedNodeUnsafe(node);
     832      }
     833    }
     834
     835    BlueNode asBlueNode(const Node& node) const {
     836      if (node == INVALID || Parent::red(node)) {
     837        return INVALID;
     838      } else {
     839        return Parent::asBlueNodeUnsafe(node);
     840      }
     841    }
     842
     843    // Alterable extension
     844
     845    typedef AlterationNotifier<BpGraphExtender, Node> NodeNotifier;
     846    typedef AlterationNotifier<BpGraphExtender, RedNode> RedNodeNotifier;
     847    typedef AlterationNotifier<BpGraphExtender, BlueNode> BlueNodeNotifier;
     848    typedef AlterationNotifier<BpGraphExtender, Arc> ArcNotifier;
     849    typedef AlterationNotifier<BpGraphExtender, Edge> EdgeNotifier;
     850
     851
     852  protected:
     853
     854    mutable NodeNotifier node_notifier;
     855    mutable RedNodeNotifier red_node_notifier;
     856    mutable BlueNodeNotifier blue_node_notifier;
     857    mutable ArcNotifier arc_notifier;
     858    mutable EdgeNotifier edge_notifier;
     859
     860  public:
     861
     862    NodeNotifier& notifier(Node) const {
     863      return node_notifier;
     864    }
     865
     866    RedNodeNotifier& notifier(RedNode) const {
     867      return red_node_notifier;
     868    }
     869
     870    BlueNodeNotifier& notifier(BlueNode) const {
     871      return blue_node_notifier;
     872    }
     873
     874    ArcNotifier& notifier(Arc) const {
     875      return arc_notifier;
     876    }
     877
     878    EdgeNotifier& notifier(Edge) const {
     879      return edge_notifier;
     880    }
     881
     882
     883
     884    class NodeIt : public Node {
     885      const BpGraph* _graph;
     886    public:
     887
     888      NodeIt() {}
     889
     890      NodeIt(Invalid i) : Node(i) { }
     891
     892      explicit NodeIt(const BpGraph& graph) : _graph(&graph) {
     893        _graph->first(static_cast<Node&>(*this));
     894      }
     895
     896      NodeIt(const BpGraph& graph, const Node& node)
     897        : Node(node), _graph(&graph) {}
     898
     899      NodeIt& operator++() {
     900        _graph->next(*this);
     901        return *this;
     902      }
     903
     904    };
     905
     906    class RedNodeIt : public RedNode {
     907      const BpGraph* _graph;
     908    public:
     909
     910      RedNodeIt() {}
     911
     912      RedNodeIt(Invalid i) : RedNode(i) { }
     913
     914      explicit RedNodeIt(const BpGraph& graph) : _graph(&graph) {
     915        _graph->first(static_cast<RedNode&>(*this));
     916      }
     917
     918      RedNodeIt(const BpGraph& graph, const RedNode& node)
     919        : RedNode(node), _graph(&graph) {}
     920
     921      RedNodeIt& operator++() {
     922        _graph->next(static_cast<RedNode&>(*this));
     923        return *this;
     924      }
     925
     926    };
     927
     928    class BlueNodeIt : public BlueNode {
     929      const BpGraph* _graph;
     930    public:
     931
     932      BlueNodeIt() {}
     933
     934      BlueNodeIt(Invalid i) : BlueNode(i) { }
     935
     936      explicit BlueNodeIt(const BpGraph& graph) : _graph(&graph) {
     937        _graph->first(static_cast<BlueNode&>(*this));
     938      }
     939
     940      BlueNodeIt(const BpGraph& graph, const BlueNode& node)
     941        : BlueNode(node), _graph(&graph) {}
     942
     943      BlueNodeIt& operator++() {
     944        _graph->next(static_cast<BlueNode&>(*this));
     945        return *this;
     946      }
     947
     948    };
     949
     950
     951    class ArcIt : public Arc {
     952      const BpGraph* _graph;
     953    public:
     954
     955      ArcIt() { }
     956
     957      ArcIt(Invalid i) : Arc(i) { }
     958
     959      explicit ArcIt(const BpGraph& graph) : _graph(&graph) {
     960        _graph->first(static_cast<Arc&>(*this));
     961      }
     962
     963      ArcIt(const BpGraph& graph, const Arc& arc) :
     964        Arc(arc), _graph(&graph) { }
     965
     966      ArcIt& operator++() {
     967        _graph->next(*this);
     968        return *this;
     969      }
     970
     971    };
     972
     973
     974    class OutArcIt : public Arc {
     975      const BpGraph* _graph;
     976    public:
     977
     978      OutArcIt() { }
     979
     980      OutArcIt(Invalid i) : Arc(i) { }
     981
     982      OutArcIt(const BpGraph& graph, const Node& node)
     983        : _graph(&graph) {
     984        _graph->firstOut(*this, node);
     985      }
     986
     987      OutArcIt(const BpGraph& graph, const Arc& arc)
     988        : Arc(arc), _graph(&graph) {}
     989
     990      OutArcIt& operator++() {
     991        _graph->nextOut(*this);
     992        return *this;
     993      }
     994
     995    };
     996
     997
     998    class InArcIt : public Arc {
     999      const BpGraph* _graph;
     1000    public:
     1001
     1002      InArcIt() { }
     1003
     1004      InArcIt(Invalid i) : Arc(i) { }
     1005
     1006      InArcIt(const BpGraph& graph, const Node& node)
     1007        : _graph(&graph) {
     1008        _graph->firstIn(*this, node);
     1009      }
     1010
     1011      InArcIt(const BpGraph& graph, const Arc& arc) :
     1012        Arc(arc), _graph(&graph) {}
     1013
     1014      InArcIt& operator++() {
     1015        _graph->nextIn(*this);
     1016        return *this;
     1017      }
     1018
     1019    };
     1020
     1021
     1022    class EdgeIt : public Parent::Edge {
     1023      const BpGraph* _graph;
     1024    public:
     1025
     1026      EdgeIt() { }
     1027
     1028      EdgeIt(Invalid i) : Edge(i) { }
     1029
     1030      explicit EdgeIt(const BpGraph& graph) : _graph(&graph) {
     1031        _graph->first(static_cast<Edge&>(*this));
     1032      }
     1033
     1034      EdgeIt(const BpGraph& graph, const Edge& edge) :
     1035        Edge(edge), _graph(&graph) { }
     1036
     1037