COIN-OR::LEMON - Graph Library

Changes in / [964:2b6bffe0e7e8:942:633956ca9421] in lemon-main


Ignore:
Files:
1 added
3 deleted
27 edited

Legend:

Unmodified
Added
Removed
  • AUTHORS

    r951 r320  
    2424
    2525Again, please visit the history of the old LEMON repository for more
    26 details: http://lemon.cs.elte.hu/hg/lemon-0.x
     26details: http://lemon.cs.elte.hu/svn/lemon/trunk
  • CMakeLists.txt

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

    r947 r634  
    66FIND_LIBRARY(COIN_CBC_LIBRARY
    77  NAMES Cbc libCbc
    8   HINTS ${COIN_ROOT_DIR}/lib/coin
    98  HINTS ${COIN_ROOT_DIR}/lib
    109)
    1110FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
    1211  NAMES CbcSolver libCbcSolver
    13   HINTS ${COIN_ROOT_DIR}/lib/coin
    1412  HINTS ${COIN_ROOT_DIR}/lib
    1513)
    1614FIND_LIBRARY(COIN_CGL_LIBRARY
    1715  NAMES Cgl libCgl
    18   HINTS ${COIN_ROOT_DIR}/lib/coin
    1916  HINTS ${COIN_ROOT_DIR}/lib
    2017)
    2118FIND_LIBRARY(COIN_CLP_LIBRARY
    2219  NAMES Clp libClp
    23   HINTS ${COIN_ROOT_DIR}/lib/coin
    2420  HINTS ${COIN_ROOT_DIR}/lib
    2521)
    2622FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
    2723  NAMES CoinUtils libCoinUtils
    28   HINTS ${COIN_ROOT_DIR}/lib/coin
    2924  HINTS ${COIN_ROOT_DIR}/lib
    3025)
    3126FIND_LIBRARY(COIN_OSI_LIBRARY
    3227  NAMES Osi libOsi
    33   HINTS ${COIN_ROOT_DIR}/lib/coin
    3428  HINTS ${COIN_ROOT_DIR}/lib
    3529)
    3630FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
    3731  NAMES OsiCbc libOsiCbc
    38   HINTS ${COIN_ROOT_DIR}/lib/coin
    3932  HINTS ${COIN_ROOT_DIR}/lib
    4033)
    4134FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
    4235  NAMES OsiClp libOsiClp
    43   HINTS ${COIN_ROOT_DIR}/lib/coin
    4436  HINTS ${COIN_ROOT_DIR}/lib
    4537)
    4638FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
    4739  NAMES OsiVol libOsiVol
    48   HINTS ${COIN_ROOT_DIR}/lib/coin
    4940  HINTS ${COIN_ROOT_DIR}/lib
    5041)
    5142FIND_LIBRARY(COIN_VOL_LIBRARY
    5243  NAMES Vol libVol
    53   HINTS ${COIN_ROOT_DIR}/lib/coin
    5444  HINTS ${COIN_ROOT_DIR}/lib
    5545)
     
    6656  COIN_OSI_CBC_LIBRARY
    6757  COIN_OSI_CLP_LIBRARY
    68   # COIN_OSI_VOL_LIBRARY
    69   # COIN_VOL_LIBRARY
     58  COIN_OSI_VOL_LIBRARY
     59  COIN_VOL_LIBRARY
    7060)
    7161
    7262IF(COIN_FOUND)
    7363  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    74   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}")
     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}")
    7565  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    7666  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
  • configure.ac

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

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

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

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

    r950 r440  
    6464\endcode
    6565
    66 The \c \@arcs section is very similar to the \c \@nodes section, it
    67 again starts with a header line describing the names of the maps, but
    68 the \c "label" map is not obligatory here. The following lines
    69 describe the arcs. The first two tokens of each line are the source
    70 and the target node of the arc, respectively, then come the map
     66The \c \@arcs section is very similar to the \c \@nodes section,
     67it again starts with a header line describing the names of the maps,
     68but the \c "label" map is not obligatory here. The following lines
     69describe the arcs. The first two tokens of each line are
     70the source and the target node of the arc, respectively, then come the map
    7171values. The source and target tokens must be node labels.
    7272
     
    7979\endcode
    8080
    81 If there is no map in the \c \@arcs section at all, then it must be
    82 indicated by a sole '-' sign in the first line.
    83 
    84 \code
    85  @arcs
    86          -
    87  1   2
    88  1   3
    89  2   3
    90 \endcode
    91 
    9281The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can
    9382also store the edge set of an undirected graph. In such case there is
    9483a conventional method for store arc maps in the file, if two columns
    95 have the same caption with \c '+' and \c '-' prefix, then these columns
     84has the same caption with \c '+' and \c '-' prefix, then these columns
    9685can be regarded as the values of an arc map.
    9786
  • lemon/CMakeLists.txt

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

    r964 r874  
    11EXTRA_DIST += \
    22        lemon/lemon.pc.in \
    3         lemon/lemon.pc.cmake \
    43        lemon/CMakeLists.txt \
    54        lemon/config.h.cmake
  • lemon/bits/edge_set_extender.h

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

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

    r887 r529  
    5050
    5151    bool empty() const {
    52       return predMap[target] == INVALID;
     52      return predMap[target] != INVALID;
    5353    }
    5454
     
    124124
    125125    bool empty() const {
    126       return predMatrixMap(source, target) == INVALID;
     126      return source != target;
    127127    }
    128128
  • lemon/bits/windows.cc

    r941 r877  
    4141#include <unistd.h>
    4242#include <ctime>
    43 #ifndef WIN32
    4443#include <sys/times.h>
    45 #endif
    4644#include <sys/time.h>
    4745#endif
  • lemon/core.h

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

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

    r964 r877  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    965965        int index = 0;
    966966        while (_reader_bits::readToken(line, map)) {
    967           if(map == "-") {
    968               if(index!=0)
    969                 throw FormatError("'-' is not allowed as a map name");
    970               else if (line >> std::ws >> c)
    971                 throw FormatError("Extra character at the end of line");
    972               else break;
    973             }
    974967          if (maps.find(map) != maps.end()) {
    975968            std::ostringstream msg;
     
    18421835        int index = 0;
    18431836        while (_reader_bits::readToken(line, map)) {
    1844           if(map == "-") {
    1845               if(index!=0)
    1846                 throw FormatError("'-' is not allowed as a map name");
    1847               else if (line >> std::ws >> c)
    1848                 throw FormatError("Extra character at the end of line");
    1849               else break;
    1850             }
    18511837          if (maps.find(map) != maps.end()) {
    18521838            std::ostringstream msg;
  • lemon/lp_base.h

    r958 r877  
    16191619  inline LpBase::Constr operator<=(const LpBase::Expr &e,
    16201620                                   const LpBase::Expr &f) {
    1621     return LpBase::Constr(0, f - e, LpBase::NaN);
     1621    return LpBase::Constr(0, f - e, LpBase::INF);
    16221622  }
    16231623
     
    16371637  inline LpBase::Constr operator<=(const LpBase::Expr &e,
    16381638                                   const LpBase::Value &f) {
    1639     return LpBase::Constr(LpBase::NaN, e, f);
     1639    return LpBase::Constr(- LpBase::INF, e, f);
    16401640  }
    16411641
     
    16461646  inline LpBase::Constr operator>=(const LpBase::Expr &e,
    16471647                                   const LpBase::Expr &f) {
    1648     return LpBase::Constr(0, e - f, LpBase::NaN);
     1648    return LpBase::Constr(0, e - f, LpBase::INF);
    16491649  }
    16501650
     
    16661666  inline LpBase::Constr operator>=(const LpBase::Expr &e,
    16671667                                   const LpBase::Value &f) {
    1668     return LpBase::Constr(f, e, LpBase::NaN);
     1668    return LpBase::Constr(f, e, LpBase::INF);
    16691669  }
    16701670
  • lemon/network_simplex.h

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

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

    r964 r874  
    77  ${PROJECT_BINARY_DIR}/lemon
    88)
    9 
    10 SET(TEST_WITH_VALGRIND "NO" CACHE STRING
    11   "Run the test with valgrind (YES/NO).")
    12 SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")
    139
    1410SET(TESTS
     
    3430  heap_test
    3531  kruskal_test
    36   lgf_test
    3732  maps_test
    3833  matching_test
     
    5146
    5247IF(LEMON_HAVE_LP)
    53   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    54     ADD_EXECUTABLE(lp_test lp_test.cc)
    55   ELSE()
    56     ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
    57   ENDIF()
    58 
     48  ADD_EXECUTABLE(lp_test lp_test.cc)
    5949  SET(LP_TEST_LIBS lemon)
    6050
     
    7161  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    7262  ADD_TEST(lp_test lp_test)
    73   ADD_DEPENDENCIES(check lp_test)
    7463
    7564  IF(WIN32 AND LEMON_HAVE_GLPK)
     
    9382
    9483IF(LEMON_HAVE_MIP)
    95   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    96     ADD_EXECUTABLE(mip_test mip_test.cc)
    97   ELSE()
    98     ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
    99   ENDIF()
    100 
     84  ADD_EXECUTABLE(mip_test mip_test.cc)
    10185  SET(MIP_TEST_LIBS lemon)
    10286
     
    11397  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    11498  ADD_TEST(mip_test mip_test)
    115   ADD_DEPENDENCIES(check mip_test)
    11699
    117100  IF(WIN32 AND LEMON_HAVE_GLPK)
     
    135118
    136119FOREACH(TEST_NAME ${TESTS})
    137   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    138     ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
    139   ELSE()
    140     ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
    141   ENDIF()
     120  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
    142121  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
    143     IF(TEST_WITH_VALGRIND)
    144       ADD_TEST(${TEST_NAME}
    145         valgrind --error-exitcode=1 ${VALGRIND_FLAGS}
    146         ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} )
    147     ELSE()
    148       ADD_TEST(${TEST_NAME} ${TEST_NAME})
    149     ENDIF()
    150   ADD_DEPENDENCIES(check ${TEST_NAME})
     122  ADD_TEST(${TEST_NAME} ${TEST_NAME})
    151123ENDFOREACH()
  • test/Makefile.am

    r964 r874  
    3232        test/heap_test \
    3333        test/kruskal_test \
    34         test/lgf_test \
    3534        test/maps_test \
    3635        test/matching_test \
     
    8281test_kruskal_test_SOURCES = test/kruskal_test.cc
    8382test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
    84 test_lgf_test_SOURCES = test/lgf_test.cc
    8583test_lp_test_SOURCES = test/lp_test.cc
    8684test_maps_test_SOURCES = test/maps_test.cc
  • test/dfs_test.cc

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

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

    r948 r855  
    273273  }
    274274
    275   {
    276     typedef FibHeap<Prio, ItemIntMap> IntHeap;
    277     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
    278     heapSortTest<IntHeap>();
    279     heapIncreaseTest<IntHeap>();
    280 
    281     typedef FibHeap<Prio, IntNodeMap > NodeHeap;
    282     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
    283     dijkstraHeapTest<NodeHeap>(digraph, length, source);
    284   }
    285 
    286   {
    287     typedef RadixHeap<ItemIntMap> IntHeap;
    288     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
    289     heapSortTest<IntHeap>();
    290     heapIncreaseTest<IntHeap>();
    291 
    292     typedef RadixHeap<IntNodeMap > NodeHeap;
    293     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
    294     dijkstraHeapTest<NodeHeap>(digraph, length, source);
    295   }
    296 
    297   {
    298     typedef BucketHeap<ItemIntMap> IntHeap;
    299     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
    300     heapSortTest<IntHeap>();
    301     heapIncreaseTest<IntHeap>();
    302 
    303     typedef BucketHeap<IntNodeMap > NodeHeap;
    304     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
    305     dijkstraHeapTest<NodeHeap>(digraph, length, source);
    306   }
    307 
    308 
    309275  return 0;
    310276}
  • test/lp_test.cc

    r957 r631  
    167167    c = ((2 >= p1) >= 3);
    168168
    169     { //Tests for #430
    170       LP::Col v=lp.addCol();
    171       LP::Constr c = v >= -3;
    172       c = c <= 4;
    173       LP::Constr c2;
    174       c2 = -3 <= v <= 4;
    175     }
    176 
    177169    e[x[3]]=2;
    178170    e[x[3]]=4;
  • test/preflow_test.cc

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