COIN-OR::LEMON - Graph Library

Changes in / [962:2da3de1c0ebe:961:4bb9e72e1a41] in lemon-1.2


Ignore:
Files:
2 deleted
36 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r954 r942  
    6767    # C4996: 'function': was declared deprecated
    6868  ELSE()
    69     SET(CXX_WARNING "-Wall")
     69    SET(CXX_WARNING "-Wall -W")
    7070  ENDIF()
    7171ENDIF()
     
    7474SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    7575
    76 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
     76SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
    7777    "Flags used by the C++ compiler during maintainer builds."
    7878    FORCE )
    79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
     79SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
    8080    "Flags used by the C compiler during maintainer builds."
    8181    FORCE )
  • NEWS

    r934 r883  
    1 2011-11-09 Version 1.2.3 released
    2 
    3         Bugfix release.
    4 
    5         #428: Add missing lemon/lemon.pc.cmake to the release tarball
    6         #429: Fix VS warnings
    7         #430: Fix LpBase::Constr two-side limit bug
    8 
    9 2011-08-08 Version 1.2.2 released
    10 
    11         Bugfix release.
    12 
    13         #392: Bug fix in Dfs::start(s,t)
    14         #414: Fix wrong initialization in Preflow
    15         #404: Update Doxygen configuration
    16         #416: Support tests with valgrind
    17         #418: Better Win CodeBlock/MinGW support
    18         #419: Backport build environment improvements from the main branch
    19               - Build of mip_test and lp_test precede the running of the tests
    20               - Also search for coin libs under ${COIN_ROOT_DIR}/lib/coin
    21               - Do not look for COIN_VOL libraries
    22         #382: Allow lgf file without Arc maps
    23         #417: Bug fix in CostScaling
    24 
    25 2010-10-21 Version 1.2.1 released
    26 
    27         Bugfix release.
    28 
    29         #366: Fix Pred[Matrix]MapPath::empty()
    30         #371: Bug fix in (di)graphCopy()
    31               The target graph is cleared before adding nodes and arcs/edges.
    32 
    33         #364: Add missing UndirectedTags
    34         #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex
    35         #372: Fix a critical bug in preflow
    36 
    3712010-03-19 Version 1.2 released
    382
  • cmake/FindCOIN.cmake

    r951 r920  
    5555)
    5656
    57 FIND_LIBRARY(COIN_ZLIB_LIBRARY
    58   NAMES z libz
    59   HINTS ${COIN_ROOT_DIR}/lib/coin
    60   HINTS ${COIN_ROOT_DIR}/lib
    61 )
    62 FIND_LIBRARY(COIN_BZ2_LIBRARY
    63   NAMES bz2 libbz2
    64   HINTS ${COIN_ROOT_DIR}/lib/coin
    65   HINTS ${COIN_ROOT_DIR}/lib
    66 )
    67 
    6857INCLUDE(FindPackageHandleStandardArgs)
    6958FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
     
    8372IF(COIN_FOUND)
    8473  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    85   SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
    86   IF(COIN_ZLIB_LIBRARY)
    87     SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
    88   ENDIF(COIN_ZLIB_LIBRARY)
    89    IF(COIN_BZ2_LIBRARY)
    90     SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
    91   ENDIF(COIN_BZ2_LIBRARY)
    92   SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
    93   SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
     74  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
     75  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
     76  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
    9477ENDIF(COIN_FOUND)
    9578
     
    10689  COIN_OSI_VOL_LIBRARY
    10790  COIN_VOL_LIBRARY
    108   COIN_ZLIB_LIBRARY
    109   COIN_BZ2_LIBRARY
    11091)
    11192
  • cmake/FindCPLEX.cmake

    r950 r636  
    33FIND_PATH(CPLEX_INCLUDE_DIR
    44  ilcplex/cplex.h
    5   PATHS "C:/ILOG/CPLEX/include"
    6   PATHS "/opt/ilog/cplex/include"
     5  PATHS "C:/ILOG/CPLEX91/include"
     6  PATHS "/opt/ilog/cplex91/include"
    77  HINTS ${CPLEX_ROOT_DIR}/include
    88)
    99FIND_LIBRARY(CPLEX_LIBRARY
    10   cplex
    11   PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
    12   PATHS "/opt/ilog/cplex/bin"
     10  cplex91
     11  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
     12  PATHS "/opt/ilog/cplex91/bin"
    1313  HINTS ${CPLEX_ROOT_DIR}/bin
    14   HINTS ${CPLEX_ROOT_DIR}/lib
    1514)
    1615
     
    1918
    2019FIND_PATH(CPLEX_BIN_DIR
    21   cplex.dll
    22   PATHS "C:/ILOG/CPLEX/bin/x86_win32"
    23   HINTS ${CPLEX_ROOT_DIR}/bin
     20  cplex91.dll
     21  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    2422)
    2523
  • doc/groups.dox

    r884 r880  
    287287
    288288/**
     289@defgroup matrices Matrices
     290@ingroup auxdat
     291\brief Two dimensional data storages implemented in LEMON.
     292
     293This group contains two dimensional data storages implemented in LEMON.
     294*/
     295
     296/**
    289297@defgroup algs Algorithms
    290298\brief This group contains the several algorithms
     
    319327   but the digraph should not contain directed cycles with negative total
    320328   length.
     329 - \ref FloydWarshall "Floyd-Warshall" and \ref Johnson "Johnson" algorithms
     330   for solving the \e all-pairs \e shortest \e paths \e problem when arc
     331   lenghts can be either positive or negative, but the digraph should
     332   not contain directed cycles with negative total length.
    321333 - \ref Suurballe A successive shortest path algorithm for finding
    322334   arc-disjoint paths between two nodes having minimum total length.
     
    352364\f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f]
    353365
    354 \ref Preflow is an efficient implementation of Goldberg-Tarjan's
    355 preflow push-relabel algorithm \ref goldberg88newapproach for finding
    356 maximum flows. It also provides functions to query the minimum cut,
    357 which is the dual problem of maximum flow.
     366LEMON contains several algorithms for solving maximum flow problems:
     367- \ref EdmondsKarp Edmonds-Karp algorithm
     368  \ref edmondskarp72theoretical.
     369- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm
     370  \ref goldberg88newapproach.
     371- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees
     372  \ref dinic70algorithm, \ref sleator83dynamic.
     373- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees
     374  \ref goldberg88newapproach, \ref sleator83dynamic.
     375
     376In most cases the \ref Preflow algorithm provides the
     377fastest method for computing a maximum flow. All implementations
     378also provide functions to query the minimum cut, which is the dual
     379problem of maximum flow.
    358380
    359381\ref Circulation is a preflow push-relabel algorithm implemented directly
     
    412434- \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut
    413435  in directed graphs.
     436- \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for
     437  calculating minimum cut in undirected graphs.
    414438- \ref GomoryHu "Gomory-Hu tree computation" for calculating
    415439  all-pairs minimum cut in undirected graphs.
     
    474498
    475499The matching algorithms implemented in LEMON:
     500- \ref MaxBipartiteMatching Hopcroft-Karp augmenting path algorithm
     501  for calculating maximum cardinality matching in bipartite graphs.
     502- \ref PrBipartiteMatching Push-relabel algorithm
     503  for calculating maximum cardinality matching in bipartite graphs.
     504- \ref MaxWeightedBipartiteMatching
     505  Successive shortest path algorithm for calculating maximum weighted
     506  matching and maximum weighted bipartite matching in bipartite graphs.
     507- \ref MinCostMaxBipartiteMatching
     508  Successive shortest path algorithm for calculating minimum cost maximum
     509  matching in bipartite graphs.
    476510- \ref MaxMatching Edmond's blossom shrinking algorithm for calculating
    477511  maximum cardinality matching in general graphs.
     
    518552
    519553/**
     554@defgroup approx Approximation Algorithms
     555@ingroup algs
     556\brief Approximation algorithms.
     557
     558This group contains the approximation and heuristic algorithms
     559implemented in LEMON.
     560*/
     561
     562/**
    520563@defgroup auxalg Auxiliary Algorithms
    521564@ingroup algs
     
    546589The currently supported solvers are \ref glpk, \ref clp, \ref cbc,
    547590\ref cplex, \ref soplex.
     591*/
     592
     593/**
     594@defgroup lp_utils Tools for Lp and Mip Solvers
     595@ingroup lp_group
     596\brief Helper tools to the Lp and Mip solvers.
     597
     598This group adds some helper tools to general optimization framework
     599implemented in LEMON.
     600*/
     601
     602/**
     603@defgroup metah Metaheuristics
     604@ingroup gen_opt_group
     605\brief Metaheuristics for LEMON library.
     606
     607This group contains some metaheuristic optimization tools.
    548608*/
    549609
  • doc/lgf.dox

    r927 r923  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/bfs.h

    r954 r877  
    12521252      }
    12531253      _Visitor& visitor;
    1254       Constraints() {}
    12551254    };
    12561255  };
  • lemon/bits/graph_adaptor_extender.h

    r927 r886  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/bits/path_dump.h

    r927 r890  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/bits/solver_bits.h

    r956 r877  
    4545      void clear() {
    4646        first_item = -1;
    47         last_item = -1;
    4847        first_free_item = -1;
    4948        items.clear();
  • lemon/bits/windows.cc

    r927 r914  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/cbc.cc

    r956 r746  
    2626#include <coin/OsiSolverInterface.hpp>
    2727
     28#ifdef COIN_HAS_CLP
    2829#include "coin/OsiClpSolverInterface.hpp"
     30#endif
     31#ifdef COIN_HAS_OSL
     32#include "coin/OsiOslSolverInterface.hpp"
     33#endif
    2934
    3035#include "coin/CbcCutGenerator.hpp"
     
    266271      delete _osi_solver;
    267272    }
     273#ifdef COIN_HAS_CLP
    268274    _osi_solver = new OsiClpSolverInterface();
     275#elif COIN_HAS_OSL
     276    _osi_solver = new OsiOslSolverInterface();
     277#else
     278#error Cannot instantiate Osi solver
     279#endif
    269280
    270281    _osi_solver->loadFromCoinModel(*_prob);
     
    318329      _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover");
    319330
     331#ifdef COIN_HAS_CLP
    320332      OsiClpSolverInterface* osiclp =
    321333        dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver());
     
    323335        osiclp->setupForRepeatedUse(2, 0);
    324336      }
     337#endif
    325338
    326339      CbcRounding heuristic1(*_cbc_model);
     
    436449
    437450    _prob = new CoinModel();
     451    rows.clear();
     452    cols.clear();
    438453  }
    439454
  • lemon/clp.cc

    r956 r877  
    438438    delete _prob;
    439439    _prob = new ClpSimplex();
     440    rows.clear();
     441    cols.clear();
    440442    _col_names_ref.clear();
    441443    _clear_temporals();
  • lemon/concepts/graph_components.h

    r954 r877  
    116116        const _GraphItem &ia;
    117117        const _GraphItem &ib;
    118         Constraints() {}
    119118      };
    120119    };
     
    176175
    177176        const _Digraph& digraph;
    178         Constraints() {}
    179177      };
    180178    };
     
    293291
    294292        const _Graph& graph;
    295       Constraints() {}
    296293      };
    297294
     
    373370
    374371        const _Digraph& digraph;
    375         Constraints() {}
    376372      };
    377373    };
     
    426422
    427423        const _Graph& graph;
    428         Constraints() {}
    429424      };
    430425    };
     
    504499        }
    505500        const GR& g;
    506         Constraints() {}
    507501      };
    508502    };
     
    593587        const Base& node;
    594588        const GR& graph;
    595         Constraints() {}
    596589      };
    597590    };
     
    770763
    771764        const _Digraph& digraph;
    772         Constraints() {}
    773765      };
    774766    };
     
    895887
    896888        const _Graph& graph;
    897         Constraints() {}
    898889      };
    899890    };
     
    953944
    954945        const _Digraph& digraph;
    955         Constraints() {}
    956946      };
    957947    };
     
    995985
    996986        const _Graph& graph;
    997         Constraints() {}
    998987      };
    999988    };
     
    10731062        const GR &g;
    10741063        const typename GraphMap::Value &t;
    1075         Constraints() {}
    10761064      };
    10771065
     
    12121200
    12131201        const _Digraph& digraph;
    1214         Constraints() {}
    12151202      };
    12161203    };
     
    12981285
    12991286        const _Graph& graph;
    1300         Constraints() {}
    13011287      };
    13021288    };
     
    13431329
    13441330        _Digraph& digraph;
    1345         Constraints() {}
    13461331      };
    13471332    };
     
    13881373
    13891374        _Graph& graph;
    1390         Constraints() {}
    13911375      };
    13921376    };
     
    14281412
    14291413        _Digraph& digraph;
    1430         Constraints() {}
    14311414      };
    14321415    };
     
    14681451
    14691452        _Graph& graph;
    1470         Constraints() {}
    14711453      };
    14721454    };
     
    14971479
    14981480        _Digraph& digraph;
    1499         Constraints() {}
    15001481      };
    15011482    };
     
    15261507
    15271508        _Graph& graph;
    1528         Constraints() {}
    15291509      };
    15301510    };
  • lemon/concepts/heap.h

    r954 r877  
    315315        _Heap& heap;
    316316        ItemIntMap& map;
    317         Constraints() {}
    318317      };
    319318    };
  • lemon/concepts/maps.h

    r953 r718  
    6969        const typename _ReadMap::Key& own_key;
    7070        const _ReadMap& m;
    71         Constraints() {}
    7271      };
    7372
     
    111110        const typename _WriteMap::Value& own_val;
    112111        _WriteMap& m;
    113         Constraints() {}
    114112      };
    115113    };
     
    132130      /// Returns the value associated with the given key.
    133131      Value operator[](const Key &) const {
    134         Value *r = 0;
    135         return *r;
     132        return *static_cast<Value *>(0);
    136133      }
    137134
     
    173170      /// Returns a reference to the value associated with the given key.
    174171      Reference operator[](const Key &) {
    175         Value *r = 0;
    176         return *r;
     172        return *static_cast<Value *>(0);
    177173      }
    178174
    179175      /// Returns a const reference to the value associated with the given key.
    180176      ConstReference operator[](const Key &) const {
    181         Value *r = 0;
    182         return *r;
     177        return *static_cast<Value *>(0);
    183178      }
    184179
     
    211206        typename _ReferenceMap::ConstReference own_cref;
    212207        _ReferenceMap& m;
    213         Constraints() {}
    214208      };
    215209    };
  • lemon/concepts/path.h

    r954 r785  
    169169        }
    170170        _Path& p;
    171         PathDumperConstraints() {}
    172171      };
    173172
     
    195194        }
    196195        _Path& p;
    197         PathDumperConstraints() {}
    198196      };
    199197
  • lemon/core.h

    r960 r942  
    18501850    ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
    18511851    ///
    1852     Arc operator()(Node s, Node t, Arc prev=INVALID) const
     1852#ifdef DOXYGEN
     1853    Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
     1854#else
     1855    using ArcLookUp<GR>::operator() ;
     1856    Arc operator()(Node s, Node t, Arc prev) const
    18531857    {
    1854       if(prev==INVALID)
    1855         {
    1856           Arc f=INVALID;
    1857           Arc e;
    1858           for(e=_head[s];
    1859               e!=INVALID&&_g.target(e)!=t;
    1860               e = t < _g.target(e)?_left[e]:_right[e]) ;
    1861           while(e!=INVALID)
    1862             if(_g.target(e)==t)
    1863               {
    1864                 f = e;
    1865                 e = _left[e];
    1866               }
    1867             else e = _right[e];
    1868           return f;
    1869         }
    1870       else return _next[prev];
    1871     }
     1858      return prev==INVALID?(*this)(s,t):_next[prev];
     1859    }
     1860#endif
    18721861
    18731862  };
  • lemon/cost_scaling.h

    r927 r909  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/cplex.cc

    r956 r877  
    471471    int status;
    472472    _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem");
     473    rows.clear();
     474    cols.clear();
    473475  }
    474476
  • lemon/dfs.h

    r954 r942  
    11941194      }
    11951195      _Visitor& visitor;
    1196       Constraints() {}
    11971196    };
    11981197  };
  • lemon/glpk.cc

    r956 r877  
    557557  void GlpkBase::_clear() {
    558558    glp_erase_prob(lp);
     559    rows.clear();
     560    cols.clear();
    559561  }
    560562
  • lemon/lp_base.h

    r956 r933  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    15571557
    15581558    ///Clears the problem
    1559     void clear() { _clear(); rows.clear(); cols.clear(); }
     1559    void clear() { _clear(); }
    15601560
    15611561    /// Sets the message level of the solver
  • lemon/maps.h

    r927 r915  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/path.h

    r958 r877  
    6565    Path() {}
    6666
    67     /// \brief Copy constructor
    68     ///
    69     Path(const Path& cpath) {
    70       pathCopy(cpath, *this);
    71     }
    72 
    7367    /// \brief Template copy constructor
    7468    ///
     
    7872    Path(const CPath& cpath) {
    7973      pathCopy(cpath, *this);
    80     }
    81 
    82     /// \brief Copy assignment
    83     ///
    84     Path& operator=(const Path& cpath) {
    85       pathCopy(cpath, *this);
    86       return *this;
    8774    }
    8875
     
    266253    SimplePath() {}
    267254
    268     /// \brief Copy constructor
    269     ///
    270     SimplePath(const SimplePath& cpath) {
    271       pathCopy(cpath, *this);
    272     }
    273 
    274255    /// \brief Template copy constructor
    275256    ///
     
    279260    SimplePath(const CPath& cpath) {
    280261      pathCopy(cpath, *this);
    281     }
    282 
    283     /// \brief Copy assignment
    284     ///
    285     SimplePath& operator=(const SimplePath& cpath) {
    286       pathCopy(cpath, *this);
    287       return *this;
    288262    }
    289263
     
    458432    ListPath() : first(0), last(0) {}
    459433
    460     /// \brief Copy constructor
    461     ///
    462     ListPath(const ListPath& cpath) : first(0), last(0) {
    463       pathCopy(cpath, *this);
    464     }
    465 
    466434    /// \brief Template copy constructor
    467435    ///
     
    478446    ~ListPath() {
    479447      clear();
    480     }
    481 
    482     /// \brief Copy assignment
    483     ///
    484     ListPath& operator=(const ListPath& cpath) {
    485       pathCopy(cpath, *this);
    486       return *this;
    487448    }
    488449
     
    798759    StaticPath() : len(0), arcs(0) {}
    799760
    800     /// \brief Copy constructor
    801     ///
    802     StaticPath(const StaticPath& cpath) : arcs(0) {
    803       pathCopy(cpath, *this);
    804     }
    805 
    806761    /// \brief Template copy constructor
    807762    ///
     
    817772    ~StaticPath() {
    818773      if (arcs) delete[] arcs;
    819     }
    820 
    821     /// \brief Copy assignment
    822     ///
    823     StaticPath& operator=(const StaticPath& cpath) {
    824       pathCopy(cpath, *this);
    825       return *this;
    826774    }
    827775
  • lemon/preflow.h

    r944 r942  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    555555        }
    556556      }
    557       for (NodeIt n(_graph); n != INVALID; ++n)
     557      for (NodeIt n(_graph); n != INVALID; ++n) 
    558558        if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n]))
    559559          _level->activate(n);
    560 
     560         
    561561      return true;
    562562    }
     
    586586          level = _level->highestActiveLevel();
    587587          --num;
    588 
     588         
    589589          Value excess = (*_excess)[n];
    590590          int new_level = _level->maxLevel();
  • test/CMakeLists.txt

    r960 r942  
    1414SET(TESTS
    1515  adaptors_test
    16   arc_look_up_test
    1716  bellman_ford_test
    1817  bfs_test
     
    8887    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    8988    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    90       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
     89      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    9190    )
    9291  ENDIF()
     
    130129    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    131130    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    132       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
     131      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    133132    )
    134133  ENDIF()
  • test/Makefile.am

    r944 r942  
    7979test_graph_test_SOURCES = test/graph_test.cc
    8080test_graph_utils_test_SOURCES = test/graph_utils_test.cc
    81 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
    8281test_heap_test_SOURCES = test/heap_test.cc
    8382test_kruskal_test_SOURCES = test/kruskal_test.cc
     83test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
    8484test_lgf_test_SOURCES = test/lgf_test.cc
    8585test_lp_test_SOURCES = test/lp_test.cc
  • test/dfs_test.cc

    r944 r942  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    220220  check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
    221221  }
    222 
     222 
    223223  {
    224224    NullMap<Node,Arc> myPredMap;
  • test/graph_copy_test.cc

    r927 r896  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    7171    nodeCrossRef(ncr).arcCrossRef(ecr).
    7272    node(fn, tn).arc(fa, ta).run();
    73 
     73 
    7474  check(countNodes(from) == countNodes(to), "Wrong copy.");
    7575  check(countArcs(from) == countArcs(to), "Wrong copy.");
     
    9999  // Test repeated copy
    100100  digraphCopy(from, to).run();
    101 
     101 
    102102  check(countNodes(from) == countNodes(to), "Wrong copy.");
    103103  check(countArcs(from) == countArcs(to), "Wrong copy.");
     
    201201  // Test repeated copy
    202202  graphCopy(from, to).run();
    203 
     203 
    204204  check(countNodes(from) == countNodes(to), "Wrong copy.");
    205205  check(countEdges(from) == countEdges(to), "Wrong copy.");
  • test/heap_test.cc

    r927 r921  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • test/lgf_test.cc

    r935 r930  
    6464
    6565
    66 int main()
     66int main() 
    6767{
    6868  {
    69     ListDigraph d;
     69    ListDigraph d; 
    7070    ListDigraph::Node s,t;
    7171    ListDigraph::ArcMap<int> label(d);
     
    9494
    9595  {
    96     ListDigraph d;
     96    ListDigraph d; 
    9797    std::istringstream input(test_lgf_nomap);
    9898    digraphReader(d, input).
     
    111111
    112112  {
    113     ListDigraph d;
     113    ListDigraph d; 
    114114    std::istringstream input(test_lgf_bad1);
    115115    bool ok=false;
     
    118118        run();
    119119    }
    120     catch (FormatError&)
     120    catch (FormatError&) 
    121121      {
    122122        ok = true;
     
    140140
    141141  {
    142     ListDigraph d;
     142    ListDigraph d; 
    143143    std::istringstream input(test_lgf_bad2);
    144144    bool ok=false;
  • test/lp_test.cc

    r956 r932  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    4242using namespace lemon;
    4343
    44 int countCols(LpBase & lp) {
    45   int count=0;
    46   for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
    47   return count;
    48 }
    49 
    50 int countRows(LpBase & lp) {
    51   int count=0;
    52   for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
    53   return count;
    54 }
    55 
    56 
    5744void lpTest(LpSolver& lp)
    5845{
    5946
    6047  typedef LpSolver LP;
    61 
    62   // Test LpBase::clear()
    63   check(countRows(lp)==0, "Wrong number of rows");
    64   check(countCols(lp)==0, "Wrong number of cols");
    65   lp.addCol(); lp.addRow(); lp.addRow();
    66   check(countRows(lp)==2, "Wrong number of rows");
    67   check(countCols(lp)==1, "Wrong number of cols");
    68   lp.clear();
    69   check(countRows(lp)==0, "Wrong number of rows");
    70   check(countCols(lp)==0, "Wrong number of cols");
    71   lp.addCol(); lp.addCol(); lp.addCol(); lp.addRow();
    72   check(countRows(lp)==1, "Wrong number of rows");
    73   check(countCols(lp)==3, "Wrong number of cols");
    74   lp.clear();
    7548
    7649  std::vector<LP::Col> x(10);
  • test/maps_test.cc

    r927 r915  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • test/path_test.cc

    r957 r440  
    3939}
    4040
    41 // Check if proper copy consructor is called (use valgrind for testing)
    42 template<class _Path>
    43 void checkCopy()
    44 {
    45   ListDigraph g;
    46   ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
    47  
    48   _Path p,q;
    49   p.addBack(a);
    50   q=p;
    51   _Path r(p);
    52   StaticPath<ListDigraph> s(r);
    53 }
    54  
    5541int main() {
    5642  check_concepts();
    57 
    58   checkCopy<Path<ListDigraph> >();
    59   checkCopy<SimplePath<ListDigraph> >();
    60   checkCopy<ListPath<ListDigraph> >();
    61 
    62   ListDigraph g;
    63   ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
    64  
    65   Path<ListDigraph> p;
    66   StaticPath<ListDigraph> q,r;
    67   p.addBack(a);
    68   q=p;
    69   r=q;
    70   StaticPath<ListDigraph> s(q);
    71 
    7243  return 0;
    7344}
  • test/preflow_test.cc

    r927 r902  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    160160{
    161161  DIGRAPH_TYPEDEFS(SmartDigraph);
    162 
     162 
    163163  SmartDigraph g;
    164164  SmartDigraph::ArcMap<int> cap(g),iflow(g);
     
    272272
    273273  initFlowTest();
    274 
     274 
    275275  return 0;
    276276}
Note: See TracChangeset for help on using the changeset viewer.