Changeset 279:be43902fadb7 in lemon0.x for src/work/edmonds_karp.h
 Timestamp:
 04/03/04 16:22:33 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@393
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/edmonds_karp.h
r269 r279 353 353 FilterResGW filter_res_graph(res_graph, dist); 354 354 typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph); 355 for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) { 356 res_graph_to_F.set(n, F.addNode()); 355 { 356 typename ResGW::NodeIt n; 357 for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) { 358 res_graph_to_F.set(n, F.addNode()); 359 } 357 360 } 358 361 … … 364 367 //Making F to the graph containing the edges of the residual graph 365 368 //which are in some shortest paths 366 for(typename FilterResGW::EdgeIt e=filter_res_graph.template first<typename FilterResGW::EdgeIt>(); filter_res_graph.valid(e); filter_res_graph.next(e)) { 367 //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) { 369 { 370 typename FilterResGW::EdgeIt e; 371 for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) { 372 //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) { 368 373 typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e))); 369 374 original_edge.update(); … … 372 377 residual_capacity.set(f, res_graph.resCap(e)); 373 378 //} 379 } 374 380 } 375 381 … … 447 453 MG F; 448 454 typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph); 449 for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) { 450 res_graph_to_F.set(n, F.addNode()); 455 { 456 typename ResGW::NodeIt n; 457 for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) { 458 res_graph_to_F.set(n, F.addNode()); 459 } 451 460 } 452 461
Note: See TracChangeset
for help on using the changeset viewer.