COIN-OR::LEMON - Graph Library

Changeset 986:e997802b855c in lemon-0.x for src/work/athos/mincostflow.h


Ignore:
Timestamp:
11/13/04 13:53:28 (17 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/mincostflow.h

    r921 r986  
    7474      ValueType operator[](typename ResGraph::Edge e) const {     
    7575        if (res_graph.forward(e))
    76           return  ol[e]-(pot[res_graph.head(e)]-pot[res_graph.tail(e)]);   
     76          return  ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);   
    7777        else
    78           return -ol[e]-(pot[res_graph.head(e)]-pot[res_graph.tail(e)]);   
     78          return -ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);   
    7979      }     
    8080       
     
    259259          while ( i != nonabundant_arcs.end() ){
    260260            if (flow[*i]>=buf){
    261               Node a = abundant_components.find(res_graph.head(*i));
    262               Node b = abundant_components.find(res_graph.tail(*i));
     261              Node a = abundant_components.find(res_graph.target(*i));
     262              Node b = abundant_components.find(res_graph.source(*i));
    263263              //Merge
    264264              if (a != b){
     
    285285                  while (n!=non_root){
    286286                    e = bfs_pred[n];
    287                     n = res_graph.tail(e);
     287                    n = res_graph.source(e);
    288288                    res_graph.augment(e,qty_to_augment);
    289289                  }
     
    455455      FOR_EACH_LOC(typename Graph::EdgeIt, e, graph){
    456456        //C^{\Pi}_{i,j}
    457         mod_pot = cost[e]-potential[graph.head(e)]+potential[graph.tail(e)];
     457        mod_pot = cost[e]-potential[graph.target(e)]+potential[graph.source(e)];
    458458        fl_e = flow[e];
    459459        //      std::cout << fl_e << std::endl;
     
    484484          return false;
    485485        }
    486         supdem[graph.tail(e)] += flow[e];
    487         supdem[graph.head(e)] -= flow[e];
     486        supdem[graph.source(e)] += flow[e];
     487        supdem[graph.target(e)] -= flow[e];
    488488      }
    489489      //write_property_vector(supdem, "supdem");
Note: See TracChangeset for help on using the changeset viewer.