COIN-OR::LEMON - Graph Library

Changeset 101:d2ac583ed195 in lemon-0.x for src/work/jacint/preflow_hl2.h


Ignore:
Timestamp:
02/18/04 22:50:45 (17 years ago)
Author:
jacint
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@131
Message:

another heuristic

File:
1 edited

Legend:

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

    r98 r101  
    8181      TMap excess(G);
    8282     
    83       std::vector<int> numb(n+1);   
     83      std::vector<int> numb(n);   
    8484      /*
    8585        The number of nodes on level i < n. It is
     
    119119      for(OutEdgeIt e=G.template first<OutEdgeIt>(s); e.valid(); ++e)
    120120        {
    121           if ( capacity.get(e) == 0 ) continue;
     121          T c=capacity.get(e);
     122          if ( c == 0 ) continue;
    122123          NodeIt w=G.head(e);
    123124          if ( w!=s ) {   
    124125            if ( excess.get(w) == 0 && w!=t ) stack[level.get(w)].push(w);
    125             flow.set(e, capacity.get(e));
    126             excess.set(w, excess.get(w)+capacity.get(e));
    127           } 
     126            flow.set(e, c);
     127            excess.set(w, excess.get(w)+c);
     128          }
    128129        }
    129130
     
    156157          int lev=level.get(w);
    157158          int exc=excess.get(w);
    158           int newlevel=2*n-2;      //In newlevel we bound the next level of w.
     159          int newlevel=2*n;      //In newlevel we bound the next level of w.
    159160         
    160161          //  if ( level.get(w) < n ) { //Nem tudom ez mukodik-e
Note: See TracChangeset for help on using the changeset viewer.