COIN-OR::LEMON - Graph Library

Changeset 196:8a9b9360463e in lemon-0.x for src/work/edmonds_karp.h


Ignore:
Timestamp:
03/17/04 17:10:33 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@273
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/edmonds_karp.h

    r194 r196  
    564564      typename AugGraph::NodeMap<AugEdge> pred(res_graph);
    565565      for(NodeIt s=G->template first<NodeIt>(); G->valid(s); G->next(s)) {
    566         Number f=0;
    567         for(OutEdgeIt e=G->template first<OutEdgeIt>(s); G->valid(e); G->next(e))
    568           f+=flow->get(e);
    569         if (f<1) {
    570           res_bfs.pushAndSetReached(s);
    571           pred.set(s, AugEdge(INVALID));
     566        if (S->get(s)) {
     567          Number f=0;
     568          for(OutEdgeIt e=G->template first<OutEdgeIt>(s); G->valid(e); G->next(e))
     569            f+=flow->get(e);
     570          if (f<1) {
     571            res_bfs.pushAndSetReached(s);
     572            pred.set(s, AugEdge(INVALID));
     573          }
    572574        }
    573575      }
Note: See TracChangeset for help on using the changeset viewer.