Changes in / [962:2da3de1c0ebe:961:4bb9e72e1a41] in lemon-1.2
- Files:
-
- 2 deleted
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r954 r942 67 67 # C4996: 'function': was declared deprecated 68 68 ELSE() 69 SET(CXX_WARNING "-Wall ")69 SET(CXX_WARNING "-Wall -W") 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 -O0" CACHE STRING76 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING 77 77 "Flags used by the C++ compiler during maintainer builds." 78 78 FORCE ) 79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING79 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING 80 80 "Flags used by the C compiler during maintainer builds." 81 81 FORCE ) -
NEWS
r934 r883 1 2011-11-09 Version 1.2.3 released2 3 Bugfix release.4 5 #428: Add missing lemon/lemon.pc.cmake to the release tarball6 #429: Fix VS warnings7 #430: Fix LpBase::Constr two-side limit bug8 9 2011-08-08 Version 1.2.2 released10 11 Bugfix release.12 13 #392: Bug fix in Dfs::start(s,t)14 #414: Fix wrong initialization in Preflow15 #404: Update Doxygen configuration16 #416: Support tests with valgrind17 #418: Better Win CodeBlock/MinGW support18 #419: Backport build environment improvements from the main branch19 - Build of mip_test and lp_test precede the running of the tests20 - Also search for coin libs under ${COIN_ROOT_DIR}/lib/coin21 - Do not look for COIN_VOL libraries22 #382: Allow lgf file without Arc maps23 #417: Bug fix in CostScaling24 25 2010-10-21 Version 1.2.1 released26 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 UndirectedTags34 #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex35 #372: Fix a critical bug in preflow36 37 1 2010-03-19 Version 1.2 released 38 2 -
cmake/FindCOIN.cmake
r951 r920 55 55 ) 56 56 57 FIND_LIBRARY(COIN_ZLIB_LIBRARY58 NAMES z libz59 HINTS ${COIN_ROOT_DIR}/lib/coin60 HINTS ${COIN_ROOT_DIR}/lib61 )62 FIND_LIBRARY(COIN_BZ2_LIBRARY63 NAMES bz2 libbz264 HINTS ${COIN_ROOT_DIR}/lib/coin65 HINTS ${COIN_ROOT_DIR}/lib66 )67 68 57 INCLUDE(FindPackageHandleStandardArgs) 69 58 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG … … 83 72 IF(COIN_FOUND) 84 73 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}) 94 77 ENDIF(COIN_FOUND) 95 78 … … 106 89 COIN_OSI_VOL_LIBRARY 107 90 COIN_VOL_LIBRARY 108 COIN_ZLIB_LIBRARY109 COIN_BZ2_LIBRARY110 91 ) 111 92 -
cmake/FindCPLEX.cmake
r950 r636 3 3 FIND_PATH(CPLEX_INCLUDE_DIR 4 4 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" 7 7 HINTS ${CPLEX_ROOT_DIR}/include 8 8 ) 9 9 FIND_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" 13 13 HINTS ${CPLEX_ROOT_DIR}/bin 14 HINTS ${CPLEX_ROOT_DIR}/lib15 14 ) 16 15 … … 19 18 20 19 FIND_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" 24 22 ) 25 23 -
doc/groups.dox
r884 r880 287 287 288 288 /** 289 @defgroup matrices Matrices 290 @ingroup auxdat 291 \brief Two dimensional data storages implemented in LEMON. 292 293 This group contains two dimensional data storages implemented in LEMON. 294 */ 295 296 /** 289 297 @defgroup algs Algorithms 290 298 \brief This group contains the several algorithms … … 319 327 but the digraph should not contain directed cycles with negative total 320 328 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. 321 333 - \ref Suurballe A successive shortest path algorithm for finding 322 334 arc-disjoint paths between two nodes having minimum total length. … … 352 364 \f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f] 353 365 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. 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. 358 380 359 381 \ref Circulation is a preflow push-relabel algorithm implemented directly … … 412 434 - \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut 413 435 in directed graphs. 436 - \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for 437 calculating minimum cut in undirected graphs. 414 438 - \ref GomoryHu "Gomory-Hu tree computation" for calculating 415 439 all-pairs minimum cut in undirected graphs. … … 474 498 475 499 The 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. 476 510 - \ref MaxMatching Edmond's blossom shrinking algorithm for calculating 477 511 maximum cardinality matching in general graphs. … … 518 552 519 553 /** 554 @defgroup approx Approximation Algorithms 555 @ingroup algs 556 \brief Approximation algorithms. 557 558 This group contains the approximation and heuristic algorithms 559 implemented in LEMON. 560 */ 561 562 /** 520 563 @defgroup auxalg Auxiliary Algorithms 521 564 @ingroup algs … … 546 589 The currently supported solvers are \ref glpk, \ref clp, \ref cbc, 547 590 \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 598 This group adds some helper tools to general optimization framework 599 implemented in LEMON. 600 */ 601 602 /** 603 @defgroup metah Metaheuristics 604 @ingroup gen_opt_group 605 \brief Metaheuristics for LEMON library. 606 607 This group contains some metaheuristic optimization tools. 548 608 */ 549 609 -
doc/lgf.dox
r927 r923 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bfs.h
r954 r877 1252 1252 } 1253 1253 _Visitor& visitor; 1254 Constraints() {}1255 1254 }; 1256 1255 }; -
lemon/bits/graph_adaptor_extender.h
r927 r886 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/path_dump.h
r927 r890 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/bits/solver_bits.h
r956 r877 45 45 void clear() { 46 46 first_item = -1; 47 last_item = -1;48 47 first_free_item = -1; 49 48 items.clear(); -
lemon/bits/windows.cc
r927 r914 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/cbc.cc
r956 r746 26 26 #include <coin/OsiSolverInterface.hpp> 27 27 28 #ifdef COIN_HAS_CLP 28 29 #include "coin/OsiClpSolverInterface.hpp" 30 #endif 31 #ifdef COIN_HAS_OSL 32 #include "coin/OsiOslSolverInterface.hpp" 33 #endif 29 34 30 35 #include "coin/CbcCutGenerator.hpp" … … 266 271 delete _osi_solver; 267 272 } 273 #ifdef COIN_HAS_CLP 268 274 _osi_solver = new OsiClpSolverInterface(); 275 #elif COIN_HAS_OSL 276 _osi_solver = new OsiOslSolverInterface(); 277 #else 278 #error Cannot instantiate Osi solver 279 #endif 269 280 270 281 _osi_solver->loadFromCoinModel(*_prob); … … 318 329 _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover"); 319 330 331 #ifdef COIN_HAS_CLP 320 332 OsiClpSolverInterface* osiclp = 321 333 dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver()); … … 323 335 osiclp->setupForRepeatedUse(2, 0); 324 336 } 337 #endif 325 338 326 339 CbcRounding heuristic1(*_cbc_model); … … 436 449 437 450 _prob = new CoinModel(); 451 rows.clear(); 452 cols.clear(); 438 453 } 439 454 -
lemon/clp.cc
r956 r877 438 438 delete _prob; 439 439 _prob = new ClpSimplex(); 440 rows.clear(); 441 cols.clear(); 440 442 _col_names_ref.clear(); 441 443 _clear_temporals(); -
lemon/concepts/graph_components.h
r954 r877 116 116 const _GraphItem &ia; 117 117 const _GraphItem &ib; 118 Constraints() {}119 118 }; 120 119 }; … … 176 175 177 176 const _Digraph& digraph; 178 Constraints() {}179 177 }; 180 178 }; … … 293 291 294 292 const _Graph& graph; 295 Constraints() {}296 293 }; 297 294 … … 373 370 374 371 const _Digraph& digraph; 375 Constraints() {}376 372 }; 377 373 }; … … 426 422 427 423 const _Graph& graph; 428 Constraints() {}429 424 }; 430 425 }; … … 504 499 } 505 500 const GR& g; 506 Constraints() {}507 501 }; 508 502 }; … … 593 587 const Base& node; 594 588 const GR& graph; 595 Constraints() {}596 589 }; 597 590 }; … … 770 763 771 764 const _Digraph& digraph; 772 Constraints() {}773 765 }; 774 766 }; … … 895 887 896 888 const _Graph& graph; 897 Constraints() {}898 889 }; 899 890 }; … … 953 944 954 945 const _Digraph& digraph; 955 Constraints() {}956 946 }; 957 947 }; … … 995 985 996 986 const _Graph& graph; 997 Constraints() {}998 987 }; 999 988 }; … … 1073 1062 const GR &g; 1074 1063 const typename GraphMap::Value &t; 1075 Constraints() {}1076 1064 }; 1077 1065 … … 1212 1200 1213 1201 const _Digraph& digraph; 1214 Constraints() {}1215 1202 }; 1216 1203 }; … … 1298 1285 1299 1286 const _Graph& graph; 1300 Constraints() {}1301 1287 }; 1302 1288 }; … … 1343 1329 1344 1330 _Digraph& digraph; 1345 Constraints() {}1346 1331 }; 1347 1332 }; … … 1388 1373 1389 1374 _Graph& graph; 1390 Constraints() {}1391 1375 }; 1392 1376 }; … … 1428 1412 1429 1413 _Digraph& digraph; 1430 Constraints() {}1431 1414 }; 1432 1415 }; … … 1468 1451 1469 1452 _Graph& graph; 1470 Constraints() {}1471 1453 }; 1472 1454 }; … … 1497 1479 1498 1480 _Digraph& digraph; 1499 Constraints() {}1500 1481 }; 1501 1482 }; … … 1526 1507 1527 1508 _Graph& graph; 1528 Constraints() {}1529 1509 }; 1530 1510 }; -
lemon/concepts/heap.h
r954 r877 315 315 _Heap& heap; 316 316 ItemIntMap& map; 317 Constraints() {}318 317 }; 319 318 }; -
lemon/concepts/maps.h
r953 r718 69 69 const typename _ReadMap::Key& own_key; 70 70 const _ReadMap& m; 71 Constraints() {}72 71 }; 73 72 … … 111 110 const typename _WriteMap::Value& own_val; 112 111 _WriteMap& m; 113 Constraints() {}114 112 }; 115 113 }; … … 132 130 /// Returns the value associated with the given key. 133 131 Value operator[](const Key &) const { 134 Value *r = 0; 135 return *r; 132 return *static_cast<Value *>(0); 136 133 } 137 134 … … 173 170 /// Returns a reference to the value associated with the given key. 174 171 Reference operator[](const Key &) { 175 Value *r = 0; 176 return *r; 172 return *static_cast<Value *>(0); 177 173 } 178 174 179 175 /// Returns a const reference to the value associated with the given key. 180 176 ConstReference operator[](const Key &) const { 181 Value *r = 0; 182 return *r; 177 return *static_cast<Value *>(0); 183 178 } 184 179 … … 211 206 typename _ReferenceMap::ConstReference own_cref; 212 207 _ReferenceMap& m; 213 Constraints() {}214 208 }; 215 209 }; -
lemon/concepts/path.h
r954 r785 169 169 } 170 170 _Path& p; 171 PathDumperConstraints() {}172 171 }; 173 172 … … 195 194 } 196 195 _Path& p; 197 PathDumperConstraints() {}198 196 }; 199 197 -
lemon/core.h
r960 r942 1850 1850 ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough. 1851 1851 /// 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 1853 1857 { 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 1872 1861 1873 1862 }; -
lemon/cost_scaling.h
r927 r909 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/cplex.cc
r956 r877 471 471 int status; 472 472 _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem"); 473 rows.clear(); 474 cols.clear(); 473 475 } 474 476 -
lemon/dfs.h
r954 r942 1194 1194 } 1195 1195 _Visitor& visitor; 1196 Constraints() {}1197 1196 }; 1198 1197 }; -
lemon/glpk.cc
r956 r877 557 557 void GlpkBase::_clear() { 558 558 glp_erase_prob(lp); 559 rows.clear(); 560 cols.clear(); 559 561 } 560 562 -
lemon/lp_base.h
r956 r933 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 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(); rows.clear(); cols.clear();}1559 void clear() { _clear(); } 1560 1560 1561 1561 /// Sets the message level of the solver -
lemon/maps.h
r927 r915 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/path.h
r958 r877 65 65 Path() {} 66 66 67 /// \brief Copy constructor68 ///69 Path(const Path& cpath) {70 pathCopy(cpath, *this);71 }72 73 67 /// \brief Template copy constructor 74 68 /// … … 78 72 Path(const CPath& cpath) { 79 73 pathCopy(cpath, *this); 80 }81 82 /// \brief Copy assignment83 ///84 Path& operator=(const Path& cpath) {85 pathCopy(cpath, *this);86 return *this;87 74 } 88 75 … … 266 253 SimplePath() {} 267 254 268 /// \brief Copy constructor269 ///270 SimplePath(const SimplePath& cpath) {271 pathCopy(cpath, *this);272 }273 274 255 /// \brief Template copy constructor 275 256 /// … … 279 260 SimplePath(const CPath& cpath) { 280 261 pathCopy(cpath, *this); 281 }282 283 /// \brief Copy assignment284 ///285 SimplePath& operator=(const SimplePath& cpath) {286 pathCopy(cpath, *this);287 return *this;288 262 } 289 263 … … 458 432 ListPath() : first(0), last(0) {} 459 433 460 /// \brief Copy constructor461 ///462 ListPath(const ListPath& cpath) : first(0), last(0) {463 pathCopy(cpath, *this);464 }465 466 434 /// \brief Template copy constructor 467 435 /// … … 478 446 ~ListPath() { 479 447 clear(); 480 }481 482 /// \brief Copy assignment483 ///484 ListPath& operator=(const ListPath& cpath) {485 pathCopy(cpath, *this);486 return *this;487 448 } 488 449 … … 798 759 StaticPath() : len(0), arcs(0) {} 799 760 800 /// \brief Copy constructor801 ///802 StaticPath(const StaticPath& cpath) : arcs(0) {803 pathCopy(cpath, *this);804 }805 806 761 /// \brief Template copy constructor 807 762 /// … … 817 772 ~StaticPath() { 818 773 if (arcs) delete[] arcs; 819 }820 821 /// \brief Copy assignment822 ///823 StaticPath& operator=(const StaticPath& cpath) {824 pathCopy(cpath, *this);825 return *this;826 774 } 827 775 -
lemon/preflow.h
r944 r942 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 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
r960 r942 14 14 SET(TESTS 15 15 adaptors_test 16 arc_look_up_test17 16 bellman_ford_test 18 17 bfs_test … … 88 87 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 89 88 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} 91 90 ) 92 91 ENDIF() … … 130 129 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 131 130 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} 133 132 ) 134 133 ENDIF() -
test/Makefile.am
r944 r942 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.cc82 81 test_heap_test_SOURCES = test/heap_test.cc 83 82 test_kruskal_test_SOURCES = test/kruskal_test.cc 83 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc 84 84 test_lgf_test_SOURCES = test/lgf_test.cc 85 85 test_lp_test_SOURCES = test/lp_test.cc -
test/dfs_test.cc
r944 r942 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 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
r927 r896 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 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
r927 r921 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/lgf_test.cc
r935 r930 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
r956 r932 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 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 57 44 void lpTest(LpSolver& lp) 58 45 { 59 46 60 47 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();75 48 76 49 std::vector<LP::Col> x(10); -
test/maps_test.cc
r927 r915 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/path_test.cc
r957 r440 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 55 41 int main() { 56 42 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 72 43 return 0; 73 44 } -
test/preflow_test.cc
r927 r902 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 15 * Copyright (C) 2003-2010 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.