Changeset 1258:bdfc038f364c in lemon
- Timestamp:
- 08/07/13 06:31:47 (11 years ago)
- Branch:
- 1.1
- Parents:
- 1248:14394c9603c2 (diff), 1257:3e711ee55d31 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/digraph.h
r1081 r1258 325 325 /// This constructor sets the iterator to the first arc of \c g. 326 326 ///@param g the digraph 327 ArcIt(const Digraph& g) { ignore_unused_variable_warning(g); }327 ArcIt(const Digraph& g) { ::lemon::ignore_unused_variable_warning(g); } 328 328 /// Arc -> ArcIt conversion 329 329 -
lemon/concepts/digraph.h
r1257 r1258 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). … … 436 436 private: 437 437 ///Copy constructor 438 NodeMap(const NodeMap& nm) : 438 NodeMap(const NodeMap& nm) : 439 439 ReferenceMap<Node, T, T&, const T&>(nm) { } 440 440 ///Assignment operator -
lemon/concepts/graph_components.h
r1172 r1258 109 109 110 110 bool b; 111 ignore_unused_variable_warning(b);111 ::lemon::ignore_unused_variable_warning(b); 112 112 113 113 b = (ia == ib) && (ia != ib); … … 290 290 ue = e; 291 291 bool d = graph.direction(e); 292 ignore_unused_variable_warning(d);292 ::lemon::ignore_unused_variable_warning(d); 293 293 } 294 294 } … … 369 369 370 370 nid = digraph.maxNodeId(); 371 ignore_unused_variable_warning(nid);371 ::lemon::ignore_unused_variable_warning(nid); 372 372 eid = digraph.maxArcId(); 373 ignore_unused_variable_warning(eid);373 ::lemon::ignore_unused_variable_warning(eid); 374 374 } 375 375 … … 424 424 edge = graph.edgeFromId(ueid); 425 425 ueid = graph.maxEdgeId(); 426 ignore_unused_variable_warning(ueid);426 ::lemon::ignore_unused_variable_warning(ueid); 427 427 } 428 428 … … 497 497 _GraphItemIt it3 = it1; 498 498 _GraphItemIt it4 = INVALID; 499 ignore_unused_variable_warning(it3);500 ignore_unused_variable_warning(it4);499 ::lemon::ignore_unused_variable_warning(it3); 500 ::lemon::ignore_unused_variable_warning(it4); 501 501 502 502 it2 = ++it1; … … 588 588 _GraphIncIt it3 = it1; 589 589 _GraphIncIt it4 = INVALID; 590 ignore_unused_variable_warning(it3);591 ignore_unused_variable_warning(it4);590 ::lemon::ignore_unused_variable_warning(it3); 591 ::lemon::ignore_unused_variable_warning(it4); 592 592 593 593 it2 = ++it1; … … 771 771 n = digraph.baseNode(oait); 772 772 n = digraph.runningNode(oait); 773 ignore_unused_variable_warning(n);773 ::lemon::ignore_unused_variable_warning(n); 774 774 } 775 775 } … … 954 954 = digraph.notifier(typename _Digraph::Arc()); 955 955 956 ignore_unused_variable_warning(nn);957 ignore_unused_variable_warning(en);956 ::lemon::ignore_unused_variable_warning(nn); 957 ::lemon::ignore_unused_variable_warning(en); 958 958 } 959 959 … … 997 997 typename _Graph::EdgeNotifier& uen 998 998 = graph.notifier(typename _Graph::Edge()); 999 ignore_unused_variable_warning(uen);999 ::lemon::ignore_unused_variable_warning(uen); 1000 1000 } 1001 1001 … … 1071 1071 // m3 = cmap; 1072 1072 1073 ignore_unused_variable_warning(m1);1074 ignore_unused_variable_warning(m2);1075 // ignore_unused_variable_warning(m3);1073 ::lemon::ignore_unused_variable_warning(m1); 1074 ::lemon::ignore_unused_variable_warning(m2); 1075 // ::lemon::ignore_unused_variable_warning(m3); 1076 1076 } 1077 1077 -
lemon/concepts/graph_components.h
r1257 r1258 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). … … 39 39 /// \note This class is a template class so that we can use it to 40 40 /// create graph skeleton classes. The reason for this is that \c Node 41 /// and \c Arc (or \c Edge) types should \e not derive from the same 41 /// and \c Arc (or \c Edge) types should \e not derive from the same 42 42 /// base class. For \c Node you should instantiate it with character 43 43 /// \c 'n', for \c Arc with \c 'a' and for \c Edge with \c 'e'. … … 90 90 /// 91 91 /// This operator defines an ordering of the items. 92 /// It makes possible to use graph item types as key types in 92 /// It makes possible to use graph item types as key types in 93 93 /// associative containers (e.g. \c std::map). 94 94 /// … … 126 126 /// This class describes the base interface of directed graph types. 127 127 /// All digraph %concepts have to conform to this class. 128 /// It just provides types for nodes and arcs and functions 128 /// It just provides types for nodes and arcs and functions 129 129 /// to get the source and the target nodes of arcs. 130 130 class BaseDigraphComponent { … … 434 434 /// \brief Concept class for \c NodeIt, \c ArcIt and \c EdgeIt types. 435 435 /// 436 /// This class describes the concept of \c NodeIt, \c ArcIt and 436 /// This class describes the concept of \c NodeIt, \c ArcIt and 437 437 /// \c EdgeIt subtypes of digraph and graph types. 438 438 template <typename GR, typename Item> … … 474 474 /// next item. 475 475 GraphItemIt& operator++() { return *this; } 476 476 477 477 /// \brief Equality operator 478 478 /// … … 512 512 }; 513 513 514 /// \brief Concept class for \c InArcIt, \c OutArcIt and 514 /// \brief Concept class for \c InArcIt, \c OutArcIt and 515 515 /// \c IncEdgeIt types. 516 516 /// 517 /// This class describes the concept of \c InArcIt, \c OutArcIt 517 /// This class describes the concept of \c InArcIt, \c OutArcIt 518 518 /// and \c IncEdgeIt subtypes of digraph and graph types. 519 519 /// 520 520 /// \note Since these iterator classes do not inherit from the same 521 521 /// base class, there is an additional template parameter (selector) 522 /// \c sel. For \c InArcIt you should instantiate it with character 522 /// \c sel. For \c InArcIt you should instantiate it with character 523 523 /// \c 'i', for \c OutArcIt with \c 'o' and for \c IncEdgeIt with \c 'e'. 524 524 template <typename GR, … … 541 541 GraphIncIt(const GraphIncIt& it) : Item(it) {} 542 542 543 /// \brief Constructor that sets the iterator to the first 543 /// \brief Constructor that sets the iterator to the first 544 544 /// incoming or outgoing arc. 545 545 /// 546 /// Constructor that sets the iterator to the first arc 546 /// Constructor that sets the iterator to the first arc 547 547 /// incoming to or outgoing from the given node. 548 548 explicit GraphIncIt(const GR&, const Base&) {} … … 819 819 /// \brief Return the first edge incident to the given node. 820 820 /// 821 /// This function gives back the first edge incident to the given 821 /// This function gives back the first edge incident to the given 822 822 /// node. The bool parameter gives back the direction for which the 823 /// source node of the directed arc representing the edge is the 823 /// source node of the directed arc representing the edge is the 824 824 /// given node. 825 825 void firstInc(Edge&, bool&, const Node&) const {} … … 828 828 /// given node. 829 829 /// 830 /// This function gives back the next edge incident to the given 830 /// This function gives back the next edge incident to the given 831 831 /// node. The bool parameter should be used as \c firstInc() use it. 832 832 void nextInc(Edge&, bool&) const {} … … 1008 1008 /// 1009 1009 /// This class describes the concept of standard graph maps, i.e. 1010 /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and 1010 /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and 1011 1011 /// graph types, which can be used for associating data to graph items. 1012 1012 /// The standard graph maps must conform to the ReferenceMap concept. … … 1063 1063 _Map m1(g); 1064 1064 _Map m2(g,t); 1065 1065 1066 1066 // Copy constructor 1067 1067 // _Map m3(m); … … 1087 1087 /// 1088 1088 /// This class describes the interface of mappable directed graphs. 1089 /// It extends \ref BaseDigraphComponent with the standard digraph 1089 /// It extends \ref BaseDigraphComponent with the standard digraph 1090 1090 /// map classes, namely \c NodeMap and \c ArcMap. 1091 1091 /// This concept is part of the Digraph concept. … … 1225 1225 /// 1226 1226 /// This class describes the interface of mappable undirected graphs. 1227 /// It extends \ref MappableDigraphComponent with the standard graph 1227 /// It extends \ref MappableDigraphComponent with the standard graph 1228 1228 /// map class for edges (\c EdgeMap). 1229 1229 /// This concept is part of the Graph concept. … … 1311 1311 /// 1312 1312 /// This class describes the interface of extendable directed graphs. 1313 /// It extends \ref BaseDigraphComponent with functions for adding 1313 /// It extends \ref BaseDigraphComponent with functions for adding 1314 1314 /// nodes and arcs to the digraph. 1315 1315 /// This concept requires \ref AlterableDigraphComponent. … … 1356 1356 /// 1357 1357 /// This class describes the interface of extendable undirected graphs. 1358 /// It extends \ref BaseGraphComponent with functions for adding 1358 /// It extends \ref BaseGraphComponent with functions for adding 1359 1359 /// nodes and edges to the graph. 1360 1360 /// This concept requires \ref AlterableGraphComponent. … … 1401 1401 /// 1402 1402 /// This class describes the interface of erasable directed graphs. 1403 /// It extends \ref BaseDigraphComponent with functions for removing 1403 /// It extends \ref BaseDigraphComponent with functions for removing 1404 1404 /// nodes and arcs from the digraph. 1405 1405 /// This concept requires \ref AlterableDigraphComponent. … … 1414 1414 /// \brief Erase a node from the digraph. 1415 1415 /// 1416 /// This function erases the given node from the digraph and all arcs 1416 /// This function erases the given node from the digraph and all arcs 1417 1417 /// connected to the node. 1418 1418 void erase(const Node&) {} … … 1441 1441 /// 1442 1442 /// This class describes the interface of erasable undirected graphs. 1443 /// It extends \ref BaseGraphComponent with functions for removing 1443 /// It extends \ref BaseGraphComponent with functions for removing 1444 1444 /// nodes and edges from the graph. 1445 1445 /// This concept requires \ref AlterableGraphComponent. -
lemon/concepts/maps.h
r1158 r1258 61 61 own_val = m[own_key]; 62 62 63 ignore_unused_variable_warning(key);64 ignore_unused_variable_warning(val);65 ignore_unused_variable_warning(own_key);66 ignore_unused_variable_warning(own_val);63 ::lemon::ignore_unused_variable_warning(key); 64 ::lemon::ignore_unused_variable_warning(val); 65 ::lemon::ignore_unused_variable_warning(own_key); 66 ::lemon::ignore_unused_variable_warning(own_val); 67 67 } 68 68 const Key& key; … … 101 101 m.set(own_key, own_val); 102 102 103 ignore_unused_variable_warning(key);104 ignore_unused_variable_warning(val);105 ignore_unused_variable_warning(own_key);106 ignore_unused_variable_warning(own_val);103 ::lemon::ignore_unused_variable_warning(key); 104 ::lemon::ignore_unused_variable_warning(val); 105 ::lemon::ignore_unused_variable_warning(own_key); 106 ::lemon::ignore_unused_variable_warning(own_val); 107 107 } 108 108 const Key& key; -
lemon/concepts/maps.h
r1257 r1258 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/adaptors_test.cc
r1158 r1258 66 66 Digraph::Arc a2 = digraph.addArc(n1, n3); 67 67 Digraph::Arc a3 = digraph.addArc(n2, n3); 68 ignore_unused_variable_warning(a3);68 ::lemon::ignore_unused_variable_warning(a3); 69 69 70 70 // Check the adaptor … … 101 101 Adaptor::Arc a7 = adaptor.addArc(n1, n4); 102 102 Adaptor::Arc a8 = adaptor.addArc(n1, n2); 103 ignore_unused_variable_warning(a6,a7,a8);103 ::lemon::ignore_unused_variable_warning(a6,a7,a8); 104 104 105 105 adaptor.erase(a1); … … 761 761 Digraph::Arc a2 = digraph.addArc(n1, n3); 762 762 Digraph::Arc a3 = digraph.addArc(n2, n3); 763 ignore_unused_variable_warning(a1,a2,a3);763 ::lemon::ignore_unused_variable_warning(a1,a2,a3); 764 764 765 765 checkGraphNodeList(adaptor, 6); -
test/adaptors_test.cc
r1257 r1258 1381 1381 1382 1382 // Apply several adaptors on the grid graph 1383 typedef SplitNodes< ReverseDigraph< const Orienter< 1384 const GridGraph, GridGraph::EdgeMap<bool> > > > 1385 RevSplitGridGraph; 1383 typedef Orienter<const GridGraph, GridGraph::EdgeMap<bool> > 1384 OrientedGridGraph; 1385 typedef ReverseDigraph<const OrientedGridGraph> RevOrientedGridGraph; 1386 typedef SplitNodes<RevOrientedGridGraph> RevSplitGridGraph; 1386 1387 typedef ReverseDigraph<const RevSplitGridGraph> SplitGridGraph; 1387 1388 typedef Undirector<const SplitGridGraph> USplitGridGraph; … … 1392 1393 checkConcept<concepts::Graph, UUSplitGridGraph>(); 1393 1394 1395 OrientedGridGraph ori_adaptor = orienter(graph, dir_map); 1396 RevOrientedGridGraph rev_ori_adaptor = reverseDigraph(ori_adaptor); 1394 1397 RevSplitGridGraph rev_adaptor = 1395 splitNodes(rev erseDigraph(orienter(graph, dir_map)));1398 splitNodes(rev_ori_adaptor); 1396 1399 SplitGridGraph adaptor = reverseDigraph(rev_adaptor); 1397 1400 USplitGridGraph uadaptor = undirector(adaptor); -
test/bfs_test.cc
r1172 r1258 62 62 Arc e; 63 63 int l, i; 64 ignore_unused_variable_warning(l,i);64 ::lemon::ignore_unused_variable_warning(l,i); 65 65 bool b; 66 66 BType::DistMap d(G); … … 152 152 Digraph g; 153 153 bool b; 154 ignore_unused_variable_warning(b);154 ::lemon::ignore_unused_variable_warning(b); 155 155 156 156 bfs(g).run(Node()); -
test/bfs_test.cc
r1257 r1258 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). … … 85 85 b = const_bfs_test.emptyQueue(); 86 86 i = const_bfs_test.queueSize(); 87 87 88 88 bfs_test.start(); 89 89 bfs_test.start(t); … … 106 106 ::SetProcessedMap<concepts::WriteMap<Node,bool> > 107 107 ::Create bfs_test(G); 108 108 109 109 concepts::ReadWriteMap<Node,Arc> pred_map; 110 110 concepts::ReadWriteMap<Node,int> dist_map; 111 111 concepts::ReadWriteMap<Node,bool> reached_map; 112 112 concepts::WriteMap<Node,bool> processed_map; 113 113 114 114 bfs_test 115 115 .predMap(pred_map) … … 121 121 bfs_test.run(s,t); 122 122 bfs_test.run(); 123 123 124 124 bfs_test.init(); 125 125 bfs_test.addSource(s); … … 130 130 b = bfs_test.emptyQueue(); 131 131 i = bfs_test.queueSize(); 132 132 133 133 bfs_test.start(); 134 134 bfs_test.start(t); -
test/circulation_test.cc
r1172 r1258 74 74 VType v; 75 75 bool b; 76 ignore_unused_variable_warning(v,b);76 ::lemon::ignore_unused_variable_warning(v,b); 77 77 78 78 typedef Circulation<Digraph, CapMap, CapMap, SupplyMap> … … 100 100 const_circ_test.barrierMap(bar); 101 101 102 ignore_unused_variable_warning(fm);102 ::lemon::ignore_unused_variable_warning(fm); 103 103 } 104 104 -
test/circulation_test.cc
r1257 r1258 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). … … 83 83 CirculationType circ_test(g, lcap, ucap, supply); 84 84 const CirculationType& const_circ_test = circ_test; 85 85 86 86 circ_test 87 87 .lowerMap(lcap) … … 99 99 b = const_circ_test.barrier(n); 100 100 const_circ_test.barrierMap(bar); 101 101 102 102 ::lemon::ignore_unused_variable_warning(fm); 103 103 } -
test/connectivity_test.cc
r1158 r1258 69 69 Graph g(d); 70 70 Digraph::Node n = d.addNode(); 71 ignore_unused_variable_warning(n);71 ::lemon::ignore_unused_variable_warning(n); 72 72 73 73 check(stronglyConnected(d), "This digraph is strongly connected"); … … 247 247 Digraph::Node watch = d.addNode(); 248 248 Digraph::Node pants = d.addNode(); 249 ignore_unused_variable_warning(watch);249 ::lemon::ignore_unused_variable_warning(watch); 250 250 251 251 d.addArc(socks, shoe); -
test/connectivity_test.cc
r1257 r1258 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). … … 30 30 typedef ListDigraph Digraph; 31 31 typedef Undirector<Digraph> Graph; 32 33 { 34 Digraph d; 35 Digraph::NodeMap<int> order(d); 36 Graph g(d); 37 32 33 { 34 Digraph d; 35 Digraph::NodeMap<int> order(d); 36 Graph g(d); 37 38 38 check(stronglyConnected(d), "The empty digraph is strongly connected"); 39 39 check(countStronglyConnectedComponents(d) == 0, … … 49 49 check(countBiEdgeConnectedComponents(g) == 0, 50 50 "The empty graph has 0 bi-edge-connected component"); 51 51 52 52 check(dag(d), "The empty digraph is DAG."); 53 53 check(checkedTopologicalSort(d, order), "The empty digraph is DAG."); … … 84 84 check(countBiEdgeConnectedComponents(g) == 1, 85 85 "This graph has 1 bi-edge-connected component"); 86 86 87 87 check(dag(d), "This digraph is DAG."); 88 88 check(checkedTopologicalSort(d, order), "This digraph is DAG."); … … 103 103 Digraph::NodeMap<int> order(d); 104 104 Graph g(d); 105 105 106 106 Digraph::Node n1 = d.addNode(); 107 107 Digraph::Node n2 = d.addNode(); … … 110 110 Digraph::Node n5 = d.addNode(); 111 111 Digraph::Node n6 = d.addNode(); 112 112 113 113 d.addArc(n1, n3); 114 114 d.addArc(n3, n2); … … 138 138 check(!parallelFree(g), "This graph is not parallel-free."); 139 139 check(!simpleGraph(g), "This graph is not simple."); 140 140 141 141 d.addArc(n3, n3); 142 142 143 143 check(!loopFree(d), "This digraph is not loop-free."); 144 144 check(!loopFree(g), "This graph is not loop-free."); 145 145 check(!simpleGraph(d), "This digraph is not simple."); 146 146 147 147 d.addArc(n3, n2); 148 148 149 149 check(!parallelFree(d), "This digraph is not parallel-free."); 150 150 } 151 151 152 152 { 153 153 Digraph d; 154 154 Digraph::ArcMap<bool> cutarcs(d, false); 155 155 Graph g(d); 156 156 157 157 Digraph::Node n1 = d.addNode(); 158 158 Digraph::Node n2 = d.addNode(); … … 174 174 d.addArc(n6, n7); 175 175 d.addArc(n7, n6); 176 176 177 177 check(!stronglyConnected(d), "This digraph is not strongly connected"); 178 178 check(countStronglyConnectedComponents(d) == 3, … … 237 237 Digraph d; 238 238 Digraph::NodeMap<int> order(d); 239 239 240 240 Digraph::Node belt = d.addNode(); 241 241 Digraph::Node trousers = d.addNode(); … … 258 258 d.addArc(shirt, necktie); 259 259 d.addArc(necktie, coat); 260 260 261 261 check(dag(d), "This digraph is DAG."); 262 262 topologicalSort(d, order); … … 270 270 ListGraph g; 271 271 ListGraph::NodeMap<bool> map(g); 272 272 273 273 ListGraph::Node n1 = g.addNode(); 274 274 ListGraph::Node n2 = g.addNode(); … … 286 286 g.addEdge(n4, n7); 287 287 g.addEdge(n5, n7); 288 288 289 289 check(bipartite(g), "This graph is bipartite"); 290 290 check(bipartitePartitions(g, map), "This graph is bipartite"); 291 291 292 292 check(map[n1] == map[n2] && map[n1] == map[n6] && map[n1] == map[n7], 293 293 "Wrong bipartitePartitions()"); -
test/dfs_test.cc
r1172 r1258 68 68 int l, i; 69 69 bool b; 70 ignore_unused_variable_warning(l,i,b);70 ::lemon::ignore_unused_variable_warning(l,i,b); 71 71 72 72 DType::DistMap d(G); … … 154 154 Digraph g; 155 155 bool b; 156 ignore_unused_variable_warning(b);156 ::lemon::ignore_unused_variable_warning(b); 157 157 158 158 dfs(g).run(Node()); -
test/dfs_test.cc
r1257 r1258 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). … … 89 89 b = const_dfs_test.emptyQueue(); 90 90 i = const_dfs_test.queueSize(); 91 91 92 92 dfs_test.start(); 93 93 dfs_test.start(t); … … 115 115 concepts::ReadWriteMap<Node,bool> reached_map; 116 116 concepts::WriteMap<Node,bool> processed_map; 117 117 118 118 dfs_test 119 119 .predMap(pred_map) … … 132 132 b = dfs_test.emptyQueue(); 133 133 i = dfs_test.queueSize(); 134 134 135 135 dfs_test.start(); 136 136 dfs_test.start(t); … … 224 224 check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); 225 225 } 226 226 227 227 { 228 228 NullMap<Node,Arc> myPredMap; -
test/dijkstra_test.cc
r1172 r1258 66 66 int i; 67 67 bool b; 68 ignore_unused_variable_warning(l,i,b);68 ::lemon::ignore_unused_variable_warning(l,i,b); 69 69 70 70 DType::DistMap d(G); … … 165 165 Digraph g; 166 166 bool b; 167 ignore_unused_variable_warning(b);167 ::lemon::ignore_unused_variable_warning(b); 168 168 169 169 dijkstra(g,LengthMap()).run(Node()); -
test/dijkstra_test.cc
r1257 r1258 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). … … 88 88 b = const_dijkstra_test.emptyQueue(); 89 89 i = const_dijkstra_test.queueSize(); 90 90 91 91 dijkstra_test.start(); 92 92 dijkstra_test.start(t); … … 112 112 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 113 113 ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 114 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> >, 114 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> >, 115 115 concepts::ReadWriteMap<Node,int> > 116 116 ::Create dijkstra_test(G,length); … … 122 122 concepts::ReadWriteMap<Node,int> heap_cross_ref; 123 123 BinHeap<VType, concepts::ReadWriteMap<Node,int> > heap(heap_cross_ref); 124 124 125 125 dijkstra_test 126 126 .lengthMap(length_map) … … 139 139 b = dijkstra_test.emptyQueue(); 140 140 i = dijkstra_test.queueSize(); 141 141 142 142 dijkstra_test.start(); 143 143 dijkstra_test.start(t); -
test/edge_set_test.cc
r1158 r1258 45 45 46 46 Digraph::Arc ga1 = digraph.addArc(n1, n2); 47 ignore_unused_variable_warning(ga1);47 ::lemon::ignore_unused_variable_warning(ga1); 48 48 49 49 ArcSet arc_set(digraph); 50 50 51 51 Digraph::Arc ga2 = digraph.addArc(n2, n1); 52 ignore_unused_variable_warning(ga2);52 ::lemon::ignore_unused_variable_warning(ga2); 53 53 54 54 checkGraphNodeList(arc_set, 2); … … 78 78 a3 = arc_set.addArc(n2, n3), 79 79 a4 = arc_set.addArc(n2, n3); 80 ignore_unused_variable_warning(a2,a3,a4);80 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 81 81 82 82 checkGraphNodeList(arc_set, 3); … … 115 115 116 116 Digraph::Arc ga1 = digraph.addArc(n1, n2); 117 ignore_unused_variable_warning(ga1);117 ::lemon::ignore_unused_variable_warning(ga1); 118 118 119 119 ArcSet arc_set(digraph); 120 120 121 121 Digraph::Arc ga2 = digraph.addArc(n2, n1); 122 ignore_unused_variable_warning(ga2);122 ::lemon::ignore_unused_variable_warning(ga2); 123 123 124 124 checkGraphNodeList(arc_set, 2); … … 148 148 a3 = arc_set.addArc(n2, n3), 149 149 a4 = arc_set.addArc(n2, n3); 150 ignore_unused_variable_warning(a2,a3,a4);150 ::lemon::ignore_unused_variable_warning(a2,a3,a4); 151 151 152 152 checkGraphNodeList(arc_set, 3); … … 199 199 200 200 Digraph::Arc ga1 = digraph.addArc(n1, n2); 201 ignore_unused_variable_warning(ga1);201 ::lemon::ignore_unused_variable_warning(ga1); 202 202 203 203 EdgeSet edge_set(digraph); 204 204 205 205 Digraph::Arc ga2 = digraph.addArc(n2, n1); 206 ignore_unused_variable_warning(ga2);206 ::lemon::ignore_unused_variable_warning(ga2); 207 207 208 208 checkGraphNodeList(edge_set, 2); … … 241 241 e3 = edge_set.addEdge(n2, n3), 242 242 e4 = edge_set.addEdge(n2, n3); 243 ignore_unused_variable_warning(e2,e3,e4);243 ::lemon::ignore_unused_variable_warning(e2,e3,e4); 244 244 245 245 checkGraphNodeList(edge_set, 3); … … 287 287 288 288 Digraph::Arc ga1 = digraph.addArc(n1, n2); 289 ignore_unused_variable_warning(ga1);289 ::lemon::ignore_unused_variable_warning(ga1); 290 290 291 291 EdgeSet edge_set(digraph); 292 292 293 293 Digraph::Arc ga2 = digraph.addArc(n2, n1); 294 ignore_unused_variable_warning(ga2);294 ::lemon::ignore_unused_variable_warning(ga2); 295 295 296 296 checkGraphNodeList(edge_set, 2); … … 329 329 e3 = edge_set.addEdge(n2, n3), 330 330 e4 = edge_set.addEdge(n2, n3); 331 ignore_unused_variable_warning(e2,e3,e4);331 ::lemon::ignore_unused_variable_warning(e2,e3,e4); 332 332 333 333 checkGraphNodeList(edge_set, 3); -
test/edge_set_test.cc
r1257 r1258 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 085 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/euler_test.cc
r1158 r1258 102 102 Graph g(d); 103 103 Digraph::Node n = d.addNode(); 104 ignore_unused_variable_warning(n);104 ::lemon::ignore_unused_variable_warning(n); 105 105 106 106 checkDiEulerIt(d); … … 191 191 Digraph::Node n4 = d.addNode(); 192 192 Digraph::Node n5 = d.addNode(); 193 ignore_unused_variable_warning(n0,n4,n5);193 ::lemon::ignore_unused_variable_warning(n0,n4,n5); 194 194 195 195 d.addArc(n1, n2); -
test/euler_test.cc
r1257 r1258 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). … … 86 86 typedef ListDigraph Digraph; 87 87 typedef Undirector<Digraph> Graph; 88 89 { 90 Digraph d; 91 Graph g(d); 92 88 89 { 90 Digraph d; 91 Graph g(d); 92 93 93 checkDiEulerIt(d); 94 94 checkDiEulerIt(g); … … 130 130 Digraph::Node n2 = d.addNode(); 131 131 Digraph::Node n3 = d.addNode(); 132 132 133 133 d.addArc(n1, n2); 134 134 d.addArc(n2, n1); … … 155 155 Digraph::Node n5 = d.addNode(); 156 156 Digraph::Node n6 = d.addNode(); 157 157 158 158 d.addArc(n1, n2); 159 159 d.addArc(n2, n4); … … 214 214 Digraph::Node n2 = d.addNode(); 215 215 Digraph::Node n3 = d.addNode(); 216 216 217 217 d.addArc(n1, n2); 218 218 d.addArc(n2, n3); -
test/gomory_hu_test.cc
r1172 r1258 69 69 Value v; 70 70 int d; 71 ignore_unused_variable_warning(v,d);71 ::lemon::ignore_unused_variable_warning(v,d); 72 72 73 73 GomoryHu<Graph, CapMap> gh_test(g, cap); -
test/gomory_hu_test.cc
r1257 r1258 1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 * 5 * Copyright (C) 2003-2011 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). 8 * 9 * Permission to use, modify and distribute this software is granted 10 * provided that this copyright notice appears in all copies. For 11 * precise terms see the accompanying LICENSE file. 12 * 13 * This software is provided "AS IS" with no warranty of any kind, 14 * express or implied, and with no claim as to its suitability for any 15 * purpose. 16 * 17 */ 18 1 19 #include <iostream> 2 20 … … 34 52 "source 0\n" 35 53 "target 3\n"; 36 54 37 55 void checkGomoryHuCompile() 38 56 { … … 71 89 72 90 int cutValue(const Graph& graph, const BoolNodeMap& cut, 73 91 const IntEdgeMap& capacity) { 74 92 75 93 int sum = 0; … … 109 127 int sum=0; 110 128 for(GomoryHu<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) 111 sum+=capacity[a]; 129 sum+=capacity[a]; 112 130 check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); 113 131 … … 120 138 } 121 139 } 122 140 123 141 return 0; 124 142 } -
test/hao_orlin_test.cc
r1172 r1258 67 67 CutMap cut; 68 68 Value v; 69 ignore_unused_variable_warning(v);69 ::lemon::ignore_unused_variable_warning(v); 70 70 71 71 HaoOrlin<Digraph, CapMap> ho_test(g, cap); -
test/hao_orlin_test.cc
r1257 r1258 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). … … 85 85 86 86 template <typename Graph, typename CapMap, typename CutMap> 87 typename CapMap::Value 87 typename CapMap::Value 88 88 cutValue(const Graph& graph, const CapMap& cap, const CutMap& cut) 89 89 { … … 112 112 ho.run(); 113 113 ho.minCutMap(cut); 114 114 115 115 check(ho.minCutValue() == 1, "Wrong cut value"); 116 116 check(ho.minCutValue() == cutValue(graph, cap1, cut), "Wrong cut value"); … … 128 128 ho.run(); 129 129 ho.minCutMap(cut); 130 130 131 131 check(ho.minCutValue() == 1, "Wrong cut value"); 132 132 check(ho.minCutValue() == cutValue(graph, cap3, cut), "Wrong cut value"); 133 133 } 134 134 135 135 typedef Undirector<SmartDigraph> UGraph; 136 136 UGraph ugraph(graph); 137 137 138 138 { 139 139 HaoOrlin<UGraph, SmartDigraph::ArcMap<int> > ho(ugraph, cap1); 140 140 ho.run(); 141 141 ho.minCutMap(cut); 142 142 143 143 check(ho.minCutValue() == 2, "Wrong cut value"); 144 144 check(ho.minCutValue() == cutValue(ugraph, cap1, cut), "Wrong cut value"); … … 148 148 ho.run(); 149 149 ho.minCutMap(cut); 150 150 151 151 check(ho.minCutValue() == 5, "Wrong cut value"); 152 152 check(ho.minCutValue() == cutValue(ugraph, cap2, cut), "Wrong cut value"); … … 156 156 ho.run(); 157 157 ho.minCutMap(cut); 158 158 159 159 check(ho.minCutValue() == 5, "Wrong cut value"); 160 160 check(ho.minCutValue() == cutValue(ugraph, cap3, cut), "Wrong cut value"); -
test/maps_test.cc
r1158 r1258 81 81 NullMap<A,B> map1; 82 82 NullMap<A,B> map2 = map1; 83 ignore_unused_variable_warning(map2);83 ::lemon::ignore_unused_variable_warning(map2); 84 84 map1 = nullMap<A,B>(); 85 85 } … … 92 92 ConstMap<A,B> map2 = B(); 93 93 ConstMap<A,B> map3 = map1; 94 ignore_unused_variable_warning(map2,map3);94 ::lemon::ignore_unused_variable_warning(map2,map3); 95 95 96 96 map1 = constMap<A>(B()); … … 99 99 ConstMap<A,C> map4(C(1)); 100 100 ConstMap<A,C> map5 = map4; 101 ignore_unused_variable_warning(map5);101 ::lemon::ignore_unused_variable_warning(map5); 102 102 103 103 map4 = constMap<A>(C(2)); … … 121 121 IdentityMap<A> map1; 122 122 IdentityMap<A> map2 = map1; 123 ignore_unused_variable_warning(map2);123 ::lemon::ignore_unused_variable_warning(map2); 124 124 125 125 map1 = identityMap<A>(); … … 182 182 checkConcept<ReadMap<B,double>, CompMap>(); 183 183 CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>()); 184 ignore_unused_variable_warning(map1);184 ::lemon::ignore_unused_variable_warning(map1); 185 185 CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>()); 186 ignore_unused_variable_warning(map2);186 ::lemon::ignore_unused_variable_warning(map2); 187 187 188 188 SparseMap<double, bool> m1(false); m1[3.14] = true; … … 197 197 checkConcept<ReadMap<A,double>, CombMap>(); 198 198 CombMap map1 = CombMap(DoubleMap(), DoubleMap()); 199 ignore_unused_variable_warning(map1);199 ::lemon::ignore_unused_variable_warning(map1); 200 200 CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>()); 201 ignore_unused_variable_warning(map2);201 ::lemon::ignore_unused_variable_warning(map2); 202 202 203 203 check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3, … … 211 211 FunctorToMap<F> map1; 212 212 FunctorToMap<F> map2 = FunctorToMap<F>(F()); 213 ignore_unused_variable_warning(map2);213 ::lemon::ignore_unused_variable_warning(map2); 214 214 215 215 B b = functorToMap(F())[A()]; 216 ignore_unused_variable_warning(b);216 ::lemon::ignore_unused_variable_warning(b); 217 217 218 218 checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >(); 219 219 MapToFunctor<ReadMap<A,B> > map = 220 220 MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); 221 ignore_unused_variable_warning(map);221 ::lemon::ignore_unused_variable_warning(map); 222 222 223 223 check(functorToMap(&func)[A()] == 3, … … 237 237 ConvertMap<ReadMap<double, int>, double> >(); 238 238 ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true)); 239 ignore_unused_variable_warning(map1);239 ::lemon::ignore_unused_variable_warning(map1); 240 240 ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false)); 241 ignore_unused_variable_warning(map2);241 ::lemon::ignore_unused_variable_warning(map2); 242 242 243 243 } -
test/maps_test.cc
r1257 r1258 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 checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >(); 72 72 checkConcept<ReadWriteMap<A,C>, ReadWriteMap<A,C> >(); 73 checkConcept<ReferenceMap<A,B,B&,const B&>, ReferenceMap<A,B,B&,const B&> >(); 74 checkConcept<ReferenceMap<A,C,C&,const C&>, ReferenceMap<A,C,C&,const C&> >(); 73 checkConcept<ReferenceMap<A,B,B&,const B&>, 74 ReferenceMap<A,B,B&,const B&> >(); 75 checkConcept<ReferenceMap<A,C,C&,const C&>, 76 ReferenceMap<A,C,C&,const C&> >(); 75 77 76 78 // NullMap … … 369 371 check(v1[i++] == *it, "Something is wrong with LoggerBoolMap"); 370 372 } 371 373 372 374 // CrossRefMap 373 375 { … … 377 379 checkConcept<ReadWriteMap<Node, int>, 378 380 CrossRefMap<Graph, Node, int> >(); 379 381 380 382 Graph gr; 381 383 typedef CrossRefMap<Graph, Node, char> CRMap; 382 384 typedef CRMap::ValueIterator ValueIt; 383 385 CRMap map(gr); 384 386 385 387 Node n0 = gr.addNode(); 386 388 Node n1 = gr.addNode(); 387 389 Node n2 = gr.addNode(); 388 390 389 391 map.set(n0, 'A'); 390 392 map.set(n1, 'B'); -
test/matching_test.cc
r1172 r1258 146 146 MaxMatching<Graph>::Status stat = 147 147 const_mat_test.status(n); 148 ignore_unused_variable_warning(stat);148 ::lemon::ignore_unused_variable_warning(stat); 149 149 const MaxMatching<Graph>::StatusMap& smap = 150 150 const_mat_test.statusMap(); -
test/matching_test.cc
r1257 r1258 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). … … 135 135 mat_test.startDense(); 136 136 mat_test.run(); 137 137 138 138 const_mat_test.matchingSize(); 139 139 const_mat_test.matching(e); … … 144 144 const_mat_test.mate(n); 145 145 146 MaxMatching<Graph>::Status stat = 146 MaxMatching<Graph>::Status stat = 147 147 const_mat_test.status(n); 148 148 ::lemon::ignore_unused_variable_warning(stat); … … 172 172 mat_test.start(); 173 173 mat_test.run(); 174 174 175 175 const_mat_test.matchingWeight(); 176 176 const_mat_test.matchingSize(); … … 181 181 e = mmap[n]; 182 182 const_mat_test.mate(n); 183 183 184 184 int k = 0; 185 185 const_mat_test.dualValue(); … … 209 209 mat_test.start(); 210 210 mat_test.run(); 211 211 212 212 const_mat_test.matchingWeight(); 213 213 const_mat_test.matching(e); … … 217 217 e = mmap[n]; 218 218 const_mat_test.mate(n); 219 219 220 220 int k = 0; 221 221 const_mat_test.dualValue(); -
test/min_cost_arborescence_test.cc
r1172 r1258 92 92 VType c; 93 93 bool b; 94 ignore_unused_variable_warning(c,b);94 ::lemon::ignore_unused_variable_warning(c,b); 95 95 int i; 96 96 CostMap cost; … … 128 128 c = const_mcarb_test.dualValue(i); 129 129 130 ignore_unused_variable_warning(am);131 ignore_unused_variable_warning(pm);130 ::lemon::ignore_unused_variable_warning(am); 131 ::lemon::ignore_unused_variable_warning(pm); 132 132 } 133 133 -
test/min_cost_arborescence_test.cc
r1257 r1258 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 085 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 112 112 b = const_mcarb_test.emptyQueue(); 113 113 i = const_mcarb_test.queueSize(); 114 114 115 115 c = const_mcarb_test.arborescenceCost(); 116 116 b = const_mcarb_test.arborescence(e); … … 122 122 b = const_mcarb_test.reached(n); 123 123 b = const_mcarb_test.processed(n); 124 124 125 125 i = const_mcarb_test.dualNum(); 126 126 c = const_mcarb_test.dualValue(); 127 127 i = const_mcarb_test.dualSize(i); 128 128 c = const_mcarb_test.dualValue(i); 129 129 130 130 ::lemon::ignore_unused_variable_warning(am); 131 131 ::lemon::ignore_unused_variable_warning(pm); -
test/preflow_test.cc
r1172 r1258 87 87 VType v; 88 88 bool b; 89 ignore_unused_variable_warning(v,b);89 ::lemon::ignore_unused_variable_warning(v,b); 90 90 91 91 typedef Preflow<Digraph, CapMap> … … 116 116 const_preflow_test.minCutMap(cut); 117 117 118 ignore_unused_variable_warning(fm);118 ::lemon::ignore_unused_variable_warning(fm); 119 119 } 120 120 -
test/preflow_test.cc
r1257 r1258 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). … … 115 115 b = const_preflow_test.minCut(n); 116 116 const_preflow_test.minCutMap(cut); 117 117 118 118 ::lemon::ignore_unused_variable_warning(fm); 119 119 } … … 156 156 { 157 157 DIGRAPH_TYPEDEFS(SmartDigraph); 158 158 159 159 SmartDigraph g; 160 160 SmartDigraph::ArcMap<int> cap(g),iflow(g); … … 268 268 269 269 initFlowTest(); 270 270 271 271 return 0; 272 272 } -
test/suurballe_test.cc
r1172 r1258 108 108 int f; 109 109 VType c; 110 ignore_unused_variable_warning(f,c);110 ::lemon::ignore_unused_variable_warning(f,c); 111 111 112 112 c = const_suurb_test.totalLength(); … … 120 120 Path<Digraph> p = const_suurb_test.path(k); 121 121 122 ignore_unused_variable_warning(fm);123 ignore_unused_variable_warning(pm);122 ::lemon::ignore_unused_variable_warning(fm); 123 ::lemon::ignore_unused_variable_warning(pm); 124 124 } 125 125 -
test/suurballe_test.cc
r1257 r1258 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). … … 81 81 typedef Digraph::Arc Arc; 82 82 typedef concepts::ReadMap<Arc, VType> LengthMap; 83 83 84 84 typedef Suurballe<Digraph, LengthMap> SuurballeType; 85 85 … … 105 105 k = suurb_test.findFlow(n, k); 106 106 suurb_test.findPaths(); 107 107 108 108 int f; 109 109 VType c; … … 119 119 k = const_suurb_test.pathNum(); 120 120 Path<Digraph> p = const_suurb_test.path(k); 121 121 122 122 ::lemon::ignore_unused_variable_warning(fm); 123 123 ::lemon::ignore_unused_variable_warning(pm);
Note: See TracChangeset
for help on using the changeset viewer.