Changeset 505:8589c0658839 in lemon0.x for src/work/athos/preflow_push.hh
 Timestamp:
 05/03/04 11:00:09 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@665
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/athos/preflow_push.hh
r331 r505 26 26 typedef typename Graph::OutEdgeIt OutEdgeIt; 27 27 typedef typename Graph::InEdgeIt InEdgeIt; 28 typedef typename Graph::EdgeMap<T> CapacityType; 29 30 typedef ResGraphWrapper<const Graph,int,CapacityType,CapacityType> ResGraphType; 28 31 29 32 … … 48 51 Node s; 49 52 Node t; 50 typename Graph::EdgeMap<T>&capacity;53 CapacityType &capacity; 51 54 52 55 //output 53 typename Graph::EdgeMap<T>preflow;56 CapacityType preflow; 54 57 T maxflow_value; 55 58 … … 132 135 cout<<endl; 133 136 } 134 137 /* 135 138 //Modifies the excess of the node and makes sufficient changes 136 139 void modify_excess(const Node& a ,T v){ … … 156 159 157 160 } 158 161 */ 159 162 //Gives the active node to work with 160 163 //(depending on the implementation to be used) … … 379 382 380 383 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 /* 381 404 //Out edges from node a 382 405 { … … 412 435 } 413 436 } 437 */ 414 438 415 439 //if (G.id(a)==999)
Note: See TracChangeset
for help on using the changeset viewer.