COIN-OR::LEMON - Graph Library

Changes in / [629:70a356a461a5:633:f5c710df882c] in lemon-main


Ignore:
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r621 r631  
    1818FIND_PACKAGE(COIN)
    1919
    20 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
    21 
    2220IF(MSVC)
    2321  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     
    3028
    3129INCLUDE(CheckTypeSize)
    32 CHECK_TYPE_SIZE("long long" LONG_LONG)
     30CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    3331
    3432ENABLE_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 r630  
    5858        lemon/bfs.h \
    5959        lemon/bin_heap.h \
     60        lemon/cbc.h \
    6061        lemon/circulation.h \
    6162        lemon/clp.h \
    6263        lemon/color.h \
    6364        lemon/concept_check.h \
     65        lemon/config.h \
    6466        lemon/connectivity.h \
    6567        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
  • scripts/unify-sources.sh

    r554 r628  
    11#!/bin/bash
    22
    3 YEAR=`date +2003-%Y`
     3YEAR=`date +%Y`
    44HGROOT=`hg root`
     5
     6function hg_year() {
     7    if [ -n "$(hg st $1)" ]; then
     8        echo $YEAR
     9}
    510
    611# file enumaration modes
     
    192197 * This file is a part of LEMON, a generic C++ optimization library.
    193198 *
    194  * Copyright (C) "$YEAR"
     199 * Copyright (C) 2003-"$(hg_year $1)"
    195200 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    196201 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • 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 r631  
    2222#include <lemon/tolerance.h>
    2323
    24 #ifdef HAVE_CONFIG_H
    2524#include <lemon/config.h>
    26 #endif
    27 
    28 #ifdef HAVE_GLPK
     25
     26#ifdef LEMON_HAVE_GLPK
    2927#include <lemon/glpk.h>
    3028#endif
    3129
    32 #ifdef HAVE_CPLEX
     30#ifdef LEMON_HAVE_CPLEX
    3331#include <lemon/cplex.h>
    3432#endif
    3533
    36 #ifdef HAVE_SOPLEX
     34#ifdef LEMON_HAVE_SOPLEX
    3735#include <lemon/soplex.h>
    3836#endif
    3937
    40 #ifdef HAVE_CLP
     38#ifdef LEMON_HAVE_CLP
    4139#include <lemon/clp.h>
    4240#endif
     
    380378  lpTest(lp_skel);
    381379
    382 #ifdef HAVE_GLPK
     380#ifdef LEMON_HAVE_GLPK
    383381  {
    384382    GlpkLp lp_glpk1,lp_glpk2;
     
    389387#endif
    390388
    391 #ifdef HAVE_CPLEX
     389#ifdef LEMON_HAVE_CPLEX
    392390  try {
    393391    CplexLp lp_cplex1,lp_cplex2;
     
    400398#endif
    401399
    402 #ifdef HAVE_SOPLEX
     400#ifdef LEMON_HAVE_SOPLEX
    403401  {
    404402    SoplexLp lp_soplex1,lp_soplex2;
     
    409407#endif
    410408
    411 #ifdef HAVE_CLP
     409#ifdef LEMON_HAVE_CLP
    412410  {
    413411    ClpLp lp_clp1,lp_clp2;
  • test/mip_test.cc

    r575 r631  
    1919#include "test_tools.h"
    2020
    21 #ifdef HAVE_CONFIG_H
    2221#include <lemon/config.h>
    23 #endif
    2422
    25 #ifdef HAVE_CPLEX
     23#ifdef LEMON_HAVE_CPLEX
    2624#include <lemon/cplex.h>
    2725#endif
    2826
    29 #ifdef HAVE_GLPK
     27#ifdef LEMON_HAVE_GLPK
    3028#include <lemon/glpk.h>
    3129#endif
    3230
    33 #ifdef HAVE_CBC
     31#ifdef LEMON_HAVE_CBC
    3432#include <lemon/cbc.h>
    3533#endif
     
    130128{
    131129
    132 #ifdef HAVE_GLPK
     130#ifdef LEMON_HAVE_GLPK
    133131  {
    134132    GlpkMip mip1;
     
    138136#endif
    139137
    140 #ifdef HAVE_CPLEX
     138#ifdef LEMON_HAVE_CPLEX
    141139  try {
    142140    CplexMip mip2;
     
    148146#endif
    149147
    150 #ifdef HAVE_CBC
     148#ifdef LEMON_HAVE_CBC
    151149  {
    152150    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.