Changes in / [1391:411819b8702c:1403:e5af35e6c93f] in lemon
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1344 r1398 83 83 IF(LEMON_ENABLE_GLPK) 84 84 FIND_PACKAGE(GLPK 4.33) 85 IF(GLPK_FOUND) 86 SET(LEMON_HAVE_LP TRUE) 87 SET(LEMON_HAVE_MIP TRUE) 88 SET(LEMON_HAVE_GLPK TRUE) 89 ENDIF(GLPK_FOUND) 85 90 ENDIF(LEMON_ENABLE_GLPK) 86 91 IF(LEMON_ENABLE_ILOG) 87 92 FIND_PACKAGE(ILOG) 93 IF(ILOG_FOUND) 94 SET(LEMON_HAVE_LP TRUE) 95 SET(LEMON_HAVE_MIP TRUE) 96 SET(LEMON_HAVE_CPLEX TRUE) 97 ENDIF(ILOG_FOUND) 88 98 ENDIF(LEMON_ENABLE_ILOG) 89 99 IF(LEMON_ENABLE_COIN) 90 100 FIND_PACKAGE(COIN) 101 IF(COIN_FOUND) 102 SET(LEMON_HAVE_LP TRUE) 103 SET(LEMON_HAVE_MIP TRUE) 104 SET(LEMON_HAVE_CLP TRUE) 105 SET(LEMON_HAVE_CBC TRUE) 106 ENDIF(COIN_FOUND) 91 107 ENDIF(LEMON_ENABLE_COIN) 92 108 IF(LEMON_ENABLE_SOPLEX) 93 109 FIND_PACKAGE(SOPLEX) 110 IF(SOPLEX_FOUND) 111 SET(LEMON_HAVE_LP TRUE) 112 SET(LEMON_HAVE_SOPLEX TRUE) 113 ENDIF(SOPLEX_FOUND) 94 114 ENDIF(LEMON_ENABLE_SOPLEX) 95 96 IF(GLPK_FOUND)97 SET(LEMON_HAVE_LP TRUE)98 SET(LEMON_HAVE_MIP TRUE)99 SET(LEMON_HAVE_GLPK TRUE)100 ENDIF(GLPK_FOUND)101 IF(ILOG_FOUND)102 SET(LEMON_HAVE_LP TRUE)103 SET(LEMON_HAVE_MIP TRUE)104 SET(LEMON_HAVE_CPLEX TRUE)105 ENDIF(ILOG_FOUND)106 IF(COIN_FOUND)107 SET(LEMON_HAVE_LP TRUE)108 SET(LEMON_HAVE_MIP TRUE)109 SET(LEMON_HAVE_CLP TRUE)110 SET(LEMON_HAVE_CBC TRUE)111 ENDIF(COIN_FOUND)112 IF(SOPLEX_FOUND)113 SET(LEMON_HAVE_LP TRUE)114 SET(LEMON_HAVE_SOPLEX TRUE)115 ENDIF(SOPLEX_FOUND)116 115 117 116 IF(ILOG_FOUND) -
cmake/FindCOIN.cmake
r1232 r1398 66 66 ) 67 67 68 FIND_LIBRARY(COIN_PTHREADS_LIBRARY 69 NAMES pthreads libpthreads 70 HINTS ${COIN_ROOT_DIR}/lib/coin 71 HINTS ${COIN_ROOT_DIR}/lib 72 ) 73 68 74 INCLUDE(FindPackageHandleStandardArgs) 69 75 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG … … 83 89 IF(COIN_FOUND) 84 90 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}")91 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}") 86 92 IF(COIN_ZLIB_LIBRARY) 87 93 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}") … … 90 96 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}") 91 97 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}") 98 IF(COIN_PTHREADS_LIBRARY) 99 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_PTHREADS_LIBRARY}") 100 ENDIF(COIN_PTHREADS_LIBRARY) 101 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_CLP_LIBRARIES}") 93 102 SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES}) 94 103 ENDIF(COIN_FOUND) -
lemon/adaptors.h
r1270 r1402 3447 3447 /// This map adaptor class adapts two node maps of the original digraph 3448 3448 /// to get a node map of the split digraph. 3449 /// Its value type is inherited from the first node map type (\c I N).3450 /// \tparam I NThe type of the node map for the in-nodes.3451 /// \tparam O UTThe type of the node map for the out-nodes.3452 template <typename I N, typename OUT>3449 /// Its value type is inherited from the first node map type (\c In). 3450 /// \tparam In The type of the node map for the in-nodes. 3451 /// \tparam Out The type of the node map for the out-nodes. 3452 template <typename In, typename Out> 3453 3453 class CombinedNodeMap { 3454 3454 public: … … 3457 3457 typedef Node Key; 3458 3458 /// The value type of the map 3459 typedef typename I N::Value Value;3460 3461 typedef typename MapTraits<I N>::ReferenceMapTag ReferenceMapTag;3462 typedef typename MapTraits<I N>::ReturnValue ReturnValue;3463 typedef typename MapTraits<I N>::ConstReturnValue ConstReturnValue;3464 typedef typename MapTraits<I N>::ReturnValue Reference;3465 typedef typename MapTraits<I N>::ConstReturnValue ConstReference;3459 typedef typename In::Value Value; 3460 3461 typedef typename MapTraits<In>::ReferenceMapTag ReferenceMapTag; 3462 typedef typename MapTraits<In>::ReturnValue ReturnValue; 3463 typedef typename MapTraits<In>::ConstReturnValue ConstReturnValue; 3464 typedef typename MapTraits<In>::ReturnValue Reference; 3465 typedef typename MapTraits<In>::ConstReturnValue ConstReference; 3466 3466 3467 3467 /// Constructor 3468 CombinedNodeMap(I N& in_map, OUT& out_map)3468 CombinedNodeMap(In& in_map, Out& out_map) 3469 3469 : _in_map(in_map), _out_map(out_map) {} 3470 3470 … … 3498 3498 private: 3499 3499 3500 I N& _in_map;3501 O UT& _out_map;3500 In& _in_map; 3501 Out& _out_map; 3502 3502 3503 3503 }; … … 3507 3507 /// 3508 3508 /// This function just returns a combined node map. 3509 template <typename I N, typename OUT>3510 static CombinedNodeMap<I N, OUT>3511 combinedNodeMap(I N& in_map, OUT& out_map) {3512 return CombinedNodeMap<I N, OUT>(in_map, out_map);3513 } 3514 3515 template <typename I N, typename OUT>3516 static CombinedNodeMap<const I N, OUT>3517 combinedNodeMap(const I N& in_map, OUT& out_map) {3518 return CombinedNodeMap<const I N, OUT>(in_map, out_map);3519 } 3520 3521 template <typename I N, typename OUT>3522 static CombinedNodeMap<I N, const OUT>3523 combinedNodeMap(I N& in_map, const OUT& out_map) {3524 return CombinedNodeMap<I N, const OUT>(in_map, out_map);3525 } 3526 3527 template <typename I N, typename OUT>3528 static CombinedNodeMap<const I N, const OUT>3529 combinedNodeMap(const I N& in_map, const OUT& out_map) {3530 return CombinedNodeMap<const I N, const OUT>(in_map, out_map);3509 template <typename In, typename Out> 3510 static CombinedNodeMap<In, Out> 3511 combinedNodeMap(In& in_map, Out& out_map) { 3512 return CombinedNodeMap<In, Out>(in_map, out_map); 3513 } 3514 3515 template <typename In, typename Out> 3516 static CombinedNodeMap<const In, Out> 3517 combinedNodeMap(const In& in_map, Out& out_map) { 3518 return CombinedNodeMap<const In, Out>(in_map, out_map); 3519 } 3520 3521 template <typename In, typename Out> 3522 static CombinedNodeMap<In, const Out> 3523 combinedNodeMap(In& in_map, const Out& out_map) { 3524 return CombinedNodeMap<In, const Out>(in_map, out_map); 3525 } 3526 3527 template <typename In, typename Out> 3528 static CombinedNodeMap<const In, const Out> 3529 combinedNodeMap(const In& in_map, const Out& out_map) { 3530 return CombinedNodeMap<const In, const Out>(in_map, out_map); 3531 3531 } 3532 3532 -
lemon/arg_parser.cc
r956 r1397 222 222 { 223 223 Opts::iterator o = _opts.find(opt); 224 Opts::iterator s = _opts.find(syn);225 224 LEMON_ASSERT(o!=_opts.end(), "Unknown option: '"+opt+"'"); 226 LEMON_ASSERT(s==_opts.end(), "Option already used: '"+syn+"'"); 225 LEMON_ASSERT(_opts.find(syn)==_opts.end(), 226 "Option already used: '"+syn+"'"); 227 227 ParData p; 228 228 p.help=opt; -
lemon/planarity.h
r1270 r1400 2384 2384 if (!pe.run()) return false; 2385 2385 2386 run(pe );2386 run(pe.embeddingMap()); 2387 2387 return true; 2388 2388 } … … 2398 2398 void run(const EmbeddingMap& embedding) { 2399 2399 typedef SmartEdgeSet<Graph> AuxGraph; 2400 2401 if (countNodes(_graph) < 3) { 2402 int y = 0; 2403 for (typename Graph::NodeIt n(_graph); n != INVALID; ++n) { 2404 _point_map[n].x = 0; 2405 _point_map[n].y = y++; 2406 } 2407 return; 2408 } 2400 2409 2401 2410 if (3 * countNodes(_graph) - 6 == countEdges(_graph)) { -
lemon/random.h
r1340 r1396 343 343 num = rnd() & mask; 344 344 } while (num > max); 345 return num;345 return static_cast<Result>(num); 346 346 } 347 347 }; -
test/max_flow_test.cc
r1385 r1396 420 420 checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf, 13); 421 421 422 checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3 );422 checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3f); 423 423 checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf_float, 0.3); 424 424 … … 434 434 checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf, 13); 435 435 436 checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3 );436 checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3f); 437 437 checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf_float, 0.3); 438 438 -
test/planarity_test.cc
r862 r1400 31 31 using namespace lemon::dim2; 32 32 33 const int lgfn = 4;33 const int lgfn = 8; 34 34 const std::string lgf[lgfn] = { 35 "@nodes\n" 36 "label\n" 37 "@edges\n" 38 " label\n", 39 40 "@nodes\n" 41 "label\n" 42 "0\n" 43 "@edges\n" 44 " label\n", 45 46 "@nodes\n" 47 "label\n" 48 "0\n" 49 "1\n" 50 "@edges\n" 51 " label\n" 52 "0 1 0\n", 53 54 "@nodes\n" 55 "label\n" 56 "0\n" 57 "1\n" 58 "2\n" 59 "@edges\n" 60 " label\n" 61 "0 1 0\n" 62 "1 2 1\n" 63 "2 0 2\n", 64 35 65 "@nodes\n" 36 66 "label\n" … … 137 167 } 138 168 } 139 check(face_num + countNodes(graph) - countConnectedComponents(graph) == 140 countEdges(graph) + 1, "Euler test does not passed"); 169 170 if (face_num != 0) { 171 check(face_num + countNodes(graph) - countConnectedComponents(graph) == 172 countEdges(graph) + 1, "Euler test does not passed"); 173 } 141 174 } 142 175 … … 246 279 checkEmbedding(graph, pe); 247 280 248 PlanarDrawing<Graph> pd(graph); 249 pd.run(pe.embeddingMap()); 250 checkDrawing(graph, pd); 251 252 PlanarColoring<Graph> pc(graph); 253 pc.runFiveColoring(pe.embeddingMap()); 254 checkColoring(graph, pc, 5); 281 { 282 PlanarDrawing<Graph> pd(graph); 283 pd.run(pe.embeddingMap()); 284 checkDrawing(graph, pd); 285 } 286 287 { 288 PlanarDrawing<Graph> pd(graph); 289 pd.run(); 290 checkDrawing(graph, pd); 291 } 292 293 { 294 PlanarColoring<Graph> pc(graph); 295 pc.runFiveColoring(pe.embeddingMap()); 296 checkColoring(graph, pc, 5); 297 } 298 299 { 300 PlanarColoring<Graph> pc(graph); 301 pc.runFiveColoring(); 302 checkColoring(graph, pc, 5); 303 } 255 304 256 305 } else { -
tools/dimacs-to-lgf.cc
r631 r1397 74 74 throw IoError("Cannot open the file for writing", ap.files()[1]); 75 75 } 76 // fall through 76 77 case 1: 77 78 input.open(ap.files()[0].c_str()); … … 79 80 throw IoError("File cannot be found", ap.files()[0]); 80 81 } 82 // fall through 81 83 case 0: 82 84 break;
Note: See TracChangeset
for help on using the changeset viewer.