Changes in / [1153:4bb9e72e1a41:1154:2da3de1c0ebe] in lemon
- Files:
-
- 2 added
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1107 r1127 67 67 # C4996: 'function': was declared deprecated 68 68 ELSE() 69 SET(CXX_WARNING "-Wall -W")69 SET(CXX_WARNING "-Wall") 70 70 ENDIF() 71 71 ENDIF() … … 74 74 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}") 75 75 76 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb " CACHE STRING76 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING 77 77 "Flags used by the C++ compiler during maintainer builds." 78 78 FORCE ) 79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror " CACHE STRING79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING 80 80 "Flags used by the C compiler during maintainer builds." 81 81 FORCE ) -
NEWS
r962 r1099 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 1 37 2010-03-19 Version 1.2 released 2 38 -
cmake/FindCOIN.cmake
r1063 r1120 55 55 ) 56 56 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 57 68 INCLUDE(FindPackageHandleStandardArgs) 58 69 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG … … 72 83 IF(COIN_FOUND) 73 84 SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR}) 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}) 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}) 77 94 ENDIF(COIN_FOUND) 78 95 … … 89 106 COIN_OSI_VOL_LIBRARY 90 107 COIN_VOL_LIBRARY 108 COIN_ZLIB_LIBRARY 109 COIN_BZ2_LIBRARY 91 110 ) 92 111 -
cmake/FindCPLEX.cmake
r683 r1119 3 3 FIND_PATH(CPLEX_INCLUDE_DIR 4 4 ilcplex/cplex.h 5 PATHS "C:/ILOG/CPLEX 91/include"6 PATHS "/opt/ilog/cplex 91/include"5 PATHS "C:/ILOG/CPLEX/include" 6 PATHS "/opt/ilog/cplex/include" 7 7 HINTS ${CPLEX_ROOT_DIR}/include 8 8 ) 9 9 FIND_LIBRARY(CPLEX_LIBRARY 10 cplex 9111 PATHS "C:/ILOG/CPLEX 91/lib/msvc7/stat_mda"12 PATHS "/opt/ilog/cplex 91/bin"10 cplex 11 PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda" 12 PATHS "/opt/ilog/cplex/bin" 13 13 HINTS ${CPLEX_ROOT_DIR}/bin 14 HINTS ${CPLEX_ROOT_DIR}/lib 14 15 ) 15 16 … … 18 19 19 20 FIND_PATH(CPLEX_BIN_DIR 20 cplex91.dll 21 PATHS "C:/ILOG/CPLEX91/bin/x86_win32" 21 cplex.dll 22 PATHS "C:/ILOG/CPLEX/bin/x86_win32" 23 HINTS ${CPLEX_ROOT_DIR}/bin 22 24 ) 23 25 -
doc/groups.dox
r959 r963 287 287 288 288 /** 289 @defgroup matrices Matrices290 @ingroup auxdat291 \brief Two dimensional data storages implemented in LEMON.292 293 This group contains two dimensional data storages implemented in LEMON.294 */295 296 /**297 289 @defgroup algs Algorithms 298 290 \brief This group contains the several algorithms … … 327 319 but the digraph should not contain directed cycles with negative total 328 320 length. 329 - \ref FloydWarshall "Floyd-Warshall" and \ref Johnson "Johnson" algorithms330 for solving the \e all-pairs \e shortest \e paths \e problem when arc331 lenghts can be either positive or negative, but the digraph should332 not contain directed cycles with negative total length.333 321 - \ref Suurballe A successive shortest path algorithm for finding 334 322 arc-disjoint paths between two nodes having minimum total length. … … 364 352 \f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f] 365 353 366 LEMON 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 376 In most cases the \ref Preflow algorithm provides the 377 fastest method for computing a maximum flow. All implementations 378 also provide functions to query the minimum cut, which is the dual 379 problem of maximum flow. 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. 380 358 381 359 \ref Circulation is a preflow push-relabel algorithm implemented directly … … 434 412 - \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut 435 413 in directed graphs. 436 - \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for437 calculating minimum cut in undirected graphs.438 414 - \ref GomoryHu "Gomory-Hu tree computation" for calculating 439 415 all-pairs minimum cut in undirected graphs. … … 498 474 499 475 The matching algorithms implemented in LEMON: 500 - \ref MaxBipartiteMatching Hopcroft-Karp augmenting path algorithm501 for calculating maximum cardinality matching in bipartite graphs.502 - \ref PrBipartiteMatching Push-relabel algorithm503 for calculating maximum cardinality matching in bipartite graphs.504 - \ref MaxWeightedBipartiteMatching505 Successive shortest path algorithm for calculating maximum weighted506 matching and maximum weighted bipartite matching in bipartite graphs.507 - \ref MinCostMaxBipartiteMatching508 Successive shortest path algorithm for calculating minimum cost maximum509 matching in bipartite graphs.510 476 - \ref MaxMatching Edmond's blossom shrinking algorithm for calculating 511 477 maximum cardinality matching in general graphs. … … 552 518 553 519 /** 554 @defgroup approx Approximation Algorithms555 @ingroup algs556 \brief Approximation algorithms.557 558 This group contains the approximation and heuristic algorithms559 implemented in LEMON.560 */561 562 /**563 520 @defgroup auxalg Auxiliary Algorithms 564 521 @ingroup algs … … 589 546 The currently supported solvers are \ref glpk, \ref clp, \ref cbc, 590 547 \ref cplex, \ref soplex. 591 */592 593 /**594 @defgroup lp_utils Tools for Lp and Mip Solvers595 @ingroup lp_group596 \brief Helper tools to the Lp and Mip solvers.597 598 This group adds some helper tools to general optimization framework599 implemented in LEMON.600 */601 602 /**603 @defgroup metah Metaheuristics604 @ingroup gen_opt_group605 \brief Metaheuristics for LEMON library.606 607 This group contains some metaheuristic optimization tools.608 548 */ 609 549 -
doc/lgf.dox
r1069 r1081 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bfs.h
r956 r1127 1252 1252 } 1253 1253 _Visitor& visitor; 1254 Constraints() {} 1254 1255 }; 1255 1256 }; -
lemon/bits/graph_adaptor_extender.h
r965 r1081 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/path_dump.h
r973 r1081 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/solver_bits.h
r956 r1142 45 45 void clear() { 46 46 first_item = -1; 47 last_item = -1; 47 48 first_free_item = -1; 48 49 items.clear(); -
lemon/bits/windows.cc
r1055 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/cbc.cc
r793 r1142 26 26 #include <coin/OsiSolverInterface.hpp> 27 27 28 #ifdef COIN_HAS_CLP29 28 #include "coin/OsiClpSolverInterface.hpp" 30 #endif31 #ifdef COIN_HAS_OSL32 #include "coin/OsiOslSolverInterface.hpp"33 #endif34 29 35 30 #include "coin/CbcCutGenerator.hpp" … … 271 266 delete _osi_solver; 272 267 } 273 #ifdef COIN_HAS_CLP274 268 _osi_solver = new OsiClpSolverInterface(); 275 #elif COIN_HAS_OSL276 _osi_solver = new OsiOslSolverInterface();277 #else278 #error Cannot instantiate Osi solver279 #endif280 269 281 270 _osi_solver->loadFromCoinModel(*_prob); … … 329 318 _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover"); 330 319 331 #ifdef COIN_HAS_CLP332 320 OsiClpSolverInterface* osiclp = 333 321 dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver()); … … 335 323 osiclp->setupForRepeatedUse(2, 0); 336 324 } 337 #endif338 325 339 326 CbcRounding heuristic1(*_cbc_model); … … 449 436 450 437 _prob = new CoinModel(); 451 rows.clear();452 cols.clear();453 438 } 454 439 -
lemon/clp.cc
r956 r1142 438 438 delete _prob; 439 439 _prob = new ClpSimplex(); 440 rows.clear();441 cols.clear();442 440 _col_names_ref.clear(); 443 441 _clear_temporals(); -
lemon/concepts/graph_components.h
r956 r1127 116 116 const _GraphItem &ia; 117 117 const _GraphItem &ib; 118 Constraints() {} 118 119 }; 119 120 }; … … 175 176 176 177 const _Digraph& digraph; 178 Constraints() {} 177 179 }; 178 180 }; … … 291 293 292 294 const _Graph& graph; 295 Constraints() {} 293 296 }; 294 297 … … 370 373 371 374 const _Digraph& digraph; 375 Constraints() {} 372 376 }; 373 377 }; … … 422 426 423 427 const _Graph& graph; 428 Constraints() {} 424 429 }; 425 430 }; … … 499 504 } 500 505 const GR& g; 506 Constraints() {} 501 507 }; 502 508 }; … … 587 593 const Base& node; 588 594 const GR& graph; 595 Constraints() {} 589 596 }; 590 597 }; … … 763 770 764 771 const _Digraph& digraph; 772 Constraints() {} 765 773 }; 766 774 }; … … 887 895 888 896 const _Graph& graph; 897 Constraints() {} 889 898 }; 890 899 }; … … 944 953 945 954 const _Digraph& digraph; 955 Constraints() {} 946 956 }; 947 957 }; … … 985 995 986 996 const _Graph& graph; 997 Constraints() {} 987 998 }; 988 999 }; … … 1062 1073 const GR &g; 1063 1074 const typename GraphMap::Value &t; 1075 Constraints() {} 1064 1076 }; 1065 1077 … … 1200 1212 1201 1213 const _Digraph& digraph; 1214 Constraints() {} 1202 1215 }; 1203 1216 }; … … 1285 1298 1286 1299 const _Graph& graph; 1300 Constraints() {} 1287 1301 }; 1288 1302 }; … … 1329 1343 1330 1344 _Digraph& digraph; 1345 Constraints() {} 1331 1346 }; 1332 1347 }; … … 1373 1388 1374 1389 _Graph& graph; 1390 Constraints() {} 1375 1391 }; 1376 1392 }; … … 1412 1428 1413 1429 _Digraph& digraph; 1430 Constraints() {} 1414 1431 }; 1415 1432 }; … … 1451 1468 1452 1469 _Graph& graph; 1470 Constraints() {} 1453 1471 }; 1454 1472 }; … … 1479 1497 1480 1498 _Digraph& digraph; 1499 Constraints() {} 1481 1500 }; 1482 1501 }; … … 1507 1526 1508 1527 _Graph& graph; 1528 Constraints() {} 1509 1529 }; 1510 1530 }; -
lemon/concepts/heap.h
r956 r1127 315 315 _Heap& heap; 316 316 ItemIntMap& map; 317 Constraints() {} 317 318 }; 318 319 }; -
lemon/concepts/maps.h
r765 r1125 69 69 const typename _ReadMap::Key& own_key; 70 70 const _ReadMap& m; 71 Constraints() {} 71 72 }; 72 73 … … 110 111 const typename _WriteMap::Value& own_val; 111 112 _WriteMap& m; 113 Constraints() {} 112 114 }; 113 115 }; … … 130 132 /// Returns the value associated with the given key. 131 133 Value operator[](const Key &) const { 132 return *static_cast<Value *>(0); 134 Value *r = 0; 135 return *r; 133 136 } 134 137 … … 170 173 /// Returns a reference to the value associated with the given key. 171 174 Reference operator[](const Key &) { 172 return *static_cast<Value *>(0); 175 Value *r = 0; 176 return *r; 173 177 } 174 178 175 179 /// Returns a const reference to the value associated with the given key. 176 180 ConstReference operator[](const Key &) const { 177 return *static_cast<Value *>(0); 181 Value *r = 0; 182 return *r; 178 183 } 179 184 … … 206 211 typename _ReferenceMap::ConstReference own_cref; 207 212 _ReferenceMap& m; 213 Constraints() {} 208 214 }; 209 215 }; -
lemon/concepts/path.h
r832 r1127 169 169 } 170 170 _Path& p; 171 PathDumperConstraints() {} 171 172 }; 172 173 … … 194 195 } 195 196 _Path& p; 197 PathDumperConstraints() {} 196 198 }; 197 199 -
lemon/core.h
r1107 r1151 1850 1850 ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough. 1851 1851 /// 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 1852 Arc operator()(Node s, Node t, Arc prev=INVALID) const 1857 1853 { 1858 return prev==INVALID?(*this)(s,t):_next[prev]; 1859 } 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 } 1872 1873 }; 1874 1875 /// @} 1876 1877 } //namespace lemon 1878 1860 1879 #endif 1861 1862 };1863 1864 /// @}1865 1866 } //namespace lemon1867 1868 #endif -
lemon/cost_scaling.h
r1041 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/cplex.cc
r956 r1142 471 471 int status; 472 472 _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem"); 473 rows.clear();474 cols.clear();475 473 } 476 474 -
lemon/dfs.h
r1107 r1127 1194 1194 } 1195 1195 _Visitor& visitor; 1196 Constraints() {} 1196 1197 }; 1197 1198 }; -
lemon/glpk.cc
r956 r1142 557 557 void GlpkBase::_clear() { 558 558 glp_erase_prob(lp); 559 rows.clear();560 cols.clear();561 559 } 562 560 -
lemon/lp_base.h
r1094 r1142 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 1557 1557 1558 1558 ///Clears the problem 1559 void clear() { _clear(); }1559 void clear() { _clear(); rows.clear(); cols.clear(); } 1560 1560 1561 1561 /// Sets the message level of the solver -
lemon/maps.h
r1057 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/path.h
r956 r1146 65 65 Path() {} 66 66 67 /// \brief Copy constructor 68 /// 69 Path(const Path& cpath) { 70 pathCopy(cpath, *this); 71 } 72 67 73 /// \brief Template copy constructor 68 74 /// … … 72 78 Path(const CPath& cpath) { 73 79 pathCopy(cpath, *this); 80 } 81 82 /// \brief Copy assignment 83 /// 84 Path& operator=(const Path& cpath) { 85 pathCopy(cpath, *this); 86 return *this; 74 87 } 75 88 … … 253 266 SimplePath() {} 254 267 268 /// \brief Copy constructor 269 /// 270 SimplePath(const SimplePath& cpath) { 271 pathCopy(cpath, *this); 272 } 273 255 274 /// \brief Template copy constructor 256 275 /// … … 260 279 SimplePath(const CPath& cpath) { 261 280 pathCopy(cpath, *this); 281 } 282 283 /// \brief Copy assignment 284 /// 285 SimplePath& operator=(const SimplePath& cpath) { 286 pathCopy(cpath, *this); 287 return *this; 262 288 } 263 289 … … 432 458 ListPath() : first(0), last(0) {} 433 459 460 /// \brief Copy constructor 461 /// 462 ListPath(const ListPath& cpath) : first(0), last(0) { 463 pathCopy(cpath, *this); 464 } 465 434 466 /// \brief Template copy constructor 435 467 /// … … 446 478 ~ListPath() { 447 479 clear(); 480 } 481 482 /// \brief Copy assignment 483 /// 484 ListPath& operator=(const ListPath& cpath) { 485 pathCopy(cpath, *this); 486 return *this; 448 487 } 449 488 … … 759 798 StaticPath() : len(0), arcs(0) {} 760 799 800 /// \brief Copy constructor 801 /// 802 StaticPath(const StaticPath& cpath) : arcs(0) { 803 pathCopy(cpath, *this); 804 } 805 761 806 /// \brief Template copy constructor 762 807 /// … … 772 817 ~StaticPath() { 773 818 if (arcs) delete[] arcs; 819 } 820 821 /// \brief Copy assignment 822 /// 823 StaticPath& operator=(const StaticPath& cpath) { 824 pathCopy(cpath, *this); 825 return *this; 774 826 } 775 827 -
lemon/preflow.h
r1107 r1110 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 555 555 } 556 556 } 557 for (NodeIt n(_graph); n != INVALID; ++n) 557 for (NodeIt n(_graph); n != INVALID; ++n) 558 558 if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n])) 559 559 _level->activate(n); 560 560 561 561 return true; 562 562 } … … 586 586 level = _level->highestActiveLevel(); 587 587 --num; 588 588 589 589 Value excess = (*_excess)[n]; 590 590 int new_level = _level->maxLevel(); -
test/CMakeLists.txt
r1107 r1151 14 14 SET(TESTS 15 15 adaptors_test 16 arc_look_up_test 16 17 bellman_ford_test 17 18 bfs_test … … 87 88 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 88 89 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD 89 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex 91.dll ${TARGET_PATH}90 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH} 90 91 ) 91 92 ENDIF() … … 129 130 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 130 131 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD 131 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex 91.dll ${TARGET_PATH}132 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH} 132 133 ) 133 134 ENDIF() -
test/Makefile.am
r1107 r1110 79 79 test_graph_test_SOURCES = test/graph_test.cc 80 80 test_graph_utils_test_SOURCES = test/graph_utils_test.cc 81 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc 81 82 test_heap_test_SOURCES = test/heap_test.cc 82 83 test_kruskal_test_SOURCES = test/kruskal_test.cc 83 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc84 84 test_lgf_test_SOURCES = test/lgf_test.cc 85 85 test_lp_test_SOURCES = test/lp_test.cc -
test/dfs_test.cc
r1107 r1110 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 220 220 check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); 221 221 } 222 222 223 223 { 224 224 NullMap<Node,Arc> myPredMap; -
test/graph_copy_test.cc
r984 r1081 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 71 71 nodeCrossRef(ncr).arcCrossRef(ecr). 72 72 node(fn, tn).arc(fa, ta).run(); 73 73 74 74 check(countNodes(from) == countNodes(to), "Wrong copy."); 75 75 check(countArcs(from) == countArcs(to), "Wrong copy."); … … 99 99 // Test repeated copy 100 100 digraphCopy(from, to).run(); 101 101 102 102 check(countNodes(from) == countNodes(to), "Wrong copy."); 103 103 check(countArcs(from) == countArcs(to), "Wrong copy."); … … 201 201 // Test repeated copy 202 202 graphCopy(from, to).run(); 203 203 204 204 check(countNodes(from) == countNodes(to), "Wrong copy."); 205 205 check(countEdges(from) == countEdges(to), "Wrong copy."); -
test/heap_test.cc
r1065 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/lgf_test.cc
r1087 r1097 64 64 65 65 66 int main() 66 int main() 67 67 { 68 68 { 69 ListDigraph d; 69 ListDigraph d; 70 70 ListDigraph::Node s,t; 71 71 ListDigraph::ArcMap<int> label(d); … … 94 94 95 95 { 96 ListDigraph d; 96 ListDigraph d; 97 97 std::istringstream input(test_lgf_nomap); 98 98 digraphReader(d, input). … … 111 111 112 112 { 113 ListDigraph d; 113 ListDigraph d; 114 114 std::istringstream input(test_lgf_bad1); 115 115 bool ok=false; … … 118 118 run(); 119 119 } 120 catch (FormatError&) 120 catch (FormatError&) 121 121 { 122 122 ok = true; … … 140 140 141 141 { 142 ListDigraph d; 142 ListDigraph d; 143 143 std::istringstream input(test_lgf_bad2); 144 144 bool ok=false; -
test/lp_test.cc
r1092 r1141 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 42 42 using namespace lemon; 43 43 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 44 57 void lpTest(LpSolver& lp) 45 58 { 46 59 47 60 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(); 48 75 49 76 std::vector<LP::Col> x(10); -
test/maps_test.cc
r1057 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/path_test.cc
r463 r1144 39 39 } 40 40 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 41 55 int main() { 42 56 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 43 72 return 0; 44 73 } -
test/preflow_test.cc
r1029 r1084 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 160 160 { 161 161 DIGRAPH_TYPEDEFS(SmartDigraph); 162 162 163 163 SmartDigraph g; 164 164 SmartDigraph::ArcMap<int> cap(g),iflow(g); … … 272 272 273 273 initFlowTest(); 274 274 275 275 return 0; 276 276 }
Note: See TracChangeset
for help on using the changeset viewer.