Changeset 776:f2994a2b10b2 in lemon-0.x for src/hugo/mincostflows.h
- Timestamp:
- 08/31/04 15:40:07 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1069
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/mincostflows.h
r758 r776 117 117 total_length = 0; 118 118 119 FOR_EACH_LOC(typename Graph::EdgeIt, e, G){119 for(typename Graph::EdgeIt e=loopFirst(typename Graph::EdgeIt(), (G)); e!=INVALID; ++e){ 120 120 flow.set(e,0); 121 121 } 122 122 123 123 //Initialize the potential to zero 124 FOR_EACH_LOC(typename Graph::NodeIt, n, G){124 for(typename Graph::NodeIt n=loopFirst(typename Graph::NodeIt(), (G)); n!=INVALID; ++n){ 125 125 potential.set(n,0); 126 126 } … … 145 145 146 146 //We have to change the potential 147 FOR_EACH_LOC(typename ResGraphType::NodeIt, n, res_graph){ 147 //#define FOR_EACH_LOC(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e)) 148 //FOR_EACH_LOC(typename ResGraphType::NodeIt, n, res_graph){ 149 for(typename ResGraphType::NodeIt n=loopFirst(typename ResGraphType::NodeIt(), (res_graph)); n!=INVALID; ++n){ 148 150 potential[n] += dijkstra.distMap()[n]; 149 151 } … … 196 198 Length mod_pot; 197 199 Length fl_e; 198 FOR_EACH_LOC(typename Graph::EdgeIt, e, G){ 200 //#define FOR_EACH_LOC(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e)) 201 //FOR_EACH_LOC(typename Graph::EdgeIt, e, G){ 202 for(typename Graph::EdgeIt e=loopFirst(typename Graph::EdgeIt(), (G)); e!=INVALID; ++e){ 199 203 //C^{\Pi}_{i,j} 200 204 mod_pot = length[e]-potential[G.head(e)]+potential[G.tail(e)];
Note: See TracChangeset
for help on using the changeset viewer.