COIN-OR::LEMON - Graph Library

Changeset 776:f2994a2b10b2 in lemon-0.x for src/hugo/mincostflows.h


Ignore:
Timestamp:
08/31/04 15:40:07 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1069
Message:

minlengthpaths_test.cc is already hugo++ comform and is compilable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/mincostflows.h

    r758 r776  
    117117      total_length = 0;
    118118     
    119       FOR_EACH_LOC(typename Graph::EdgeIt, e, G){
     119      for(typename Graph::EdgeIt e=loopFirst(typename Graph::EdgeIt(), (G)); e!=INVALID; ++e){
    120120        flow.set(e,0);
    121121      }
    122122
    123123      //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){
    125125        potential.set(n,0);
    126126      }
     
    145145       
    146146        //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){
    148150          potential[n] += dijkstra.distMap()[n];
    149151        }
     
    196198      Length mod_pot;
    197199      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){
    199203        //C^{\Pi}_{i,j}
    200204        mod_pot = length[e]-potential[G.head(e)]+potential[G.tail(e)];
Note: See TracChangeset for help on using the changeset viewer.