COIN-OR::LEMON - Graph Library

Changes in / [1003:16f55008c863:1004:d59484d5fc1f] in lemon-main


Ignore:
Files:
1 added
17 deleted
43 edited

Legend:

Unmodified
Added
Removed
  • AUTHORS

    r951 r992  
    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>
  • CMakeLists.txt

    r980 r1000  
    1313ELSE()
    1414  EXECUTE_PROCESS(
    15     COMMAND ${PYTHON_EXECUTABLE} ./scripts/chg-len.py
     15    COMMAND
     16    hg log -r. --template "{latesttag}"
    1617    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    17     OUTPUT_VARIABLE HG_REVISION_PATH
     18    OUTPUT_VARIABLE HG_REVISION_TAG
    1819    ERROR_QUIET
    1920    OUTPUT_STRIP_TRAILING_WHITESPACE
    2021  )
    2122  EXECUTE_PROCESS(
    22     COMMAND hg id -i
     23    COMMAND
     24    hg log -r. --template "{latesttagdistance}"
    2325    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    24     OUTPUT_VARIABLE HG_REVISION
     26    OUTPUT_VARIABLE HG_REVISION_DIST
    2527    ERROR_QUIET
    2628    OUTPUT_STRIP_TRAILING_WHITESPACE
    2729  )
    28   IF(HG_REVISION STREQUAL "")
     30  EXECUTE_PROCESS(
     31    COMMAND
     32    hg log -r. --template "{node|short}"
     33    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     34    OUTPUT_VARIABLE HG_REVISION_ID
     35    ERROR_QUIET
     36    OUTPUT_STRIP_TRAILING_WHITESPACE
     37  )
     38
     39  IF(HG_REVISION_TAG STREQUAL "")
    2940    SET(HG_REVISION_ID "hg-tip")
    3041  ELSE()
    31     IF(HG_REVISION_PATH STREQUAL "")
    32       SET(HG_REVISION_ID ${HG_REVISION})
     42    IF(HG_REVISION_TAG STREQUAL "null")
     43      SET(HG_REVISION_TAG "trunk")
     44    ELSEIF(HG_REVISION_TAG MATCHES "^r")
     45      STRING(SUBSTRING ${HG_REVISION_TAG} 1 -1 HG_REVISION_TAG)
     46    ENDIF()
     47    IF(HG_REVISION_DIST STREQUAL "0")
     48      SET(HG_REVISION ${HG_REVISION_TAG})
    3349    ELSE()
    34       SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION})
     50      SET(HG_REVISION
     51        "${HG_REVISION_TAG}+${HG_REVISION_DIST}-${HG_REVISION_ID}")
    3552    ENDIF()
    3653  ENDIF()
    37   SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.")
     54
     55  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    3856ENDIF()
    3957
     
    171189ENDIF()
    172190
     191CONFIGURE_FILE(
     192  ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in
     193  ${PROJECT_BINARY_DIR}/cmake/version.cmake
     194  @ONLY
     195)
     196
     197SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME})
     198STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME)
     199SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION})
     200ADD_CUSTOM_TARGET(dist
     201  COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
     202  COMMAND hg archive ${ARCHIVE_NAME}
     203  COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake
     204  COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME}
     205  COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME}
     206  COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html
     207  COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME}
     208  COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME}
     209  COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     210  COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     211  COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     212  COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
     213  COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
     214  DEPENDS html
     215  WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
     216
     217# CPACK config (Basically for NSIS)
    173218IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    174219  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
  • INSTALL

    r824 r992  
    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-DGLPK_ROOT_DIR=DIRECTORY
     110-DCOIN_ROOT_DIR=DIRECTORY
     111-DCPLEX_ROOT_DIR=DIRECTORY
    114112
    115 --with-cplex-includedir=DIR
    116 
    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).
    120 
    121 --with-cplex-libdir=DIR
    122 
    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).
    127 
    128 --without-cplex
    129 
    130    Disable CPLEX support.
    131 
    132 --with-soplex[=PREFIX]
    133 
    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.
    137 
    138 --with-soplex-includedir=DIR
    139 
    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).
    143 
    144 --with-soplex-libdir=DIR
    145 
    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).
    149 
    150 --without-soplex
    151 
    152    Disable SoPlex support.
    153 
    154 --with-coin[=PREFIX]
    155 
    156    Enable support for COIN-OR solvers (CLP and CBC). You should
    157    specify the prefix too. (by default, COIN-OR tools install
    158    themselves to the source code directory). This command enables the
    159    solvers that are actually found.
    160 
    161 --with-coin-includedir=DIR
    162 
    163    The directory where the COIN-OR header files are located. This is
    164    only useful when the COIN-OR headers and libraries are not under
    165    the same prefix (which is unlikely).
    166 
    167 --with-coin-libdir=DIR
    168 
    169    The directory where the COIN-OR libraries are located. This is only
    170    useful when the COIN-OR headers and libraries are not under the
    171    same prefix (which is unlikely).
    172 
    173 --without-coin
    174 
    175    Disable COIN-OR support.
    176 
     113  Install root directory prefixes of optional third party libraries.
    177114
    178115Makefile Variables
    179116==================
    180117
    181 Some Makefile variables are reserved by the GNU Coding Standards for
    182 the use of the "user" - the person building the package. For instance,
    183 CXX and CXXFLAGS are such variables, and have the same meaning as
    184 explained in the previous section. These variables can be set on the
    185 command line when invoking `make' like this:
    186 `make [VARIABLE=VALUE]...'
     118make VERBOSE=1
    187119
    188 WARNINGCXXFLAGS is a non-standard Makefile variable introduced by us
    189 to hold several compiler flags related to warnings. Its default value
    190 can be overridden when invoking `make'. For example to disable all
    191 warning flags use `make WARNINGCXXFLAGS='.
    192 
    193 In order to turn off a single flag from the default set of warning
    194 flags, you can use the CXXFLAGS variable, since this is passed after
    195 WARNINGCXXFLAGS. For example to turn off `-Wold-style-cast' (which is
    196 used by default when g++ is detected) you can use
    197 `make CXXFLAGS="-g -O2 -Wno-old-style-cast"'.
     120   This results in a more verbose output by showing the full
     121   compiler and linker commands.
  • LICENSE

    r879 r992  
    22copyright/license.
    33
    4 Copyright (C) 2003-2010 Egervary Jeno Kombinatorikus Optimalizalasi
     4Copyright (C) 2003-2012 Egervary Jeno Kombinatorikus Optimalizalasi
    55Kutatocsoport (Egervary Combinatorial Optimization Research Group,
    66EGRES).
  • cmake/version.cmake.in

    r678 r983  
    1 SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
     1SET(LEMON_VERSION "@LEMON_VERSION@" CACHE STRING "LEMON version string.")
  • doc/CMakeLists.txt

    r966 r983  
    1717  @ONLY
    1818)
     19
     20# Copy doc from source (if exists)
     21IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html AND
     22    NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
     23  MESSAGE(STATUS "Copy doc from source tree")
     24  EXECUTE_PROCESS(
     25    COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/html ${CMAKE_CURRENT_BINARY_DIR}/html
     26    )
     27ENDIF()
    1928
    2029IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
  • lemon/CMakeLists.txt

    r968 r981  
    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
    99)
    1010
    1111CONFIGURE_FILE(
    12   ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.cmake
     12  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.in
    1313  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
    1414  @ONLY
  • lemon/adaptors.h

    r877 r998  
    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
     
    22782278    /// Creates an undirected graph from the given digraph.
    22792279    Undirector(DGR& digraph) {
    2280       initialize(digraph);
     2280      this->initialize(digraph);
    22812281    }
    22822282
  • lemon/bits/bezier.h

    r440 r997  
    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/edge_set_extender.h

    r966 r1000  
    524524    // Returns the base node of the iterator
    525525    Node baseNode(const IncEdgeIt &e) const {
    526       return e.direction ? u(e) : v(e);
     526      return e.direction ? this->u(e) : this->v(e);
    527527    }
    528528    // Running node of the iterator
     
    530530    // Returns the running node of the iterator
    531531    Node runningNode(const IncEdgeIt &e) const {
    532       return e.direction ? v(e) : u(e);
     532      return e.direction ? this->v(e) : this->u(e);
    533533    }
    534534
  • lemon/bits/graph_extender.h

    r778 r998  
    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
  • lemon/bits/solver_bits.h

    r877 r989  
    4545      void clear() {
    4646        first_item = -1;
     47        last_item = -1;
    4748        first_free_item = -1;
    4849        items.clear();
  • lemon/bits/windows.cc

    r979 r1001  
    137137      InitializeCriticalSection(lock);
    138138      _repr = lock;
     139#else
     140      _repr = 0; //Just to avoid 'unused variable' warning with clang
    139141#endif
    140142    }
  • lemon/capacity_scaling.h

    r1003 r1004  
    9393  ///
    9494  /// \warning Both \c V and \c C must be signed number types.
    95   /// \warning All input data (capacities, supply values, and costs) must
    96   /// be integer.
     95  /// \warning Capacity bounds and supply values must be integer, but
     96  /// arc costs can be arbitrary real numbers.
    9797  /// \warning This algorithm does not support negative costs for
    9898  /// arcs having infinite upper bound.
  • lemon/cbc.cc

    r974 r1000  
    436436
    437437    _prob = new CoinModel();
    438     rows.clear();
    439     cols.clear();
    440438  }
    441439
  • lemon/circulation.h

    r877 r998  
    573573
    574574      Node act;
    575       Node bact=INVALID;
    576       Node last_activated=INVALID;
    577575      while((act=_level->highestActive())!=INVALID) {
    578576        int actlevel=(*_level)[act];
  • lemon/clp.cc

    r877 r989  
    438438    delete _prob;
    439439    _prob = new ClpSimplex();
    440     rows.clear();
    441     cols.clear();
    442440    _col_names_ref.clear();
    443441    _clear_temporals();
  • lemon/concept_check.h

    r440 r997  
    3636
    3737  template <class T> inline void ignore_unused_variable_warning(const T&) { }
     38  template <class T1, class T2>
     39  inline void ignore_unused_variable_warning(const T1&, const T2&) { }
     40  template <class T1, class T2, class T3>
     41  inline void ignore_unused_variable_warning(const T1&, const T2&,
     42                                             const T3&) { }
     43  template <class T1, class T2, class T3, class T4>
     44  inline void ignore_unused_variable_warning(const T1&, const T2&,
     45                                             const T3&, const T4&) { }
     46  template <class T1, class T2, class T3, class T4, class T5>
     47  inline void ignore_unused_variable_warning(const T1&, const T2&,
     48                                             const T3&, const T4&,
     49                                             const T5&) { }
     50  template <class T1, class T2, class T3, class T4, class T5, class T6>
     51  inline void ignore_unused_variable_warning(const T1&, const T2&,
     52                                             const T3&, const T4&,
     53                                             const T5&, const T6&) { }
    3854
    3955  ///\e
  • lemon/concepts/graph_components.h

    r976 r1000  
    495495          _GraphItemIt it3 = it1;
    496496          _GraphItemIt it4 = INVALID;
     497          ignore_unused_variable_warning(it3);
     498          ignore_unused_variable_warning(it4);
    497499
    498500          it2 = ++it1;
     
    584586          _GraphIncIt it3 = it1;
    585587          _GraphIncIt it4 = INVALID;
     588          ignore_unused_variable_warning(it3);
     589          ignore_unused_variable_warning(it4);
    586590
    587591          it2 = ++it1;
  • lemon/concepts/maps.h

    r975 r997  
    5050      /// Returns the value associated with the given key.
    5151      Value operator[](const Key &) const {
    52         return *static_cast<Value *>(0);
     52        return *(static_cast<Value *>(0)+1);
    5353      }
    5454
  • lemon/config.h.in

    r979 r981  
    1 /* The version string */
    2 #undef LEMON_VERSION
    3 
    4 /* Define to 1 if you have long long */
    5 #undef LEMON_HAVE_LONG_LONG
    6 
    7 /* Define to 1 if you have any LP solver. */
    8 #undef LEMON_HAVE_LP
    9 
    10 /* Define to 1 if you have any MIP solver. */
    11 #undef LEMON_HAVE_MIP
    12 
    13 /* Define to 1 if you have CPLEX. */
    14 #undef LEMON_HAVE_CPLEX
    15 
    16 /* Define to 1 if you have GLPK. */
    17 #undef LEMON_HAVE_GLPK
    18 
    19 /* Define to 1 if you have SOPLEX */
    20 #undef LEMON_HAVE_SOPLEX
    21 
    22 /* Define to 1 if you have CLP */
    23 #undef LEMON_HAVE_CLP
    24 
    25 /* Define to 1 if you have CBC */
    26 #undef LEMON_HAVE_CBC
    27 
    28 /* Define to 1 if you have pthread */
    29 #undef LEMON_USE_PTHREAD
    30 
    31 /* Define to 1 if you have win32 threads */
    32 #undef LEMON_USE_WIN32_THREADS
     1#define LEMON_VERSION "@PROJECT_VERSION@"
     2#cmakedefine LEMON_HAVE_LONG_LONG 1
     3#cmakedefine LEMON_HAVE_LP 1
     4#cmakedefine LEMON_HAVE_MIP 1
     5#cmakedefine LEMON_HAVE_GLPK 1
     6#cmakedefine LEMON_HAVE_CPLEX 1
     7#cmakedefine LEMON_HAVE_CLP 1
     8#cmakedefine LEMON_HAVE_CBC 1
     9#cmakedefine LEMON_USE_PTHREAD 1
     10#cmakedefine LEMON_USE_WIN32_THREADS 1
  • lemon/core.h

    r966 r1000  
    18691869    ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
    18701870    ///
    1871 #ifdef DOXYGEN
    1872     Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
    1873 #else
    1874     using ArcLookUp<GR>::operator() ;
    1875     Arc operator()(Node s, Node t, Arc prev) const
     1871    Arc operator()(Node s, Node t, Arc prev=INVALID) const
    18761872    {
    1877       return prev==INVALID?(*this)(s,t):_next[prev];
    1878     }
     1873      if(prev==INVALID)
     1874        {
     1875          Arc f=INVALID;
     1876          Arc e;
     1877          for(e=_head[s];
     1878              e!=INVALID&&_g.target(e)!=t;
     1879              e = t < _g.target(e)?_left[e]:_right[e]) ;
     1880          while(e!=INVALID)
     1881            if(_g.target(e)==t)
     1882              {
     1883                f = e;
     1884                e = _left[e];
     1885              }
     1886            else e = _right[e];
     1887          return f;
     1888        }
     1889      else return _next[prev];
     1890    }
     1891
     1892  };
     1893
     1894  /// @}
     1895
     1896} //namespace lemon
     1897
    18791898#endif
    1880 
    1881   };
    1882 
    1883   /// @}
    1884 
    1885 } //namespace lemon
    1886 
    1887 #endif
  • lemon/cplex.cc

    r877 r989  
    471471    int status;
    472472    _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem");
    473     rows.clear();
    474     cols.clear();
    475473  }
    476474
  • lemon/glpk.cc

    r877 r989  
    557557  void GlpkBase::_clear() {
    558558    glp_erase_prob(lp);
    559     rows.clear();
    560     cols.clear();
    561559  }
    562560
  • lemon/graph_to_eps.h

    r964 r998  
    223223  using T::_copyright;
    224224
    225   using T::NodeTextColorType;
     225  using typename T::NodeTextColorType;
    226226  using T::CUST_COL;
    227227  using T::DIST_COL;
  • lemon/lemon.pc.in

    r658 r981  
    1 prefix=@prefix@
    2 exec_prefix=@exec_prefix@
    3 libdir=@libdir@
    4 includedir=@includedir@
     1prefix=@CMAKE_INSTALL_PREFIX@
     2exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
     3libdir=@CMAKE_INSTALL_PREFIX@/lib
     4includedir=@CMAKE_INSTALL_PREFIX@/include
    55
    6 Name: @PACKAGE_NAME@
     6Name: @PROJECT_NAME@
    77Description: Library for Efficient Modeling and Optimization in Networks
    8 Version: @PACKAGE_VERSION@
     8Version: @PROJECT_VERSION@
    99Libs: -L${libdir} -lemon @GLPK_LIBS@ @CPLEX_LIBS@ @SOPLEX_LIBS@ @CLP_LIBS@ @CBC_LIBS@
    1010Cflags: -I${includedir}
  • lemon/lp_base.h

    r958 r989  
    15571557
    15581558    ///Clears the problem
    1559     void clear() { _clear(); }
     1559    void clear() { _clear(); rows.clear(); cols.clear(); }
    15601560
    15611561    /// Sets the message level of the solver
  • lemon/network_simplex.h

    r1003 r1004  
    124124    /// the \ref run() function.
    125125    ///
    126     /// \ref NetworkSimplex provides five different pivot rule
    127     /// implementations that significantly affect the running time
     126    /// \ref NetworkSimplex provides five different implementations for
     127    /// the pivot strategy that significantly affects the running time
    128128    /// of the algorithm.
    129     /// By default, \ref BLOCK_SEARCH "Block Search" is used, which
    130     /// turend out to be the most efficient and the most robust on various
    131     /// test inputs.
    132     /// However, another pivot rule can be selected using the \ref run()
    133     /// function with the proper parameter.
     129    /// According to experimental tests conducted on various problem
     130    /// instances, \ref BLOCK_SEARCH "Block Search" and
     131    /// \ref ALTERING_LIST "Altering Candidate List" rules turned out
     132    /// to be the most efficient.
     133    /// Since \ref BLOCK_SEARCH "Block Search" is a simpler strategy that
     134    /// seemed to be slightly more robust, it is used by default.
     135    /// However, another pivot rule can easily be selected using the
     136    /// \ref run() function with the proper parameter.
    134137    enum PivotRule {
    135138
     
    157160      /// The \e Altering \e Candidate \e List pivot rule.
    158161      /// It is a modified version of the Candidate List method.
    159       /// It keeps only the several best eligible arcs from the former
     162      /// It keeps only a few of the best eligible arcs from the former
    160163      /// candidate list and extends this list in every iteration.
    161164      ALTERING_LIST
     
    540543        SortFunc(const CostVector &map) : _map(map) {}
    541544        bool operator()(int left, int right) {
    542           return _map[left] > _map[right];
     545          return _map[left] < _map[right];
    543546        }
    544547      };
     
    558561        const double BLOCK_SIZE_FACTOR = 1.0;
    559562        const int MIN_BLOCK_SIZE = 10;
    560         const double HEAD_LENGTH_FACTOR = 0.1;
     563        const double HEAD_LENGTH_FACTOR = 0.01;
    561564        const int MIN_HEAD_LENGTH = 3;
    562565
     
    602605        }
    603606        for (e = 0; e != _next_arc; ++e) {
    604           _cand_cost[e] = _state[e] *
    605             (_cost[e] + _pi[_source[e]] - _pi[_target[e]]);
    606           if (_cand_cost[e] < 0) {
     607          c = _state[e] * (_cost[e] + _pi[_source[e]] - _pi[_target[e]]);
     608          if (c < 0) {
     609            _cand_cost[e] = c;
    607610            _candidates[_curr_length++] = e;
    608611          }
     
    617620      search_end:
    618621
    619         // Make heap of the candidate list (approximating a partial sort)
    620         make_heap( _candidates.begin(), _candidates.begin() + _curr_length,
    621                    _sort_func );
    622 
    623         // Pop the first element of the heap
     622        // Perform partial sort operation on the candidate list
     623        int new_length = std::min(_head_length + 1, _curr_length);
     624        std::partial_sort(_candidates.begin(), _candidates.begin() + new_length,
     625                          _candidates.begin() + _curr_length, _sort_func);
     626
     627        // Select the entering arc and remove it from the list
    624628        _in_arc = _candidates[0];
    625629        _next_arc = e;
    626         pop_heap( _candidates.begin(), _candidates.begin() + _curr_length,
    627                   _sort_func );
    628         _curr_length = std::min(_head_length, _curr_length - 1);
     630        _candidates[0] = _candidates[new_length - 1];
     631        _curr_length = new_length - 1;
    629632        return true;
    630633      }
  • lemon/path.h

    r920 r1000  
    6565    Path() {}
    6666
     67    /// \brief Copy constructor
     68    ///
     69    Path(const Path& cpath) {
     70      pathCopy(cpath, *this);
     71    }
     72
    6773    /// \brief Template copy constructor
    6874    ///
     
    7278    Path(const CPath& cpath) {
    7379      pathCopy(cpath, *this);
     80    }
     81
     82    /// \brief Copy assignment
     83    ///
     84    Path& operator=(const Path& cpath) {
     85      pathCopy(cpath, *this);
     86      return *this;
    7487    }
    7588
     
    253266    SimplePath() {}
    254267
     268    /// \brief Copy constructor
     269    ///
     270    SimplePath(const SimplePath& cpath) {
     271      pathCopy(cpath, *this);
     272    }
     273
    255274    /// \brief Template copy constructor
    256275    ///
     
    260279    SimplePath(const CPath& cpath) {
    261280      pathCopy(cpath, *this);
     281    }
     282
     283    /// \brief Copy assignment
     284    ///
     285    SimplePath& operator=(const SimplePath& cpath) {
     286      pathCopy(cpath, *this);
     287      return *this;
    262288    }
    263289
     
    432458    ListPath() : first(0), last(0) {}
    433459
     460    /// \brief Copy constructor
     461    ///
     462    ListPath(const ListPath& cpath) : first(0), last(0) {
     463      pathCopy(cpath, *this);
     464    }
     465
    434466    /// \brief Template copy constructor
    435467    ///
     
    446478    ~ListPath() {
    447479      clear();
     480    }
     481
     482    /// \brief Copy assignment
     483    ///
     484    ListPath& operator=(const ListPath& cpath) {
     485      pathCopy(cpath, *this);
     486      return *this;
    448487    }
    449488
     
    759798    StaticPath() : len(0), arcs(0) {}
    760799
     800    /// \brief Copy constructor
     801    ///
     802    StaticPath(const StaticPath& cpath) : arcs(0) {
     803      pathCopy(cpath, *this);
     804    }
     805
    761806    /// \brief Template copy constructor
    762807    ///
     
    772817    ~StaticPath() {
    773818      if (arcs) delete[] arcs;
     819    }
     820
     821    /// \brief Copy assignment
     822    ///
     823    StaticPath& operator=(const StaticPath& cpath) {
     824      pathCopy(cpath, *this);
     825      return *this;
    774826    }
    775827
  • lemon/planarity.h

    r877 r999  
    7373
    7474      void discover(const Arc& arc) {
    75         Node source = _graph.source(arc);
    7675        Node target = _graph.target(arc);
    7776
  • test/CMakeLists.txt

    r974 r1000  
    1414SET(TESTS
    1515  adaptors_test
     16  arc_look_up_test
    1617  bellman_ford_test
    1718  bfs_test
  • test/adaptors_test.cc

    r515 r998  
    6666  Digraph::Arc a2 = digraph.addArc(n1, n3);
    6767  Digraph::Arc a3 = digraph.addArc(n2, n3);
     68  ignore_unused_variable_warning(a3);
    6869
    6970  // Check the adaptor
     
    100101  Adaptor::Arc a7 = adaptor.addArc(n1, n4);
    101102  Adaptor::Arc a8 = adaptor.addArc(n1, n2);
     103  ignore_unused_variable_warning(a6,a7,a8);
    102104
    103105  adaptor.erase(a1);
     
    759761  Digraph::Arc a2 = digraph.addArc(n1, n3);
    760762  Digraph::Arc a3 = digraph.addArc(n2, n3);
     763  ignore_unused_variable_warning(a1,a2,a3);
    761764
    762765  checkGraphNodeList(adaptor, 6);
     
    13781381
    13791382  // Apply several adaptors on the grid graph
    1380   typedef SplitNodes<Orienter< const GridGraph, GridGraph::EdgeMap<bool> > >
    1381     SplitGridGraph;
     1383  typedef Orienter< const GridGraph, GridGraph::EdgeMap<bool> >
     1384    OrientedGridGraph;
     1385  typedef SplitNodes<OrientedGridGraph> SplitGridGraph;
    13821386  typedef Undirector<const SplitGridGraph> USplitGridGraph;
    13831387  checkConcept<concepts::Digraph, SplitGridGraph>();
    13841388  checkConcept<concepts::Graph, USplitGridGraph>();
    13851389
    1386   SplitGridGraph adaptor = splitNodes(orienter(graph, dir_map));
     1390  OrientedGridGraph oadaptor = orienter(graph, dir_map);
     1391  SplitGridGraph adaptor = splitNodes(oadaptor);
    13871392  USplitGridGraph uadaptor = undirector(adaptor);
    13881393
  • test/bellman_ford_test.cc

    r880 r999  
    191191
    192192  ListPath<Digraph> path;
    193   Value dist;
     193  Value dist = 0;
    194194  bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t);
    195195
  • test/connectivity_test.cc

    r877 r998  
    6969    Graph g(d);
    7070    Digraph::Node n = d.addNode();
     71    ignore_unused_variable_warning(n);
    7172
    7273    check(stronglyConnected(d), "This digraph is strongly connected");
     
    246247    Digraph::Node watch = d.addNode();
    247248    Digraph::Node pants = d.addNode();
     249    ignore_unused_variable_warning(watch);
    248250
    249251    d.addArc(socks, shoe);
  • test/digraph_test.cc

    r877 r999  
    6565      a3 = G.addArc(n2, n3),
    6666      a4 = G.addArc(n2, n3);
     67  ignore_unused_variable_warning(a2,a3,a4);
    6768
    6869  checkGraphNodeList(G, 3);
     
    9394  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
    9495      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
     96  ignore_unused_variable_warning(a1,a2,a3,a4);
    9597
    9698  Node n4 = G.split(n2);
     
    126128      a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3),
    127129      a5 = G.addArc(n2, n4);
     130  ignore_unused_variable_warning(a1,a2,a3,a5);
    128131
    129132  checkGraphNodeList(G, 4);
     
    205208      a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1),
    206209      a5 = G.addArc(n2, n4);
     210  ignore_unused_variable_warning(a2,a3,a4,a5);
    207211
    208212  // Check arc deletion
     
    252256  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
    253257      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
     258  ignore_unused_variable_warning(a1,a2,a3,a4);
    254259
    255260  typename Digraph::Snapshot snapshot(G);
     
    352357    e1 = g.addArc(n1, n2),
    353358    e2 = g.addArc(n2, n3);
     359  ignore_unused_variable_warning(e2);
    354360
    355361  check(g.valid(n1), "Wrong validity check");
     
    437443    a3 = g.addArc(n2, n3),
    438444    a4 = g.addArc(n2, n3);
     445  ignore_unused_variable_warning(a2,a3,a4);
    439446
    440447  digraphCopy(g, G).nodeRef(nref).run();
  • test/edge_set_test.cc

    r877 r998  
    4545
    4646  Digraph::Arc ga1 = digraph.addArc(n1, n2);
     47  ignore_unused_variable_warning(ga1);
    4748
    4849  ArcSet arc_set(digraph);
    4950
    5051  Digraph::Arc ga2 = digraph.addArc(n2, n1);
     52  ignore_unused_variable_warning(ga2);
    5153
    5254  checkGraphNodeList(arc_set, 2);
     
    7678    a3 = arc_set.addArc(n2, n3),
    7779    a4 = arc_set.addArc(n2, n3);
     80  ignore_unused_variable_warning(a2,a3,a4);
     81
    7882  checkGraphNodeList(arc_set, 3);
    7983  checkGraphArcList(arc_set, 4);
     
    111115
    112116  Digraph::Arc ga1 = digraph.addArc(n1, n2);
     117  ignore_unused_variable_warning(ga1);
    113118
    114119  ArcSet arc_set(digraph);
    115120
    116121  Digraph::Arc ga2 = digraph.addArc(n2, n1);
     122  ignore_unused_variable_warning(ga2);
    117123
    118124  checkGraphNodeList(arc_set, 2);
     
    142148    a3 = arc_set.addArc(n2, n3),
    143149    a4 = arc_set.addArc(n2, n3);
     150  ignore_unused_variable_warning(a2,a3,a4);
     151
    144152  checkGraphNodeList(arc_set, 3);
    145153  checkGraphArcList(arc_set, 4);
     
    191199
    192200  Digraph::Arc ga1 = digraph.addArc(n1, n2);
     201  ignore_unused_variable_warning(ga1);
    193202
    194203  EdgeSet edge_set(digraph);
    195204
    196205  Digraph::Arc ga2 = digraph.addArc(n2, n1);
     206  ignore_unused_variable_warning(ga2);
    197207
    198208  checkGraphNodeList(edge_set, 2);
     
    231241    e3 = edge_set.addEdge(n2, n3),
    232242    e4 = edge_set.addEdge(n2, n3);
     243  ignore_unused_variable_warning(e2,e3,e4);
     244
    233245  checkGraphNodeList(edge_set, 3);
    234246  checkGraphEdgeList(edge_set, 4);
     
    275287
    276288  Digraph::Arc ga1 = digraph.addArc(n1, n2);
     289  ignore_unused_variable_warning(ga1);
    277290
    278291  EdgeSet edge_set(digraph);
    279292
    280293  Digraph::Arc ga2 = digraph.addArc(n2, n1);
     294  ignore_unused_variable_warning(ga2);
    281295
    282296  checkGraphNodeList(edge_set, 2);
     
    315329    e3 = edge_set.addEdge(n2, n3),
    316330    e4 = edge_set.addEdge(n2, n3);
     331  ignore_unused_variable_warning(e2,e3,e4);
     332
    317333  checkGraphNodeList(edge_set, 3);
    318334  checkGraphEdgeList(edge_set, 4);
  • test/euler_test.cc

    r877 r998  
    102102    Graph g(d);
    103103    Digraph::Node n = d.addNode();
    104 
     104    ignore_unused_variable_warning(n);
     105 
    105106    checkDiEulerIt(d);
    106107    checkDiEulerIt(g);
     
    190191    Digraph::Node n4 = d.addNode();
    191192    Digraph::Node n5 = d.addNode();
     193    ignore_unused_variable_warning(n0,n4,n5);
    192194
    193195    d.addArc(n1, n2);
  • test/fractional_matching_test.cc

    r877 r999  
    343343      pv += weight[mwfm.matching(n)];
    344344      SmartGraph::Node o = graph.target(mwfm.matching(n));
     345      ignore_unused_variable_warning(o);
    345346    } else {
    346347      check(mwfm.nodeValue(n) == 0, "Invalid matching");
     
    407408    pv += weight[mwpfm.matching(n)];
    408409    SmartGraph::Node o = graph.target(mwpfm.matching(n));
     410    ignore_unused_variable_warning(o);
    409411  }
    410412
  • test/graph_test.cc

    r877 r998  
    6767  Edge e2 = G.addEdge(n2, n1),
    6868       e3 = G.addEdge(n2, n3);
     69  ignore_unused_variable_warning(e2,e3);
    6970
    7071  checkGraphNodeList(G, 3);
     
    99100       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
    100101       e5 = G.addEdge(n4, n3);
     102  ignore_unused_variable_warning(e1,e3,e4,e5);
    101103
    102104  checkGraphNodeList(G, 4);
     
    178180       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
    179181       e5 = G.addEdge(n4, n3);
     182  ignore_unused_variable_warning(e1,e3,e4,e5);
    180183
    181184  // Check edge deletion
     
    218221  Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
    219222       e3 = G.addEdge(n2, n3);
     223  ignore_unused_variable_warning(e1,e2,e3);
    220224
    221225  checkGraphNodeList(G, 3);
     
    382386    e1 = g.addEdge(n1, n2),
    383387    e2 = g.addEdge(n2, n3);
     388  ignore_unused_variable_warning(e2);
    384389
    385390  check(g.valid(n1), "Wrong validity check");
     
    520525
    521526  Node n = G.nodeFromId(dim);
     527  ignore_unused_variable_warning(n);
    522528
    523529  for (NodeIt n(G); n != INVALID; ++n) {
  • test/lp_test.cc

    r957 r988  
    4242using namespace lemon;
    4343
     44int countCols(LpBase & lp) {
     45  int count=0;
     46  for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
     47  return count;
     48}
     49
     50int countRows(LpBase & lp) {
     51  int count=0;
     52  for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
     53  return count;
     54}
     55
     56
    4457void lpTest(LpSolver& lp)
    4558{
    4659
    4760  typedef LpSolver LP;
     61
     62  // Test LpBase::clear()
     63  check(countRows(lp)==0, "Wrong number of rows");
     64  check(countCols(lp)==0, "Wrong number of cols");
     65  lp.addCol(); lp.addRow(); lp.addRow();
     66  check(countRows(lp)==2, "Wrong number of rows");
     67  check(countCols(lp)==1, "Wrong number of cols");
     68  lp.clear();
     69  check(countRows(lp)==0, "Wrong number of rows");
     70  check(countCols(lp)==0, "Wrong number of cols");
     71  lp.addCol(); lp.addCol(); lp.addCol(); lp.addRow();
     72  check(countRows(lp)==1, "Wrong number of rows");
     73  check(countCols(lp)==3, "Wrong number of cols");
     74  lp.clear();
    4875
    4976  std::vector<LP::Col> x(10);
  • test/maps_test.cc

    r942 r998  
    104104    NullMap<A,B> map1;
    105105    NullMap<A,B> map2 = map1;
     106    ignore_unused_variable_warning(map2);
    106107    map1 = nullMap<A,B>();
    107108  }
     
    114115    ConstMap<A,B> map2 = B();
    115116    ConstMap<A,B> map3 = map1;
     117    ignore_unused_variable_warning(map2,map3);
     118
    116119    map1 = constMap<A>(B());
    117120    map1 = constMap<A,B>();
     
    119122    ConstMap<A,C> map4(C(1));
    120123    ConstMap<A,C> map5 = map4;
     124    ignore_unused_variable_warning(map5);
     125
    121126    map4 = constMap<A>(C(2));
    122127    map4.setAll(C(3));
     
    139144    IdentityMap<A> map1;
    140145    IdentityMap<A> map2 = map1;
     146    ignore_unused_variable_warning(map2);
     147
    141148    map1 = identityMap<A>();
    142149
     
    198205    checkConcept<ReadMap<B,double>, CompMap>();
    199206    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
     207    ignore_unused_variable_warning(map1);
    200208    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
     209    ignore_unused_variable_warning(map2);
    201210
    202211    SparseMap<double, bool> m1(false); m1[3.14] = true;
     
    211220    checkConcept<ReadMap<A,double>, CombMap>();
    212221    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
     222    ignore_unused_variable_warning(map1);
    213223    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
     224    ignore_unused_variable_warning(map2);
    214225
    215226    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
     
    223234    FunctorToMap<F> map1;
    224235    FunctorToMap<F> map2 = FunctorToMap<F>(F());
     236    ignore_unused_variable_warning(map2);
     237
    225238    B b = functorToMap(F())[A()];
     239    ignore_unused_variable_warning(b);
    226240
    227241    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
    228242    MapToFunctor<ReadMap<A,B> > map =
    229243      MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
     244    ignore_unused_variable_warning(map);
    230245
    231246    check(functorToMap(&func)[A()] == 3,
     
    245260      ConvertMap<ReadMap<double, int>, double> >();
    246261    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
     262    ignore_unused_variable_warning(map1);
    247263    ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
     264    ignore_unused_variable_warning(map2);
     265
    248266  }
    249267
  • test/path_test.cc

    r440 r990  
    3939}
    4040
     41// Check if proper copy consructor is called (use valgrind for testing)
     42template<class _Path>
     43void checkCopy()
     44{
     45  ListDigraph g;
     46  ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
     47 
     48  _Path p,q;
     49  p.addBack(a);
     50  q=p;
     51  _Path r(p);
     52  StaticPath<ListDigraph> s(r);
     53}
     54 
    4155int main() {
    4256  check_concepts();
     57
     58  checkCopy<Path<ListDigraph> >();
     59  checkCopy<SimplePath<ListDigraph> >();
     60  checkCopy<ListPath<ListDigraph> >();
     61
     62  ListDigraph g;
     63  ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
     64 
     65  Path<ListDigraph> p;
     66  StaticPath<ListDigraph> q,r;
     67  p.addBack(a);
     68  q=p;
     69  r=q;
     70  StaticPath<ListDigraph> s(q);
     71
    4372  return 0;
    4473}
  • test/time_measure_test.cc

    r558 r997  
    1818
    1919#include <lemon/time_measure.h>
     20#include <lemon/concept_check.h>
    2021
    2122using namespace lemon;
     
    3334
    3435  for(int i=0;i<1000;i++)
    35     TimeStamp x(T);
     36    {
     37      TimeStamp x(T);
     38      ignore_unused_variable_warning(x);
     39    }
    3640}
    3741
Note: See TracChangeset for help on using the changeset viewer.