COIN-OR::LEMON - Graph Library

Changeset 627:20dac2104519 in lemon-1.2 for lemon


Ignore:
Timestamp:
04/28/09 14:51:34 (10 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Parents:
626:58357e986a08 (diff), 500:8a144437db7d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge and extend the fix of #275

Location:
lemon
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • lemon/CMakeLists.txt

    r499 r627  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
     2  ${PROJECT_SOURCE_DIR}
    33  ${PROJECT_BINARY_DIR}
    44)
     
    99)
    1010
    11 ADD_LIBRARY(lemon
     11SET(LEMON_SOURCES
    1212  arg_parser.cc
    1313  base.cc
    1414  color.cc
     15  lp_base.cc
     16  lp_skeleton.cc
    1517  random.cc
    1618  bits/windows.cc
    1719)
     20
     21IF(LEMON_HAVE_GLPK)
     22  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
     23  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
     24  IF(WIN32)
     25    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     26    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
     27    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
     28  ENDIF(WIN32)
     29ENDIF(LEMON_HAVE_GLPK)
     30
     31IF(LEMON_HAVE_CPLEX)
     32  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
     33  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
     34ENDIF(LEMON_HAVE_CPLEX)
     35
     36IF(LEMON_HAVE_CLP)
     37  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
     38  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     39ENDIF(LEMON_HAVE_CLP)
     40
     41IF(LEMON_HAVE_CBC)
     42  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
     43  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     44ENDIF(LEMON_HAVE_CBC)
     45
     46ADD_LIBRARY(lemon ${LEMON_SOURCES})
    1847
    1948INSTALL(
  • 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

    r499 r627  
    88
    99lemon_libemon_la_SOURCES = \
    10         lemon/arg_parser.cc \
    11         lemon/base.cc \
    12         lemon/color.cc \
    13         lemon/random.cc \
     10        lemon/arg_parser.cc \
     11        lemon/base.cc \
     12        lemon/color.cc \
     13        lemon/lp_base.cc \
     14        lemon/lp_skeleton.cc \
     15        lemon/random.cc \
    1416        lemon/bits/windows.cc
    1517
    16 #lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS)
    17 #lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS)
     18
     19lemon_libemon_la_CXXFLAGS = \
     20        $(AM_CXXFLAGS) \
     21        $(GLPK_CFLAGS) \
     22        $(CPLEX_CFLAGS) \
     23        $(SOPLEX_CXXFLAGS) \
     24        $(CLP_CXXFLAGS) \
     25        $(CBC_CXXFLAGS)
     26
     27lemon_libemon_la_LDFLAGS = \
     28        $(GLPK_LIBS) \
     29        $(CPLEX_LIBS) \
     30        $(SOPLEX_LIBS) \
     31        $(CLP_LIBS) \
     32        $(CBC_LIBS)
     33
     34if HAVE_GLPK
     35lemon_libemon_la_SOURCES += lemon/glpk.cc
     36endif
     37
     38if HAVE_CPLEX
     39lemon_libemon_la_SOURCES += lemon/cplex.cc
     40endif
     41
     42if HAVE_SOPLEX
     43lemon_libemon_la_SOURCES += lemon/soplex.cc
     44endif
     45
     46if HAVE_CLP
     47lemon_libemon_la_SOURCES += lemon/clp.cc
     48endif
     49
     50if HAVE_CBC
     51lemon_libemon_la_SOURCES += lemon/cbc.cc
     52endif
    1853
    1954lemon_HEADERS += \
    20         lemon/arg_parser.h \
     55        lemon/adaptors.h \
     56        lemon/arg_parser.h \
    2157        lemon/assert.h \
    22         lemon/bfs.h \
    23         lemon/bin_heap.h \
    24         lemon/color.h \
     58        lemon/bfs.h \
     59        lemon/bin_heap.h \
     60        lemon/circulation.h \
     61        lemon/clp.h \
     62        lemon/color.h \
    2563        lemon/concept_check.h \
    2664        lemon/config.h \
    27         lemon/counter.h \
     65        lemon/connectivity.h \
     66        lemon/counter.h \
    2867        lemon/core.h \
    29         lemon/dfs.h \
    30         lemon/dijkstra.h \
    31         lemon/dim2.h \
     68        lemon/cplex.h \
     69        lemon/dfs.h \
     70        lemon/dijkstra.h \
     71        lemon/dim2.h \
     72        lemon/dimacs.h \
     73        lemon/edge_set.h \
     74        lemon/elevator.h \
    3275        lemon/error.h \
    33         lemon/graph_to_eps.h \
     76        lemon/euler.h \
     77        lemon/full_graph.h \
     78        lemon/glpk.h \
     79        lemon/gomory_hu.h \
     80        lemon/graph_to_eps.h \
     81        lemon/grid_graph.h \
     82        lemon/hypercube_graph.h \
    3483        lemon/kruskal.h \
     84        lemon/hao_orlin.h \
    3585        lemon/lgf_reader.h \
    3686        lemon/lgf_writer.h \
    3787        lemon/list_graph.h \
     88        lemon/lp.h \
     89        lemon/lp_base.h \
     90        lemon/lp_skeleton.h \
     91        lemon/list_graph.h \
    3892        lemon/maps.h \
     93        lemon/matching.h \
    3994        lemon/math.h \
     95        lemon/min_cost_arborescence.h \
     96        lemon/nauty_reader.h \
     97        lemon/network_simplex.h \
    4098        lemon/path.h \
    41         lemon/random.h \
     99        lemon/preflow.h \
     100        lemon/radix_sort.h \
     101        lemon/random.h \
    42102        lemon/smart_graph.h \
    43         lemon/time_measure.h \
    44         lemon/tolerance.h \
     103        lemon/soplex.h \
     104        lemon/suurballe.h \
     105        lemon/time_measure.h \
     106        lemon/tolerance.h \
    45107        lemon/unionfind.h \
    46108        lemon/bits/windows.h
     
    50112        lemon/bits/array_map.h \
    51113        lemon/bits/base_extender.h \
    52         lemon/bits/bezier.h \
     114        lemon/bits/bezier.h \
    53115        lemon/bits/default_map.h \
    54         lemon/bits/enable_if.h \
     116        lemon/bits/edge_set_extender.h \
     117        lemon/bits/enable_if.h \
     118        lemon/bits/graph_adaptor_extender.h \
    55119        lemon/bits/graph_extender.h \
    56120        lemon/bits/map_extender.h \
    57121        lemon/bits/path_dump.h \
     122        lemon/bits/solver_bits.h \
    58123        lemon/bits/traits.h \
     124        lemon/bits/variant.h \
    59125        lemon/bits/vector_map.h
    60126
  • 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

    r500 r627  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    154154  class DefaultMap
    155155    : public DefaultMapSelector<_Graph, _Item, _Value>::Map {
     156    typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
     157
    156158  public:
    157     typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
    158159    typedef DefaultMap<_Graph, _Item, _Value> Map;
    159 
    160     typedef typename Parent::Graph Graph;
     160   
     161    typedef typename Parent::GraphType GraphType;
    161162    typedef typename Parent::Value Value;
    162163
    163     explicit DefaultMap(const Graph& graph) : Parent(graph) {}
    164     DefaultMap(const Graph& graph, const Value& value)
     164    explicit DefaultMap(const GraphType& graph) : Parent(graph) {}
     165    DefaultMap(const GraphType& graph, const Value& value)
    165166      : Parent(graph, value) {}
    166167
  • 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

    r500 r627  
    11#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.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

    r500 r627  
     1/* Define to 1 if you have long long */
     2#undef LEMON_HAVE_LONG_LONG
     3
     4/* Define to 1 if you have any LP solver. */
     5#undef LEMON_HAVE_LP
     6
     7/* Define to 1 if you have any MIP solver. */
     8#undef LEMON_HAVE_MIP
     9
    110/* Define to 1 if you have CPLEX. */
    211#undef LEMON_HAVE_CPLEX
     
    514#undef LEMON_HAVE_GLPK
    615
    7 /* Define to 1 if you have long long */
    8 #undef LEMON_HAVE_LONG_LONG
     16/* Define to 1 if you have SOPLEX */
     17#undef LEMON_HAVE_SOPLEX
     18
     19/* Define to 1 if you have CLP */
     20#undef LEMON_HAVE_CLP
     21
     22/* Define to 1 if you have CBC */
     23#undef LEMON_HAVE_CBC
  • 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; 
Note: See TracChangeset for help on using the changeset viewer.