Changes in / [1403:e5af35e6c93f:1391:411819b8702c] in lemon
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1398 r1344 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)90 85 ENDIF(LEMON_ENABLE_GLPK) 91 86 IF(LEMON_ENABLE_ILOG) 92 87 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)98 88 ENDIF(LEMON_ENABLE_ILOG) 99 89 IF(LEMON_ENABLE_COIN) 100 90 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)107 91 ENDIF(LEMON_ENABLE_COIN) 108 92 IF(LEMON_ENABLE_SOPLEX) 109 93 FIND_PACKAGE(SOPLEX) 110 IF(SOPLEX_FOUND)111 SET(LEMON_HAVE_LP TRUE)112 SET(LEMON_HAVE_SOPLEX TRUE)113 ENDIF(SOPLEX_FOUND)114 94 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) 115 116 116 117 IF(ILOG_FOUND) -
cmake/FindCOIN.cmake
r1398 r1232 66 66 ) 67 67 68 FIND_LIBRARY(COIN_PTHREADS_LIBRARY69 NAMES pthreads libpthreads70 HINTS ${COIN_ROOT_DIR}/lib/coin71 HINTS ${COIN_ROOT_DIR}/lib72 )73 74 68 INCLUDE(FindPackageHandleStandardArgs) 75 69 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG … … 89 83 IF(COIN_FOUND) 90 84 SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR}) 91 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY} ")85 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}") 92 86 IF(COIN_ZLIB_LIBRARY) 93 87 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}") … … 96 90 SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}") 97 91 ENDIF(COIN_BZ2_LIBRARY) 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}") 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}") 102 93 SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES}) 103 94 ENDIF(COIN_FOUND) -
lemon/adaptors.h
r1402 r1270 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
r1397 r956 222 222 { 223 223 Opts::iterator o = _opts.find(opt); 224 Opts::iterator s = _opts.find(syn); 224 225 LEMON_ASSERT(o!=_opts.end(), "Unknown option: '"+opt+"'"); 225 LEMON_ASSERT(_opts.find(syn)==_opts.end(), 226 "Option already used: '"+syn+"'"); 226 LEMON_ASSERT(s==_opts.end(), "Option already used: '"+syn+"'"); 227 227 ParData p; 228 228 p.help=opt; -
lemon/planarity.h
r1400 r1270 2384 2384 if (!pe.run()) return false; 2385 2385 2386 run(pe .embeddingMap());2386 run(pe); 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 }2409 2400 2410 2401 if (3 * countNodes(_graph) - 6 == countEdges(_graph)) { -
lemon/random.h
r1396 r1340 343 343 num = rnd() & mask; 344 344 } while (num > max); 345 return static_cast<Result>(num);345 return num; 346 346 } 347 347 }; -
test/max_flow_test.cc
r1396 r1385 420 420 checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf, 13); 421 421 422 checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3 f);422 checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3); 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 f);436 checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3); 437 437 checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf_float, 0.3); 438 438 -
test/planarity_test.cc
r1400 r862 31 31 using namespace lemon::dim2; 32 32 33 const int lgfn = 8;33 const int lgfn = 4; 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 65 35 "@nodes\n" 66 36 "label\n" … … 167 137 } 168 138 } 169 170 if (face_num != 0) { 171 check(face_num + countNodes(graph) - countConnectedComponents(graph) == 172 countEdges(graph) + 1, "Euler test does not passed"); 173 } 139 check(face_num + countNodes(graph) - countConnectedComponents(graph) == 140 countEdges(graph) + 1, "Euler test does not passed"); 174 141 } 175 142 … … 279 246 checkEmbedding(graph, pe); 280 247 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 } 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); 304 255 305 256 } else { -
tools/dimacs-to-lgf.cc
r1397 r631 74 74 throw IoError("Cannot open the file for writing", ap.files()[1]); 75 75 } 76 // fall through77 76 case 1: 78 77 input.open(ap.files()[0].c_str()); … … 80 79 throw IoError("File cannot be found", ap.files()[0]); 81 80 } 82 // fall through83 81 case 0: 84 82 break;
Note: See TracChangeset
for help on using the changeset viewer.