COIN-OR::LEMON - Graph Library

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


Ignore:
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r631 r621  
    1818FIND_PACKAGE(COIN)
    1919
     20ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     21
    2022IF(MSVC)
    2123  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     
    2830
    2931INCLUDE(CheckTypeSize)
    30 CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
     32CHECK_TYPE_SIZE("long long" LONG_LONG)
    3133
    3234ENABLE_TESTING()
  • cmake/FindCOIN.cmake

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

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

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

    r627 r568  
    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([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
     28  AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
    2929fi
    3030
  • lemon/CMakeLists.txt

    r627 r621  
    1919)
    2020
    21 IF(LEMON_HAVE_GLPK)
     21IF(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(LEMON_HAVE_GLPK)
     29ENDIF(HAVE_GLPK)
    3030
    31 IF(LEMON_HAVE_CPLEX)
     31IF(HAVE_CPLEX)
    3232  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    3333  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    34 ENDIF(LEMON_HAVE_CPLEX)
     34ENDIF(HAVE_CPLEX)
    3535
    36 IF(LEMON_HAVE_CLP)
     36IF(HAVE_CLP)
    3737  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    3838  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    39 ENDIF(LEMON_HAVE_CLP)
     39ENDIF(HAVE_CLP)
    4040
    41 IF(LEMON_HAVE_CBC)
     41IF(HAVE_CBC)
    4242  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    4343  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    44 ENDIF(LEMON_HAVE_CBC)
     44ENDIF(HAVE_CBC)
    4545
    4646ADD_LIBRARY(lemon ${LEMON_SOURCES})
     
    5656  COMPONENT headers
    5757  FILES_MATCHING PATTERN "*.h")
    58 
    59 INSTALL(
    60   FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
    61   DESTINATION include/lemon
    62   COMPONENT headers)
  • lemon/Makefile.am

    r630 r611  
    5858        lemon/bfs.h \
    5959        lemon/bin_heap.h \
    60         lemon/cbc.h \
    6160        lemon/circulation.h \
    6261        lemon/clp.h \
    6362        lemon/color.h \
    6463        lemon/concept_check.h \
    65         lemon/config.h \
    6664        lemon/connectivity.h \
    6765        lemon/counter.h \
  • lemon/bits/default_map.h

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

    r627 r621  
    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
     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
  • lemon/config.h.in

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

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

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

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

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

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

    r628 r554  
    11#!/bin/bash
    22
    3 YEAR=`date +%Y`
     3YEAR=`date +2003-%Y`
    44HGROOT=`hg root`
    5 
    6 function hg_year() {
    7     if [ -n "$(hg st $1)" ]; then
    8         echo $YEAR
    9 }
    105
    116# file enumaration modes
     
    197192 * This file is a part of LEMON, a generic C++ optimization library.
    198193 *
    199  * Copyright (C) 2003-"$(hg_year $1)"
     194 * Copyright (C) "$YEAR"
    200195 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    201196 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • test/CMakeLists.txt

    r627 r621  
    3737  unionfind_test)
    3838
    39 IF(LEMON_HAVE_LP)
     39IF(HAVE_LP)
    4040  ADD_EXECUTABLE(lp_test lp_test.cc)
    4141  SET(LP_TEST_LIBS lemon)
    42   IF(LEMON_HAVE_GLPK)
     42  IF(HAVE_GLPK)
    4343    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    44   ENDIF(LEMON_HAVE_GLPK)
    45   IF(LEMON_HAVE_CPLEX)
     44  ENDIF(HAVE_GLPK)
     45  IF(HAVE_CPLEX)
    4646    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
    47   ENDIF(LEMON_HAVE_CPLEX)
    48   IF(LEMON_HAVE_CLP)
     47  ENDIF(HAVE_CPLEX)
     48  IF(HAVE_CLP)
    4949    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
    50   ENDIF(LEMON_HAVE_CLP)
     50  ENDIF(HAVE_CLP)
    5151  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    5252  ADD_TEST(lp_test lp_test)
    5353
    54   IF(WIN32 AND LEMON_HAVE_GLPK)
     54  IF(WIN32 AND 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 LEMON_HAVE_GLPK)
    63   IF(WIN32 AND LEMON_HAVE_CPLEX)
     62  ENDIF(WIN32 AND HAVE_GLPK)
     63  IF(WIN32 AND 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 LEMON_HAVE_CPLEX)
    70 ENDIF(LEMON_HAVE_LP)
     69  ENDIF(WIN32 AND HAVE_CPLEX)
     70ENDIF(HAVE_LP)
    7171
    72 IF(LEMON_HAVE_MIP)
     72IF(HAVE_MIP)
    7373  ADD_EXECUTABLE(mip_test mip_test.cc)
    7474  SET(MIP_TEST_LIBS lemon)
    75   IF(LEMON_HAVE_GLPK)
     75  IF(HAVE_GLPK)
    7676    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    77   ENDIF(LEMON_HAVE_GLPK)
    78   IF(LEMON_HAVE_CPLEX)
     77  ENDIF(HAVE_GLPK)
     78  IF(HAVE_CPLEX)
    7979    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
    80   ENDIF(LEMON_HAVE_CPLEX)
    81   IF(LEMON_HAVE_CBC)
     80  ENDIF(HAVE_CPLEX)
     81  IF(HAVE_CBC)
    8282    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
    83   ENDIF(LEMON_HAVE_CBC)
     83  ENDIF(HAVE_CBC)
    8484  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    8585  ADD_TEST(mip_test mip_test)
    8686
    87   IF(WIN32 AND LEMON_HAVE_GLPK)
     87  IF(WIN32 AND 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 LEMON_HAVE_GLPK)
    96   IF(WIN32 AND LEMON_HAVE_CPLEX)
     95  ENDIF(WIN32 AND HAVE_GLPK)
     96  IF(WIN32 AND 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 LEMON_HAVE_CPLEX)
    103 ENDIF(LEMON_HAVE_MIP)
     102  ENDIF(WIN32 AND HAVE_CPLEX)
     103ENDIF(HAVE_MIP)
    104104
    105105FOREACH(TEST_NAME ${TESTS})
  • test/lp_test.cc

    r631 r575  
    2222#include <lemon/tolerance.h>
    2323
     24#ifdef HAVE_CONFIG_H
    2425#include <lemon/config.h>
    25 
    26 #ifdef LEMON_HAVE_GLPK
     26#endif
     27
     28#ifdef HAVE_GLPK
    2729#include <lemon/glpk.h>
    2830#endif
    2931
    30 #ifdef LEMON_HAVE_CPLEX
     32#ifdef HAVE_CPLEX
    3133#include <lemon/cplex.h>
    3234#endif
    3335
    34 #ifdef LEMON_HAVE_SOPLEX
     36#ifdef HAVE_SOPLEX
    3537#include <lemon/soplex.h>
    3638#endif
    3739
    38 #ifdef LEMON_HAVE_CLP
     40#ifdef HAVE_CLP
    3941#include <lemon/clp.h>
    4042#endif
     
    378380  lpTest(lp_skel);
    379381
    380 #ifdef LEMON_HAVE_GLPK
     382#ifdef HAVE_GLPK
    381383  {
    382384    GlpkLp lp_glpk1,lp_glpk2;
     
    387389#endif
    388390
    389 #ifdef LEMON_HAVE_CPLEX
     391#ifdef HAVE_CPLEX
    390392  try {
    391393    CplexLp lp_cplex1,lp_cplex2;
     
    398400#endif
    399401
    400 #ifdef LEMON_HAVE_SOPLEX
     402#ifdef HAVE_SOPLEX
    401403  {
    402404    SoplexLp lp_soplex1,lp_soplex2;
     
    407409#endif
    408410
    409 #ifdef LEMON_HAVE_CLP
     411#ifdef HAVE_CLP
    410412  {
    411413    ClpLp lp_clp1,lp_clp2;
  • test/mip_test.cc

    r631 r575  
    1919#include "test_tools.h"
    2020
     21#ifdef HAVE_CONFIG_H
    2122#include <lemon/config.h>
     23#endif
    2224
    23 #ifdef LEMON_HAVE_CPLEX
     25#ifdef HAVE_CPLEX
    2426#include <lemon/cplex.h>
    2527#endif
    2628
    27 #ifdef LEMON_HAVE_GLPK
     29#ifdef HAVE_GLPK
    2830#include <lemon/glpk.h>
    2931#endif
    3032
    31 #ifdef LEMON_HAVE_CBC
     33#ifdef HAVE_CBC
    3234#include <lemon/cbc.h>
    3335#endif
     
    128130{
    129131
    130 #ifdef LEMON_HAVE_GLPK
     132#ifdef HAVE_GLPK
    131133  {
    132134    GlpkMip mip1;
     
    136138#endif
    137139
    138 #ifdef LEMON_HAVE_CPLEX
     140#ifdef HAVE_CPLEX
    139141  try {
    140142    CplexMip mip2;
     
    146148#endif
    147149
    148 #ifdef LEMON_HAVE_CBC
     150#ifdef HAVE_CBC
    149151  {
    150152    CbcMip mip1;
  • tools/dimacs-solver.cc

    r627 r614  
    201201    .boolOption("int","Use 'int' for capacities, costs etc. (default)")
    202202    .optionGroup("datatype","int")
    203 #ifdef LEMON_HAVE_LONG_LONG
     203#ifdef 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 LEMON_HAVE_LONG_LONG
     270#ifdef 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.