COIN-OR::LEMON - Graph Library

Changeset 505:8589c0658839 in lemon-0.x for src


Ignore:
Timestamp:
05/03/04 11:00:09 (20 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@665
Message:

I changed it to correspond changing requirements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/preflow_push.hh

    r331 r505  
    2626    typedef typename Graph::OutEdgeIt OutEdgeIt;
    2727    typedef typename Graph::InEdgeIt InEdgeIt;
     28    typedef typename Graph::EdgeMap<T> CapacityType;
     29
     30    typedef ResGraphWrapper<const Graph,int,CapacityType,CapacityType> ResGraphType;
    2831
    2932
     
    4851    Node s;
    4952    Node t;
    50     typename Graph::EdgeMap<T> &capacity;
     53    CapacityType &capacity;
    5154
    5255    //output
    53     typename Graph::EdgeMap<T> preflow;
     56    CapacityType preflow;
    5457    T maxflow_value;
    5558 
     
    132135      cout<<endl;
    133136    }
    134 
     137    /*
    135138    //Modifies the excess of the node and makes sufficient changes
    136139    void modify_excess(const Node& a ,T v){
     
    156159
    157160    }
    158 
     161    */
    159162    //Gives the active node to work with
    160163    //(depending on the implementation to be used)
     
    379382
    380383
     384        //Out edges from node a
     385        {
     386          ResGraphType::OutEdgeIt j=res_graph.first(j,a);
     387          while (res_graph.valid(j) && e){
     388            if (is_admissible_forward_edge(j,new_level)){
     389              v=min(e,res_graph.resCap(j));
     390              e -= v;
     391              //New node might become active
     392              if (excess[res_graph.head(j)]==0){
     393                make_active(res_graph.head(j));
     394              }
     395              res_graph.augment(j,v);
     396              excess[res_graph.tail(j)] -= v;
     397              excess[res_graph.head(j)] += v;
     398            }
     399            res_graph.next(j);
     400          }
     401        }
     402
     403        /*
    381404        //Out edges from node a
    382405        {
     
    412435          }
    413436        }
     437        */
    414438
    415439        //if (G.id(a)==999)
Note: See TracChangeset for help on using the changeset viewer.