1.1 --- a/src/work/edmonds_karp.h Fri Apr 02 18:31:19 2004 +0000
1.2 +++ b/src/work/edmonds_karp.h Sat Apr 03 14:22:33 2004 +0000
1.3 @@ -352,8 +352,11 @@
1.4 typedef SubGraphWrapper<ResGW, DistanceMap<ResGW> > FilterResGW;
1.5 FilterResGW filter_res_graph(res_graph, dist);
1.6 typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph);
1.7 - for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) {
1.8 - res_graph_to_F.set(n, F.addNode());
1.9 + {
1.10 + typename ResGW::NodeIt n;
1.11 + for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) {
1.12 + res_graph_to_F.set(n, F.addNode());
1.13 + }
1.14 }
1.15
1.16 typename MG::Node sF=res_graph_to_F.get(s);
1.17 @@ -363,14 +366,17 @@
1.18
1.19 //Making F to the graph containing the edges of the residual graph
1.20 //which are in some shortest paths
1.21 - for(typename FilterResGW::EdgeIt e=filter_res_graph.template first<typename FilterResGW::EdgeIt>(); filter_res_graph.valid(e); filter_res_graph.next(e)) {
1.22 - //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
1.23 + {
1.24 + typename FilterResGW::EdgeIt e;
1.25 + for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) {
1.26 + //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
1.27 typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
1.28 original_edge.update();
1.29 original_edge.set(f, e);
1.30 residual_capacity.update();
1.31 residual_capacity.set(f, res_graph.resCap(e));
1.32 //}
1.33 + }
1.34 }
1.35
1.36 bool __augment=true;
1.37 @@ -446,8 +452,11 @@
1.38 //with the set of edges which are on shortest paths
1.39 MG F;
1.40 typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph);
1.41 - for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) {
1.42 - res_graph_to_F.set(n, F.addNode());
1.43 + {
1.44 + typename ResGW::NodeIt n;
1.45 + for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) {
1.46 + res_graph_to_F.set(n, F.addNode());
1.47 + }
1.48 }
1.49
1.50 typename MG::Node sF=res_graph_to_F.get(s);