Changeset 986:e997802b855c in lemon0.x for src/work/athos/mincostflow.h
 Timestamp:
 11/13/04 13:53:28 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1376
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/athos/mincostflow.h
r921 r986 74 74 ValueType operator[](typename ResGraph::Edge e) const { 75 75 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)]); 77 77 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)]); 79 79 } 80 80 … … 259 259 while ( i != nonabundant_arcs.end() ){ 260 260 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)); 263 263 //Merge 264 264 if (a != b){ … … 285 285 while (n!=non_root){ 286 286 e = bfs_pred[n]; 287 n = res_graph. tail(e);287 n = res_graph.source(e); 288 288 res_graph.augment(e,qty_to_augment); 289 289 } … … 455 455 FOR_EACH_LOC(typename Graph::EdgeIt, e, graph){ 456 456 //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)]; 458 458 fl_e = flow[e]; 459 459 // std::cout << fl_e << std::endl; … … 484 484 return false; 485 485 } 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]; 488 488 } 489 489 //write_property_vector(supdem, "supdem");
Note: See TracChangeset
for help on using the changeset viewer.