Another slight modifications.
1.1 --- a/src/hugo/mincostflows.h Thu May 13 16:00:18 2004 +0000
1.2 +++ b/src/hugo/mincostflows.h Thu May 13 17:33:40 2004 +0000
1.3 @@ -118,9 +118,9 @@
1.4 FOR_EACH_LOC(typename Graph::EdgeIt, e, G){
1.5 flow.set(e,0);
1.6 }
1.7 -
1.8 +
1.9 + //Initialize the potential to zero
1.10 FOR_EACH_LOC(typename Graph::NodeIt, n, G){
1.11 - //cout << potential[n]<<endl;
1.12 potential.set(n,0);
1.13 }
1.14
1.15 @@ -129,10 +129,6 @@
1.16 //We need a residual graph
1.17 ResGraphType res_graph(G, capacity, flow);
1.18
1.19 - //Initialize the copy of the Dijkstra potential to zero
1.20 -
1.21 - //typename ResGraphType::template NodeMap<Length> potential(res_graph);
1.22 -
1.23
1.24 ModLengthMap mod_length(res_graph, length, potential);
1.25
1.26 @@ -146,19 +142,11 @@
1.27 break;
1.28 };
1.29
1.30 - //We have to copy the potential
1.31 + //We have to change the potential
1.32 FOR_EACH_LOC(typename ResGraphType::NodeIt, n, res_graph){
1.33 potential[n] += dijkstra.distMap()[n];
1.34 }
1.35 - /*
1.36 - {
1.37 - //We have to copy the potential
1.38 - typename ResGraphType::NodeIt n;
1.39 - for ( res_graph.first(n) ; res_graph.valid(n) ; res_graph.next(n) ) {
1.40 - potential[n] += dijkstra.distMap()[n];
1.41 - }
1.42 - }
1.43 - */
1.44 +
1.45
1.46 //Augmenting on the sortest path
1.47 Node n=t;