COIN-OR::LEMON - Graph Library

Ignore:
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r574 r599  
    1010PROJECT(${PROJECT_NAME})
    1111
    12 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     12SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    1313
    1414INCLUDE(FindDoxygen)
     
    3939
    4040ADD_SUBDIRECTORY(lemon)
    41 ADD_SUBDIRECTORY(demo)
    42 ADD_SUBDIRECTORY(tools)
    43 ADD_SUBDIRECTORY(doc)
    44 ADD_SUBDIRECTORY(test)
     41IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     42  ADD_SUBDIRECTORY(demo)
     43  ADD_SUBDIRECTORY(tools)
     44  ADD_SUBDIRECTORY(doc)
     45  ADD_SUBDIRECTORY(test)
     46ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    4547
    46 IF(WIN32)
    47   SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    48   SET(CPACK_PACKAGE_VENDOR "EGRES")
    49   SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    50     "LEMON - Library of Efficient Models and Optimization in Networks")
    51   SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
     48IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     49  IF(WIN32)
     50    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
     51    SET(CPACK_PACKAGE_VENDOR "EGRES")
     52    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
     53      "LEMON - Library of Efficient Models and Optimization in Networks")
     54    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    5255
    53   SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
     56    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    5457
    55   SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    56     "${PROJECT_NAME} ${PROJECT_VERSION}")
    57   SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    58     "${PROJECT_NAME} ${PROJECT_VERSION}")
     58    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
     59      "${PROJECT_NAME} ${PROJECT_VERSION}")
     60    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
     61      "${PROJECT_NAME} ${PROJECT_VERSION}")
    5962
    60   SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
     63    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    6164
    62   SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    63   SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    64   SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
    65   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
     65    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
     66    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
     67    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
     68    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    6669
    67   SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    68     "C++ header files")
    69   SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    70     "DLL and import library")
    71   SET(CPACK_COMPONENT_BIN_DESCRIPTION
    72     "Command line utilities")
    73   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    74     "Doxygen generated documentation")
     70    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
     71      "C++ header files")
     72    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
     73      "DLL and import library")
     74    SET(CPACK_COMPONENT_BIN_DESCRIPTION
     75      "Command line utilities")
     76    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
     77      "Doxygen generated documentation")
    7578
    76   SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
     79    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    7780
    78   SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    79   SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    80   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
     81    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
     82    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
     83    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    8184
    82   SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
    83     "Components needed to develop software using LEMON")
    84   SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
    85     "Documentation of LEMON")
     85    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
     86      "Components needed to develop software using LEMON")
     87    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
     88      "Documentation of LEMON")
    8689
    87   SET(CPACK_ALL_INSTALL_TYPES Full Developer)
     90    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
    8891
    89   SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
    90   SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
    91   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
     92    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
     93    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
     94    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
    9295
    93   SET(CPACK_GENERATOR "NSIS")
    94   SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
    95   SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
    96   #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
    97   SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
    98   SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
    99   SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
    100   SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
    101   SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
    102   SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
    103     CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
    104     ")
    105   SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
    106     !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
    107     Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
    108     ")
     96    SET(CPACK_GENERATOR "NSIS")
     97    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
     98    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
     99    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
     100    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
     101    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
     102    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
     103    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
     104    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
     105    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
     106      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
     107      ")
     108    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
     109      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
     110      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
     111      ")
    109112
    110   INCLUDE(CPack)
    111 ENDIF(WIN32)
     113    INCLUDE(CPack)
     114  ENDIF(WIN32)
     115ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
  • LICENSE

    r463 r600  
    1 LEMON code without an explicit copyright is covered by the following
     1LEMON code without an explicit copyright notice is covered by the following
    22copyright/license.
    33
     
    55Kutatocsoport (Egervary Combinatorial Optimization Research Group,
    66EGRES).
     7
     8===========================================================================
     9Boost Software License, Version 1.0
     10===========================================================================
    711
    812Permission is hereby granted, free of charge, to any person or organization
     
    2731ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    2832DEALINGS IN THE SOFTWARE.
    29 
    30 ===========================================================================
    31 This license is a verbatim copy of the Boost Software License, Version 1.0.
    32 
    33 
  • NEWS

    r322 r534  
     12009-03-27 LEMON joins to the COIN-OR initiative
     2
     3        COIN-OR (Computational Infrastructure for Operations Research,
     4        http://www.coin-or.org) project is an initiative to spur the
     5        development of open-source software for the operations research
     6        community.
     7
    182008-10-13 Version 1.0 released
    29
  • demo/CMakeLists.txt

    r498 r596  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
    6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    77
    88SET(DEMOS
  • doc/CMakeLists.txt

    r565 r596  
    11SET(PACKAGE_NAME ${PROJECT_NAME})
    22SET(PACKAGE_VERSION ${PROJECT_VERSION})
    3 SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
    4 SET(abs_top_builddir ${CMAKE_BINARY_DIR})
     3SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
     4SET(abs_top_builddir ${PROJECT_BINARY_DIR})
    55
    66CONFIGURE_FILE(
    7   ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
    8   ${CMAKE_BINARY_DIR}/doc/Doxyfile
     7  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
     8  ${PROJECT_BINARY_DIR}/doc/Doxyfile
    99  @ONLY)
    1010
  • lemon/CMakeLists.txt

    r562 r596  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
  • lemon/Makefile.am

    r592 r597  
    1818
    1919lemon_libemon_la_CXXFLAGS = \
     20        $(AM_CXXFLAGS) \
    2021        $(GLPK_CFLAGS) \
    2122        $(CPLEX_CFLAGS) \
  • lemon/cplex.cc

    r587 r598  
    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).
     
    442442
    443443  CplexLp::CplexLp()
    444     : LpBase(), CplexBase(), LpSolver() {}
     444    : LpBase(), LpSolver(), CplexBase() {}
    445445
    446446  CplexLp::CplexLp(const CplexEnv& env)
    447     : LpBase(), CplexBase(env), LpSolver() {}
     447    : LpBase(), LpSolver(), CplexBase(env) {}
    448448
    449449  CplexLp::CplexLp(const CplexLp& other)
    450     : LpBase(), CplexBase(other), LpSolver() {}
     450    : LpBase(), LpSolver(), CplexBase(other) {}
    451451
    452452  CplexLp::~CplexLp() {}
     
    799799
    800800  CplexMip::CplexMip()
    801     : LpBase(), CplexBase(), MipSolver() {
     801    : LpBase(), MipSolver(), CplexBase() {
    802802
    803803#if CPX_VERSION < 800
     
    809809
    810810  CplexMip::CplexMip(const CplexEnv& env)
    811     : LpBase(), CplexBase(env), MipSolver() {
     811    : LpBase(), MipSolver(), CplexBase(env) {
    812812
    813813#if CPX_VERSION < 800
     
    820820
    821821  CplexMip::CplexMip(const CplexMip& other)
    822     : LpBase(), CplexBase(other), MipSolver() {}
     822    : LpBase(), MipSolver(), CplexBase(other) {}
    823823
    824824  CplexMip::~CplexMip() {}
  • lemon/cplex.h

    r587 r598  
    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).
     
    7979  ///
    8080  /// This class implements the common interface of the CPLEX LP and
    81   /// MIP solvers. 
     81  /// MIP solvers.
    8282  /// \ingroup lp_group
    8383  class CplexBase : virtual public LpBase {
     
    236236    virtual ~CplexMip();
    237237
    238   protected:
    239 
    240     virtual CplexMip* _cloneSolver() const;
    241     virtual CplexMip* _newSolver() const;
     238    /// \e
     239    virtual CplexMip* cloneSolver() const;
     240    /// \e
     241    virtual CplexMip* newSolver() const;
     242
     243  protected:
     244
    242245
    243246    virtual const char* _solverName() const;
  • lemon/glpk.cc

    r589 r598  
    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).
     
    532532
    533533  GlpkLp::GlpkLp()
    534     : LpBase(), GlpkBase(), LpSolver() {
     534    : LpBase(), LpSolver(), GlpkBase() {
    535535    messageLevel(MESSAGE_NO_OUTPUT);
    536536  }
    537537
    538538  GlpkLp::GlpkLp(const GlpkLp& other)
    539     : LpBase(other), GlpkBase(other), LpSolver(other) {
     539    : LpBase(other), LpSolver(other), GlpkBase(other) {
    540540    messageLevel(MESSAGE_NO_OUTPUT);
    541541  }
     
    831831
    832832  GlpkMip::GlpkMip()
    833     : LpBase(), GlpkBase(), MipSolver() {
     833    : LpBase(), MipSolver(), GlpkBase() {
    834834    messageLevel(MESSAGE_NO_OUTPUT);
    835835  }
    836836
    837837  GlpkMip::GlpkMip(const GlpkMip& other)
    838     : LpBase(), GlpkBase(other), MipSolver() {
     838    : LpBase(), MipSolver(), GlpkBase(other) {
    839839    messageLevel(MESSAGE_NO_OUTPUT);
    840840  }
  • scripts/unify-sources.sh

    r411 r601  
    8989    if [ "$3" == 'tabs' ]
    9090    then
    91         PATTERN=$(echo -e '\t')
     91        if echo $2 | grep -q -v -E 'Makefile\.am$'
     92        then
     93            PATTERN=$(echo -e '\t')
     94        else
     95            PATTERN='        '
     96        fi
    9297    elif [ "$3" == 'trailing spaces' ]
    9398    then
  • test/CMakeLists.txt

    r590 r596  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
     
    88ENDIF(HAVE_GLPK)
    99
    10 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     10LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    1111
    1212SET(TESTS
  • test/counter_test.cc

    r463 r605  
    1919#include <lemon/counter.h>
    2020#include <vector>
     21#include <sstream>
     22
     23#include "test/test_tools.h"
    2124
    2225using namespace lemon;
     
    2427template <typename T>
    2528void bubbleSort(std::vector<T>& v) {
    26   Counter op("Bubble Sort - Operations: ");
    27   Counter::NoSubCounter as(op, "Assignments: ");
    28   Counter::NoSubCounter co(op, "Comparisons: ");
    29   for (int i = v.size()-1; i > 0; --i) {
    30     for (int j = 0; j < i; ++j) {
    31       if (v[j] > v[j+1]) {
    32         T tmp = v[j];
    33         v[j] = v[j+1];
    34         v[j+1] = tmp;
    35         as += 3;
     29  std::stringstream s1, s2, s3;
     30  {
     31    Counter op("Bubble Sort - Operations: ", s1);
     32    Counter::SubCounter as(op, "Assignments: ", s2);
     33    Counter::SubCounter co(op, "Comparisons: ", s3);
     34    for (int i = v.size()-1; i > 0; --i) {
     35      for (int j = 0; j < i; ++j) {
     36        if (v[j] > v[j+1]) {
     37          T tmp = v[j];
     38          v[j] = v[j+1];
     39          v[j+1] = tmp;
     40          as += 3;
     41        }
     42        ++co;
    3643      }
    37       ++co;
    3844    }
    3945  }
     46  check(s1.str() == "Bubble Sort - Operations: 102\n", "Wrong counter");
     47  check(s2.str() == "Assignments: 57\n", "Wrong subcounter");
     48  check(s3.str() == "Comparisons: 45\n", "Wrong subcounter");
    4049}
    4150
    4251template <typename T>
    4352void insertionSort(std::vector<T>& v) {
    44   Counter op("Insertion Sort - Operations: ");
    45   Counter::NoSubCounter as(op, "Assignments: ");
    46   Counter::NoSubCounter co(op, "Comparisons: ");
    47   for (int i = 1; i < int(v.size()); ++i) {
    48     T value = v[i];
    49     ++as;
    50     int j = i;
    51     while (j > 0 && v[j-1] > value) {
    52       v[j] = v[j-1];
    53       --j;
    54       ++co; ++as;
     53  std::stringstream s1, s2, s3;
     54  {
     55    Counter op("Insertion Sort - Operations: ", s1);
     56    Counter::SubCounter as(op, "Assignments: ", s2);
     57    Counter::SubCounter co(op, "Comparisons: ", s3);
     58    for (int i = 1; i < int(v.size()); ++i) {
     59      T value = v[i];
     60      ++as;
     61      int j = i;
     62      while (j > 0 && v[j-1] > value) {
     63        v[j] = v[j-1];
     64        --j;
     65        ++co; ++as;
     66      }
     67      v[j] = value;
     68      ++as;
    5569    }
    56     v[j] = value;
    57     ++as;
    5870  }
     71  check(s1.str() == "Insertion Sort - Operations: 56\n", "Wrong counter");
     72  check(s2.str() == "Assignments: 37\n", "Wrong subcounter");
     73  check(s3.str() == "Comparisons: 19\n", "Wrong subcounter");
    5974}
    6075
    6176template <typename MyCounter>
    62 void counterTest() {
    63   MyCounter c("Main Counter: ");
    64   c++;
    65   typename MyCounter::SubCounter d(c, "SubCounter: ");
    66   d++;
    67   typename MyCounter::SubCounter::NoSubCounter e(d, "SubSubCounter: ");
    68   e++;
    69   d+=3;
    70   c-=4;
    71   e-=2;
    72   c.reset(2);
    73   c.reset();
     77void counterTest(bool output) {
     78  std::stringstream s1, s2, s3;
     79  {
     80    MyCounter c("Main Counter: ", s1);
     81    c++;
     82    typename MyCounter::SubCounter d(c, "SubCounter: ", s2);
     83    d++;
     84    typename MyCounter::SubCounter::NoSubCounter e(d, "SubSubCounter: ", s3);
     85    e++;
     86    d+=3;
     87    c-=4;
     88    e-=2;
     89    c.reset(2);
     90    c.reset();
     91  }
     92  if (output) {
     93    check(s1.str() == "Main Counter: 3\n", "Wrong Counter");
     94    check(s2.str() == "SubCounter: 3\n", "Wrong SubCounter");
     95    check(s3.str() == "", "Wrong NoSubCounter");
     96  } else {
     97    check(s1.str() == "", "Wrong NoCounter");
     98    check(s2.str() == "", "Wrong SubCounter");
     99    check(s3.str() == "", "Wrong NoSubCounter");
     100  }
    74101}
    75102
     
    81108int main()
    82109{
    83   counterTest<Counter>();
    84   counterTest<NoCounter>();
     110  counterTest<Counter>(true);
     111  counterTest<NoCounter>(false);
    85112
    86113  std::vector<int> x(10);
  • test/lp_test.cc

    r589 r598  
    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).
     
    366366{
    367367  //Test for clone/new
    368  
     368
    369369  LP* lp = new LP();
    370370  LP* lpnew = lp->newSolver();
     
    394394    lpTest(lp_cplex1);
    395395    aTest(lp_cplex2);
     396    cloneTest<CplexLp>();
    396397  } catch (CplexEnv::LicenseError& error) {
    397398#ifdef LEMON_FORCE_CPLEX_CHECK
     
    402403#endif
    403404  }
    404     cloneTest<CplexLp>();
    405405#endif
    406406
  • test/mip_test.cc

    r589 r598  
    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).
     
    110110void cloneTest()
    111111{
    112  
     112
    113113  MIP* mip = new MIP();
    114114  MIP* mipnew = mip->newSolver();
     
    134134    CplexMip mip2;
    135135    aTest(mip2);
     136    cloneTest<CplexMip>();
    136137  } catch (CplexEnv::LicenseError& error) {
    137138#ifdef LEMON_FORCE_CPLEX_CHECK
     
    142143#endif
    143144  }
    144   cloneTest<CplexMip>();
    145145#endif
    146146
  • test/time_measure_test.cc

    r463 r605  
    4040  Timer T;
    4141  unsigned int n;
    42   for(n=0;T.realTime()<1.0;n++) ;
     42  for(n=0;T.realTime()<0.1;n++) ;
    4343  std::cout << T << " (" << n << " time queries)\n";
    44   T.restart();
    45   while(T.realTime()<2.0) ;
    46   std::cout << T << '\n';
     44
    4745  TimeStamp full;
    4846  TimeStamp t;
    49   t=runningTimeTest(f,1,&n,&full);
     47  t=runningTimeTest(f,0.1,&n,&full);
    5048  std::cout << t << " (" << n << " tests)\n";
    5149  std::cout << "Total: " << full << "\n";
    5250
    53   t=runningTimeTest(g,1,&n,&full);
     51  t=runningTimeTest(g,0.1,&n,&full);
    5452  std::cout << t << " (" << n << " tests)\n";
    5553  std::cout << "Total: " << full << "\n";
  • tools/CMakeLists.txt

    r574 r596  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
    3   ${CMAKE_BINARY_DIR}
     2  ${PROJECT_SOURCE_DIR}
     3  ${PROJECT_BINARY_DIR}
    44)
    55
    6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    77
    88ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
     
    2323IF(NOT WIN32)
    2424  INSTALL(
    25     FILES ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
    26     RUNTIME DESTINATION bin
     25    PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
     26    DESTINATION bin
    2727    COMPONENT bin)
    2828ENDIF(NOT WIN32)
  • tools/lemon-0.x-to-1.x.sh

    r489 r602  
    2323        -e "s/UGraph/_Gr_aph_label_/g"\
    2424        -e "s/u[Gg]raph/_gr_aph_label_/g"\
    25         -e "s/\<Graph\>/_Digr_aph_label_/g"\
     25        -e "s/Graph\>/_Digr_aph_label_/g"\
    2626        -e "s/\<graph\>/_digr_aph_label_/g"\
    27         -e "s/\<Graphs\>/_Digr_aph_label_s/g"\
     27        -e "s/Graphs\>/_Digr_aph_label_s/g"\
    2828        -e "s/\<graphs\>/_digr_aph_label_s/g"\
    29         -e "s/_Graph/__Gr_aph_label_/g"\
    30         -e "s/\([Gg]\)raph\([a-z_]\)/_\1r_aph_label_\2/g"\
     29        -e "s/\([Gg]\)raph\([a-z]\)/_\1r_aph_label_\2/g"\
    3130        -e "s/\([a-z_]\)graph/\1_gr_aph_label_/g"\
    3231        -e "s/Graph/_Digr_aph_label_/g"\
     
    3534        -e "s/u[Ee]dge/_ed_ge_label_/g"\
    3635        -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
    37         -e "s/\<Edge\>/_Ar_c_label_/g"\
     36        -e "s/Edge\>/_Ar_c_label_/g"\
    3837        -e "s/\<edge\>/_ar_c_label_/g"\
    39         -e "s/\<Edges\>/_Ar_c_label_s/g"\
     38        -e "s/_edge\>/_ar_c_label_/g"\
     39        -e "s/Edges\>/_Ar_c_label_s/g"\
    4040        -e "s/\<edges\>/_ar_c_label_s/g"\
    41         -e "s/_Edge/__Ed_ge_label_/g"\
    42         -e "s/Edge\([a-z_]\)/_Ed_ge_label_\1/g"\
    43         -e "s/edge\([a-z_]\)/_ed_ge_label_\1/g"\
    44         -e "s/\([a-z_]\)edge/\1_ed_ge_label_/g"\
     41        -e "s/_edges\>/_ar_c_label_s/g"\
     42        -e "s/\([Ee]\)dge\([a-z]\)/_\1d_ge_label_\2/g"\
     43        -e "s/\([a-z]\)edge/\1_ed_ge_label_/g"\
    4544        -e "s/Edge/_Ar_c_label_/g"\
    4645        -e "s/edge/_ar_c_label_/g"\
     
    117116        -e "s/\<DirGraphAdaptor\>/Orienter/g"\
    118117        -e "s/\<dirGraphAdaptor\>/orienter/g"\
     118        -e "s/\<LpCplex\>/CplexLp/g"\
     119        -e "s/\<MipCplex\>/CplexMip/g"\
     120        -e "s/\<LpGlpk\>/GlpkLp/g"\
     121        -e "s/\<MipGlpk\>/GlpkMip/g"\
     122        -e "s/\<LpSoplex\>/SoplexLp/g"\
    119123    <$i > $TMP
    120124    mv $TMP $i
Note: See TracChangeset for help on using the changeset viewer.