COIN-OR::LEMON - Graph Library

Changeset 650:588ff2ca55bd in lemon-0.x for src/work/jacint/max_flow.h


Ignore:
Timestamp:
05/20/04 17:40:59 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@850
Message:

a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/max_flow.h

    r647 r650  
    6464    FlowMap* flow;
    6565    int n;      //the number of nodes of G
    66     typedef ResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;
     66    //    typedef ResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;   
     67    typedef ExpResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;
    6768    typedef typename ResGW::OutEdgeIt ResGWOutEdgeIt;
    6869    typedef typename ResGW::Edge ResGWEdge;
     
    140141        map(&_map), number_of_augmentations(&_number_of_augmentations) { }
    141142      void set(const Node& n, bool b) {
    142         map->set(n, *number_of_augmentations);
     143        if (b)
     144          map->set(n, *number_of_augmentations);
     145        else
     146          map->set(n, *number_of_augmentations-1);
    143147      }
    144148      bool operator[](const Node& n) const {
     
    942946
    943947    if (status!=AFTER_AUGMENTING) {
    944       FOR_EACH_LOC(typename Graph::NodeIt, e, *g) level.set(e, -1);
    945       number_of_augmentations=0;
     948      FOR_EACH_LOC(typename Graph::NodeIt, e, *g) level.set(e, 3*n);
     949      number_of_augmentations=3*n+1;
    946950    } else {
    947951      ++number_of_augmentations;
Note: See TracChangeset for help on using the changeset viewer.