COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
11/13/04 13:53:28 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
Message:

Naming changes:

  • head -> target
  • tail -> source
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/preflow_push_wogw.h

    r921 r986  
    140140    //This private procedure is supposed to modify the preflow on edge j
    141141    //by value v (which can be positive or negative as well)
    142     //and maintain the excess on the head and tail
     142    //and maintain the excess on the target and source
    143143    //Here we do not check whether this is possible or not
    144144    void modify_preflow(Edge j, const T& v){
     
    148148
    149149
    150       //Modifiyng the head
    151       modify_excess(G.head(j),v);
    152        
    153       //Modifiyng the tail
    154       modify_excess(G.tail(j),-v);
     150      //Modifiyng the target
     151      modify_excess(G.target(j),v);
     152       
     153      //Modifiyng the source
     154      modify_excess(G.source(j),-v);
    155155
    156156    }
     
    273273        InEdgeIt e;
    274274        for(G.first(e,v); G.valid(e); G.next(e)) {
    275           Node w=G.tail(e);
     275          Node w=G.source(e);
    276276          if ( level[w] == number_of_nodes && w != s ) {
    277277            bfs_queue.push(w);
     
    311311      for(OutEdgeIt j=G.template first<OutEdgeIt>(s); G.valid(j); G.next(j)){
    312312        modify_preflow(j,capacity[j] );
    313         make_active(G.head(j));
    314         int lev=level[G.head(j)];
     313        make_active(G.target(j));
     314        int lev=level[G.target(j)];
    315315        if(highest_active<lev){
    316316          highest_active=lev;
     
    326326
    327327      if (capacity[j]>preflow[j]){
    328         if(level[G.tail(j)]==level[G.head(j)]+1){
     328        if(level[G.source(j)]==level[G.target(j)]+1){
    329329          return true;
    330330        }
    331331        else{
    332           if (level[G.head(j)] < new_level)
    333             new_level=level[G.head(j)];
     332          if (level[G.target(j)] < new_level)
     333            new_level=level[G.target(j)];
    334334        }
    335335      }
     
    342342     
    343343      if (0<preflow[j]){
    344         if(level[G.tail(j)]==level[G.head(j)]-1){
     344        if(level[G.source(j)]==level[G.target(j)]-1){
    345345         
    346346          return true;
    347347        }
    348348        else{
    349           if (level[G.tail(j)] < new_level)
    350             new_level=level[G.tail(j)];
     349          if (level[G.source(j)] < new_level)
     350            new_level=level[G.source(j)];
    351351        }
    352352       
     
    389389              e -= v;
    390390              //New node might become active
    391               if (excess[G.head(j)]==0){
    392                 make_active(G.head(j));
     391              if (excess[G.target(j)]==0){
     392                make_active(G.target(j));
    393393              }
    394394              modify_preflow(j,v);
     
    405405              e -= v;
    406406              //New node might become active
    407               if (excess[G.tail(j)]==0){
    408                 make_active(G.tail(j));
     407              if (excess[G.source(j)]==0){
     408                make_active(G.source(j));
    409409              }
    410410              modify_preflow(j,-v);
Note: See TracChangeset for help on using the changeset viewer.