Changes in / [1000:404b98971e1f:996:b6347aae6575] in lemon-main
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/adaptors.h
r998 r877 1372 1372 /// and edge filter maps. 1373 1373 SubGraph(GR& graph, NF& node_filter, EF& edge_filter) { 1374 this->initialize(graph, node_filter, edge_filter);1374 initialize(graph, node_filter, edge_filter); 1375 1375 } 1376 1376 … … 2278 2278 /// Creates an undirected graph from the given digraph. 2279 2279 Undirector(DGR& digraph) { 2280 this->initialize(digraph);2280 initialize(digraph); 2281 2281 } 2282 2282 -
lemon/bits/bezier.h
r997 r440 160 160 const Point d=(a+b)/2; 161 161 const Point e=(b+c)/2; 162 //const Point f=(d+e)/2;162 const Point f=(d+e)/2; 163 163 R f1=_f(Bezier3(p1,a,d,e),_d); 164 164 R f2=_f(Bezier3(e,d,c,p4),_d); -
lemon/bits/edge_set_extender.h
r1000 r966 524 524 // Returns the base node of the iterator 525 525 Node baseNode(const IncEdgeIt &e) const { 526 return e.direction ? this->u(e) : this->v(e);526 return e.direction ? u(e) : v(e); 527 527 } 528 528 // Running node of the iterator … … 530 530 // Returns the running node of the iterator 531 531 Node runningNode(const IncEdgeIt &e) const { 532 return e.direction ? this->v(e) : this->u(e);532 return e.direction ? v(e) : u(e); 533 533 } 534 534 -
lemon/bits/graph_extender.h
r998 r778 588 588 // Returns the base node of the iterator 589 589 Node baseNode(const IncEdgeIt &edge) const { 590 return edge._direction ? this->u(edge) : this->v(edge);590 return edge._direction ? u(edge) : v(edge); 591 591 } 592 592 // Running node of the iterator … … 594 594 // Returns the running node of the iterator 595 595 Node runningNode(const IncEdgeIt &edge) const { 596 return edge._direction ? this->v(edge) : this->u(edge);596 return edge._direction ? v(edge) : u(edge); 597 597 } 598 598 -
lemon/circulation.h
r998 r877 573 573 574 574 Node act; 575 Node bact=INVALID; 576 Node last_activated=INVALID; 575 577 while((act=_level->highestActive())!=INVALID) { 576 578 int actlevel=(*_level)[act]; -
lemon/concept_check.h
r997 r440 36 36 37 37 template <class T> inline void ignore_unused_variable_warning(const T&) { } 38 template <class T1, class T2>39 inline void ignore_unused_variable_warning(const T1&, const T2&) { }40 template <class T1, class T2, class T3>41 inline void ignore_unused_variable_warning(const T1&, const T2&,42 const T3&) { }43 template <class T1, class T2, class T3, class T4>44 inline void ignore_unused_variable_warning(const T1&, const T2&,45 const T3&, const T4&) { }46 template <class T1, class T2, class T3, class T4, class T5>47 inline void ignore_unused_variable_warning(const T1&, const T2&,48 const T3&, const T4&,49 const T5&) { }50 template <class T1, class T2, class T3, class T4, class T5, class T6>51 inline void ignore_unused_variable_warning(const T1&, const T2&,52 const T3&, const T4&,53 const T5&, const T6&) { }54 38 55 39 ///\e -
lemon/concepts/graph_components.h
r1000 r976 495 495 _GraphItemIt it3 = it1; 496 496 _GraphItemIt it4 = INVALID; 497 ignore_unused_variable_warning(it3);498 ignore_unused_variable_warning(it4);499 497 500 498 it2 = ++it1; … … 586 584 _GraphIncIt it3 = it1; 587 585 _GraphIncIt it4 = INVALID; 588 ignore_unused_variable_warning(it3);589 ignore_unused_variable_warning(it4);590 586 591 587 it2 = ++it1; -
lemon/concepts/maps.h
r997 r975 50 50 /// Returns the value associated with the given key. 51 51 Value operator[](const Key &) const { 52 return * (static_cast<Value *>(0)+1);52 return *static_cast<Value *>(0); 53 53 } 54 54 -
lemon/graph_to_eps.h
r998 r964 223 223 using T::_copyright; 224 224 225 using typenameT::NodeTextColorType;225 using T::NodeTextColorType; 226 226 using T::CUST_COL; 227 227 using T::DIST_COL; -
lemon/planarity.h
r999 r877 73 73 74 74 void discover(const Arc& arc) { 75 Node source = _graph.source(arc); 75 76 Node target = _graph.target(arc); 76 77 -
test/adaptors_test.cc
r998 r995 66 66 Digraph::Arc a2 = digraph.addArc(n1, n3); 67 67 Digraph::Arc a3 = digraph.addArc(n2, n3); 68 ignore_unused_variable_warning(a3);69 68 70 69 // Check the adaptor … … 101 100 Adaptor::Arc a7 = adaptor.addArc(n1, n4); 102 101 Adaptor::Arc a8 = adaptor.addArc(n1, n2); 103 ignore_unused_variable_warning(a6,a7,a8);104 102 105 103 adaptor.erase(a1); … … 761 759 Digraph::Arc a2 = digraph.addArc(n1, n3); 762 760 Digraph::Arc a3 = digraph.addArc(n2, n3); 763 ignore_unused_variable_warning(a1,a2,a3);764 761 765 762 checkGraphNodeList(adaptor, 6); -
test/bellman_ford_test.cc
r999 r880 191 191 192 192 ListPath<Digraph> path; 193 Value dist = 0;193 Value dist; 194 194 bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t); 195 195 -
test/connectivity_test.cc
r998 r877 69 69 Graph g(d); 70 70 Digraph::Node n = d.addNode(); 71 ignore_unused_variable_warning(n);72 71 73 72 check(stronglyConnected(d), "This digraph is strongly connected"); … … 247 246 Digraph::Node watch = d.addNode(); 248 247 Digraph::Node pants = d.addNode(); 249 ignore_unused_variable_warning(watch);250 248 251 249 d.addArc(socks, shoe); -
test/digraph_test.cc
r999 r877 65 65 a3 = G.addArc(n2, n3), 66 66 a4 = G.addArc(n2, n3); 67 ignore_unused_variable_warning(a2,a3,a4);68 67 69 68 checkGraphNodeList(G, 3); … … 94 93 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 95 94 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 96 ignore_unused_variable_warning(a1,a2,a3,a4);97 95 98 96 Node n4 = G.split(n2); … … 128 126 a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3), 129 127 a5 = G.addArc(n2, n4); 130 ignore_unused_variable_warning(a1,a2,a3,a5);131 128 132 129 checkGraphNodeList(G, 4); … … 208 205 a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1), 209 206 a5 = G.addArc(n2, n4); 210 ignore_unused_variable_warning(a2,a3,a4,a5);211 207 212 208 // Check arc deletion … … 256 252 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 257 253 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 258 ignore_unused_variable_warning(a1,a2,a3,a4);259 254 260 255 typename Digraph::Snapshot snapshot(G); … … 357 352 e1 = g.addArc(n1, n2), 358 353 e2 = g.addArc(n2, n3); 359 ignore_unused_variable_warning(e2);360 354 361 355 check(g.valid(n1), "Wrong validity check"); … … 443 437 a3 = g.addArc(n2, n3), 444 438 a4 = g.addArc(n2, n3); 445 ignore_unused_variable_warning(a2,a3,a4);446 439 447 440 digraphCopy(g, G).nodeRef(nref).run(); -
test/edge_set_test.cc
r998 r877 45 45 46 46 Digraph::Arc ga1 = digraph.addArc(n1, n2); 47 ignore_unused_variable_warning(ga1);48 47 49 48 ArcSet arc_set(digraph); 50 49 51 50 Digraph::Arc ga2 = digraph.addArc(n2, n1); 52 ignore_unused_variable_warning(ga2);53 51 54 52 checkGraphNodeList(arc_set, 2); … … 78 76 a3 = arc_set.addArc(n2, n3), 79 77 a4 = arc_set.addArc(n2, n3); 80 ignore_unused_variable_warning(a2,a3,a4);81 82 78 checkGraphNodeList(arc_set, 3); 83 79 checkGraphArcList(arc_set, 4); … … 115 111 116 112 Digraph::Arc ga1 = digraph.addArc(n1, n2); 117 ignore_unused_variable_warning(ga1);118 113 119 114 ArcSet arc_set(digraph); 120 115 121 116 Digraph::Arc ga2 = digraph.addArc(n2, n1); 122 ignore_unused_variable_warning(ga2);123 117 124 118 checkGraphNodeList(arc_set, 2); … … 148 142 a3 = arc_set.addArc(n2, n3), 149 143 a4 = arc_set.addArc(n2, n3); 150 ignore_unused_variable_warning(a2,a3,a4);151 152 144 checkGraphNodeList(arc_set, 3); 153 145 checkGraphArcList(arc_set, 4); … … 199 191 200 192 Digraph::Arc ga1 = digraph.addArc(n1, n2); 201 ignore_unused_variable_warning(ga1);202 193 203 194 EdgeSet edge_set(digraph); 204 195 205 196 Digraph::Arc ga2 = digraph.addArc(n2, n1); 206 ignore_unused_variable_warning(ga2);207 197 208 198 checkGraphNodeList(edge_set, 2); … … 241 231 e3 = edge_set.addEdge(n2, n3), 242 232 e4 = edge_set.addEdge(n2, n3); 243 ignore_unused_variable_warning(e2,e3,e4);244 245 233 checkGraphNodeList(edge_set, 3); 246 234 checkGraphEdgeList(edge_set, 4); … … 287 275 288 276 Digraph::Arc ga1 = digraph.addArc(n1, n2); 289 ignore_unused_variable_warning(ga1);290 277 291 278 EdgeSet edge_set(digraph); 292 279 293 280 Digraph::Arc ga2 = digraph.addArc(n2, n1); 294 ignore_unused_variable_warning(ga2);295 281 296 282 checkGraphNodeList(edge_set, 2); … … 329 315 e3 = edge_set.addEdge(n2, n3), 330 316 e4 = edge_set.addEdge(n2, n3); 331 ignore_unused_variable_warning(e2,e3,e4);332 333 317 checkGraphNodeList(edge_set, 3); 334 318 checkGraphEdgeList(edge_set, 4); -
test/euler_test.cc
r998 r877 102 102 Graph g(d); 103 103 Digraph::Node n = d.addNode(); 104 ignore_unused_variable_warning(n); 105 104 106 105 checkDiEulerIt(d); 107 106 checkDiEulerIt(g); … … 191 190 Digraph::Node n4 = d.addNode(); 192 191 Digraph::Node n5 = d.addNode(); 193 ignore_unused_variable_warning(n0,n4,n5);194 192 195 193 d.addArc(n1, n2); -
test/fractional_matching_test.cc
r999 r877 343 343 pv += weight[mwfm.matching(n)]; 344 344 SmartGraph::Node o = graph.target(mwfm.matching(n)); 345 ignore_unused_variable_warning(o);346 345 } else { 347 346 check(mwfm.nodeValue(n) == 0, "Invalid matching"); … … 408 407 pv += weight[mwpfm.matching(n)]; 409 408 SmartGraph::Node o = graph.target(mwpfm.matching(n)); 410 ignore_unused_variable_warning(o);411 409 } 412 410 -
test/graph_test.cc
r998 r877 67 67 Edge e2 = G.addEdge(n2, n1), 68 68 e3 = G.addEdge(n2, n3); 69 ignore_unused_variable_warning(e2,e3);70 69 71 70 checkGraphNodeList(G, 3); … … 100 99 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 101 100 e5 = G.addEdge(n4, n3); 102 ignore_unused_variable_warning(e1,e3,e4,e5);103 101 104 102 checkGraphNodeList(G, 4); … … 180 178 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 181 179 e5 = G.addEdge(n4, n3); 182 ignore_unused_variable_warning(e1,e3,e4,e5);183 180 184 181 // Check edge deletion … … 221 218 Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1), 222 219 e3 = G.addEdge(n2, n3); 223 ignore_unused_variable_warning(e1,e2,e3);224 220 225 221 checkGraphNodeList(G, 3); … … 386 382 e1 = g.addEdge(n1, n2), 387 383 e2 = g.addEdge(n2, n3); 388 ignore_unused_variable_warning(e2);389 384 390 385 check(g.valid(n1), "Wrong validity check"); … … 525 520 526 521 Node n = G.nodeFromId(dim); 527 ignore_unused_variable_warning(n);528 522 529 523 for (NodeIt n(G); n != INVALID; ++n) { -
test/maps_test.cc
r998 r942 104 104 NullMap<A,B> map1; 105 105 NullMap<A,B> map2 = map1; 106 ignore_unused_variable_warning(map2);107 106 map1 = nullMap<A,B>(); 108 107 } … … 115 114 ConstMap<A,B> map2 = B(); 116 115 ConstMap<A,B> map3 = map1; 117 ignore_unused_variable_warning(map2,map3);118 119 116 map1 = constMap<A>(B()); 120 117 map1 = constMap<A,B>(); … … 122 119 ConstMap<A,C> map4(C(1)); 123 120 ConstMap<A,C> map5 = map4; 124 ignore_unused_variable_warning(map5);125 126 121 map4 = constMap<A>(C(2)); 127 122 map4.setAll(C(3)); … … 144 139 IdentityMap<A> map1; 145 140 IdentityMap<A> map2 = map1; 146 ignore_unused_variable_warning(map2);147 148 141 map1 = identityMap<A>(); 149 142 … … 205 198 checkConcept<ReadMap<B,double>, CompMap>(); 206 199 CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>()); 207 ignore_unused_variable_warning(map1);208 200 CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>()); 209 ignore_unused_variable_warning(map2);210 201 211 202 SparseMap<double, bool> m1(false); m1[3.14] = true; … … 220 211 checkConcept<ReadMap<A,double>, CombMap>(); 221 212 CombMap map1 = CombMap(DoubleMap(), DoubleMap()); 222 ignore_unused_variable_warning(map1);223 213 CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>()); 224 ignore_unused_variable_warning(map2);225 214 226 215 check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3, … … 234 223 FunctorToMap<F> map1; 235 224 FunctorToMap<F> map2 = FunctorToMap<F>(F()); 236 ignore_unused_variable_warning(map2);237 238 225 B b = functorToMap(F())[A()]; 239 ignore_unused_variable_warning(b);240 226 241 227 checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >(); 242 228 MapToFunctor<ReadMap<A,B> > map = 243 229 MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); 244 ignore_unused_variable_warning(map);245 230 246 231 check(functorToMap(&func)[A()] == 3, … … 260 245 ConvertMap<ReadMap<double, int>, double> >(); 261 246 ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true)); 262 ignore_unused_variable_warning(map1);263 247 ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false)); 264 ignore_unused_variable_warning(map2);265 266 248 } 267 249 -
test/time_measure_test.cc
r997 r558 18 18 19 19 #include <lemon/time_measure.h> 20 #include <lemon/concept_check.h>21 20 22 21 using namespace lemon; … … 34 33 35 34 for(int i=0;i<1000;i++) 36 { 37 TimeStamp x(T); 38 ignore_unused_variable_warning(x); 39 } 35 TimeStamp x(T); 40 36 } 41 37
Note: See TracChangeset
for help on using the changeset viewer.