COIN-OR::LEMON - Graph Library

Changes in / [626:58357e986a08:627:20dac2104519] in lemon-main


Ignore:
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r621 r627  
    2929ENDIF(MSVC)
    3030
     31ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     32
    3133INCLUDE(CheckTypeSize)
    32 CHECK_TYPE_SIZE("long long" LONG_LONG)
     34CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    3335
    3436ENABLE_TESTING()
  • cmake/FindCOIN.cmake

    r621 r627  
    6262
    6363IF(COIN_FOUND)
    64   SET(HAVE_LP TRUE)
    65   SET(HAVE_MIP TRUE)
    66   SET(HAVE_CLP TRUE)
    67   SET(HAVE_CBC TRUE)
     64  SET(LEMON_HAVE_LP TRUE)
     65  SET(LEMON_HAVE_MIP TRUE)
     66  SET(LEMON_HAVE_CLP TRUE)
     67  SET(LEMON_HAVE_CBC TRUE)
    6868ENDIF(COIN_FOUND)
  • cmake/FindCPLEX.cmake

    r620 r627  
    2222
    2323IF(CPLEX_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_CPLEX TRUE)
     24  SET(LEMON_HAVE_LP TRUE)
     25  SET(LEMON_HAVE_MIP TRUE)
     26  SET(LEMON_HAVE_CPLEX TRUE)
    2727ENDIF(CPLEX_FOUND)
  • cmake/FindGLPK.cmake

    r619 r627  
    2222
    2323IF(GLPK_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_GLPK TRUE)
     24  SET(LEMON_HAVE_LP TRUE)
     25  SET(LEMON_HAVE_MIP TRUE)
     26  SET(LEMON_HAVE_GLPK TRUE)
    2727ENDIF(GLPK_FOUND)
  • configure.ac

    r568 r627  
    2626AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
    2727if test x"$long_long_found" = x"yes"; then
    28   AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
     28  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
    2929fi
    3030
  • lemon/CMakeLists.txt

    r621 r627  
    1919)
    2020
    21 IF(HAVE_GLPK)
     21IF(LEMON_HAVE_GLPK)
    2222  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    2323  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
     
    2727    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
    2828  ENDIF(WIN32)
    29 ENDIF(HAVE_GLPK)
     29ENDIF(LEMON_HAVE_GLPK)
    3030
    31 IF(HAVE_CPLEX)
     31IF(LEMON_HAVE_CPLEX)
    3232  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    3333  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    34 ENDIF(HAVE_CPLEX)
     34ENDIF(LEMON_HAVE_CPLEX)
    3535
    36 IF(HAVE_CLP)
     36IF(LEMON_HAVE_CLP)
    3737  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    3838  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    39 ENDIF(HAVE_CLP)
     39ENDIF(LEMON_HAVE_CLP)
    4040
    41 IF(HAVE_CBC)
     41IF(LEMON_HAVE_CBC)
    4242  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    4343  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    44 ENDIF(HAVE_CBC)
     44ENDIF(LEMON_HAVE_CBC)
    4545
    4646ADD_LIBRARY(lemon ${LEMON_SOURCES})
     
    5656  COMPONENT headers
    5757  FILES_MATCHING PATTERN "*.h")
     58
     59INSTALL(
     60  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
     61  DESTINATION include/lemon
     62  COMPONENT headers)
  • lemon/Makefile.am

    r611 r627  
    6262        lemon/color.h \
    6363        lemon/concept_check.h \
     64        lemon/config.h \
    6465        lemon/connectivity.h \
    6566        lemon/counter.h \
  • lemon/bits/default_map.h

    r617 r627  
    9898
    9999
    100 #if defined HAVE_LONG_LONG
     100#if defined LEMON_HAVE_LONG_LONG
    101101
    102102  // long long
  • lemon/config.h.cmake

    r621 r627  
    1 #cmakedefine HAVE_LONG_LONG 1
    2 #cmakedefine HAVE_LP 1
    3 #cmakedefine HAVE_MIP 1
    4 #cmakedefine HAVE_GLPK 1
    5 #cmakedefine HAVE_CPLEX 1
    6 #cmakedefine HAVE_CLP 1
    7 #cmakedefine HAVE_CBC 1
     1#cmakedefine LEMON_HAVE_LONG_LONG 1
     2#cmakedefine LEMON_HAVE_LP 1
     3#cmakedefine LEMON_HAVE_MIP 1
     4#cmakedefine LEMON_HAVE_GLPK 1
     5#cmakedefine LEMON_HAVE_CPLEX 1
     6#cmakedefine LEMON_HAVE_CLP 1
     7#cmakedefine LEMON_HAVE_CBC 1
  • lemon/config.h.in

    r567 r627  
    11/* Define to 1 if you have long long */
    2 #undef HAVE_LONG_LONG
     2#undef LEMON_HAVE_LONG_LONG
    33
    44/* Define to 1 if you have any LP solver. */
    5 #undef HAVE_LP
     5#undef LEMON_HAVE_LP
    66
    77/* Define to 1 if you have any MIP solver. */
    8 #undef HAVE_MIP
     8#undef LEMON_HAVE_MIP
    99
    1010/* Define to 1 if you have CPLEX. */
    11 #undef HAVE_CPLEX
     11#undef LEMON_HAVE_CPLEX
    1212
    1313/* Define to 1 if you have GLPK. */
    14 #undef HAVE_GLPK
     14#undef LEMON_HAVE_GLPK
    1515
    1616/* Define to 1 if you have SOPLEX */
    17 #undef HAVE_SOPLEX
     17#undef LEMON_HAVE_SOPLEX
    1818
    1919/* Define to 1 if you have CLP */
    20 #undef HAVE_CLP
     20#undef LEMON_HAVE_CLP
    2121
    2222/* Define to 1 if you have CBC */
    23 #undef HAVE_CBC
     23#undef LEMON_HAVE_CBC
  • lemon/lp.h

    r462 r627  
    2323
    2424
    25 #ifdef HAVE_GLPK
     25#ifdef LEMON_HAVE_GLPK
    2626#include <lemon/glpk.h>
    27 #elif HAVE_CPLEX
     27#elif LEMON_HAVE_CPLEX
    2828#include <lemon/cplex.h>
    29 #elif HAVE_SOPLEX
     29#elif LEMON_HAVE_SOPLEX
    3030#include <lemon/soplex.h>
    31 #elif HAVE_CLP
     31#elif LEMON_HAVE_CLP
    3232#include <lemon/clp.h>
    3333#endif
     
    7070  typedef GlpkMip Mip;
    7171#else
    72 #ifdef HAVE_GLPK
     72#ifdef LEMON_HAVE_GLPK
    7373# define LEMON_DEFAULT_LP GLPK
    7474  typedef GlpkLp Lp;
    7575# define LEMON_DEFAULT_MIP GLPK
    7676  typedef GlpkMip Mip;
    77 #elif HAVE_CPLEX
     77#elif LEMON_HAVE_CPLEX
    7878# define LEMON_DEFAULT_LP CPLEX
    7979  typedef CplexLp Lp;
    8080# define LEMON_DEFAULT_MIP CPLEX
    8181  typedef CplexMip Mip;
    82 #elif HAVE_SOPLEX
     82#elif LEMON_HAVE_SOPLEX
    8383# define DEFAULT_LP SOPLEX
    8484  typedef SoplexLp Lp;
    85 #elif HAVE_CLP
     85#elif LEMON_HAVE_CLP
    8686# define DEFAULT_LP CLP
    8787  typedef ClpLp Lp; 
  • m4/lx_check_coin.m4

    r568 r627  
    5656
    5757    if test x"$lx_clp_found" = x"yes"; then
    58       AC_DEFINE([HAVE_CLP], [1], [Define to 1 if you have CLP.])
     58      AC_DEFINE([LEMON_HAVE_CLP], [1], [Define to 1 if you have CLP.])
    5959      lx_lp_found=yes
    60       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     60      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6161      AC_MSG_RESULT([yes])
    6262    else
     
    116116
    117117      if test x"$lx_cbc_found" = x"yes"; then
    118         AC_DEFINE([HAVE_CBC], [1], [Define to 1 if you have CBC.])
     118        AC_DEFINE([LEMON_HAVE_CBC], [1], [Define to 1 if you have CBC.])
    119119        lx_lp_found=yes
    120         AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     120        AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    121121        lx_mip_found=yes
    122         AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     122        AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    123123        AC_MSG_RESULT([yes])
    124124      else
  • m4/lx_check_cplex.m4

    r457 r627  
    6262
    6363    if test x"$lx_cplex_found" = x"yes"; then
    64       AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
     64      AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
    6565      lx_lp_found=yes
    66       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     66      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6767      lx_mip_found=yes
    68       AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     68      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    6969      AC_MSG_RESULT([yes])
    7070    else
  • m4/lx_check_glpk.m4

    r459 r627  
    6565
    6666    if test x"$lx_glpk_found" = x"yes"; then
    67       AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
     67      AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    6868      lx_lp_found=yes
    69       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     69      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    7070      lx_mip_found=yes
    71       AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     71      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    7272      AC_MSG_RESULT([yes])
    7373    else
  • m4/lx_check_soplex.m4

    r539 r627  
    5656
    5757    if test x"$lx_soplex_found" = x"yes"; then
    58       AC_DEFINE([HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
     58      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
    5959      lx_lp_found=yes
    60       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     60      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6161      AC_MSG_RESULT([yes])
    6262    else
  • test/CMakeLists.txt

    r621 r627  
    3737  unionfind_test)
    3838
    39 IF(HAVE_LP)
     39IF(LEMON_HAVE_LP)
    4040  ADD_EXECUTABLE(lp_test lp_test.cc)
    4141  SET(LP_TEST_LIBS lemon)
    42   IF(HAVE_GLPK)
     42  IF(LEMON_HAVE_GLPK)
    4343    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    44   ENDIF(HAVE_GLPK)
    45   IF(HAVE_CPLEX)
     44  ENDIF(LEMON_HAVE_GLPK)
     45  IF(LEMON_HAVE_CPLEX)
    4646    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
    47   ENDIF(HAVE_CPLEX)
    48   IF(HAVE_CLP)
     47  ENDIF(LEMON_HAVE_CPLEX)
     48  IF(LEMON_HAVE_CLP)
    4949    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
    50   ENDIF(HAVE_CLP)
     50  ENDIF(LEMON_HAVE_CLP)
    5151  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    5252  ADD_TEST(lp_test lp_test)
    5353
    54   IF(WIN32 AND HAVE_GLPK)
     54  IF(WIN32 AND LEMON_HAVE_GLPK)
    5555    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    5656    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6060      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    6161    )
    62   ENDIF(WIN32 AND HAVE_GLPK)
    63   IF(WIN32 AND HAVE_CPLEX)
     62  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     63  IF(WIN32 AND LEMON_HAVE_CPLEX)
    6464    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    6565    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6767      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    6868    )
    69   ENDIF(WIN32 AND HAVE_CPLEX)
    70 ENDIF(HAVE_LP)
     69  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     70ENDIF(LEMON_HAVE_LP)
    7171
    72 IF(HAVE_MIP)
     72IF(LEMON_HAVE_MIP)
    7373  ADD_EXECUTABLE(mip_test mip_test.cc)
    7474  SET(MIP_TEST_LIBS lemon)
    75   IF(HAVE_GLPK)
     75  IF(LEMON_HAVE_GLPK)
    7676    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    77   ENDIF(HAVE_GLPK)
    78   IF(HAVE_CPLEX)
     77  ENDIF(LEMON_HAVE_GLPK)
     78  IF(LEMON_HAVE_CPLEX)
    7979    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
    80   ENDIF(HAVE_CPLEX)
    81   IF(HAVE_CBC)
     80  ENDIF(LEMON_HAVE_CPLEX)
     81  IF(LEMON_HAVE_CBC)
    8282    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
    83   ENDIF(HAVE_CBC)
     83  ENDIF(LEMON_HAVE_CBC)
    8484  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    8585  ADD_TEST(mip_test mip_test)
    8686
    87   IF(WIN32 AND HAVE_GLPK)
     87  IF(WIN32 AND LEMON_HAVE_GLPK)
    8888    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    8989    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    9393      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    9494    )
    95   ENDIF(WIN32 AND HAVE_GLPK)
    96   IF(WIN32 AND HAVE_CPLEX)
     95  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     96  IF(WIN32 AND LEMON_HAVE_CPLEX)
    9797    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    9898    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    100100      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    101101    )
    102   ENDIF(WIN32 AND HAVE_CPLEX)
    103 ENDIF(HAVE_MIP)
     102  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     103ENDIF(LEMON_HAVE_MIP)
    104104
    105105FOREACH(TEST_NAME ${TESTS})
  • test/lp_test.cc

    r575 r627  
    2626#endif
    2727
    28 #ifdef HAVE_GLPK
     28#ifdef LEMON_HAVE_GLPK
    2929#include <lemon/glpk.h>
    3030#endif
    3131
    32 #ifdef HAVE_CPLEX
     32#ifdef LEMON_HAVE_CPLEX
    3333#include <lemon/cplex.h>
    3434#endif
    3535
    36 #ifdef HAVE_SOPLEX
     36#ifdef LEMON_HAVE_SOPLEX
    3737#include <lemon/soplex.h>
    3838#endif
    3939
    40 #ifdef HAVE_CLP
     40#ifdef LEMON_HAVE_CLP
    4141#include <lemon/clp.h>
    4242#endif
     
    380380  lpTest(lp_skel);
    381381
    382 #ifdef HAVE_GLPK
     382#ifdef LEMON_HAVE_GLPK
    383383  {
    384384    GlpkLp lp_glpk1,lp_glpk2;
     
    389389#endif
    390390
    391 #ifdef HAVE_CPLEX
     391#ifdef LEMON_HAVE_CPLEX
    392392  try {
    393393    CplexLp lp_cplex1,lp_cplex2;
     
    400400#endif
    401401
    402 #ifdef HAVE_SOPLEX
     402#ifdef LEMON_HAVE_SOPLEX
    403403  {
    404404    SoplexLp lp_soplex1,lp_soplex2;
     
    409409#endif
    410410
    411 #ifdef HAVE_CLP
     411#ifdef LEMON_HAVE_CLP
    412412  {
    413413    ClpLp lp_clp1,lp_clp2;
  • test/mip_test.cc

    r575 r627  
    2323#endif
    2424
    25 #ifdef HAVE_CPLEX
     25#ifdef LEMON_HAVE_CPLEX
    2626#include <lemon/cplex.h>
    2727#endif
    2828
    29 #ifdef HAVE_GLPK
     29#ifdef LEMON_HAVE_GLPK
    3030#include <lemon/glpk.h>
    3131#endif
    3232
    33 #ifdef HAVE_CBC
     33#ifdef LEMON_HAVE_CBC
    3434#include <lemon/cbc.h>
    3535#endif
     
    130130{
    131131
    132 #ifdef HAVE_GLPK
     132#ifdef LEMON_HAVE_GLPK
    133133  {
    134134    GlpkMip mip1;
     
    138138#endif
    139139
    140 #ifdef HAVE_CPLEX
     140#ifdef LEMON_HAVE_CPLEX
    141141  try {
    142142    CplexMip mip2;
     
    148148#endif
    149149
    150 #ifdef HAVE_CBC
     150#ifdef LEMON_HAVE_CBC
    151151  {
    152152    CbcMip mip1;
  • tools/dimacs-solver.cc

    r614 r627  
    201201    .boolOption("int","Use 'int' for capacities, costs etc. (default)")
    202202    .optionGroup("datatype","int")
    203 #ifdef HAVE_LONG_LONG
     203#ifdef LEMON_HAVE_LONG_LONG
    204204    .boolOption("long","Use 'long long' for capacities, costs etc.")
    205205    .optionGroup("datatype","long")
     
    268268  else if(ap.given("ldouble"))
    269269    solve<long double>(ap,is,os,desc);
    270 #ifdef HAVE_LONG_LONG
     270#ifdef LEMON_HAVE_LONG_LONG
    271271  else if(ap.given("long"))
    272272    solve<long long>(ap,is,os,desc);
Note: See TracChangeset for help on using the changeset viewer.