Changeset 119:9b3345f9d8ed in lemon-0.x for src/work
- Timestamp:
- 02/23/04 12:17:41 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@155
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/athos/preflow_push.hh
r105 r119 9 9 //#include <marci_graph_traits.hh> 10 10 11 #include "reverse_bfs.hh"11 #include <reverse_bfs.hh> 12 12 13 13 using namespace std; … … 176 176 //(depending on the implementation to be used) 177 177 NodeIt get_active_node(){ 178 //cout<<highest_active<<endl;178 179 179 180 180 switch(implementation) { … … 187 187 188 188 if( highest_active>=0) { 189 190 189 191 NodeIt a=active_nodes[highest_active].front(); 190 192 active_nodes[highest_active].pop_front(); 193 191 194 return a; 192 195 } … … 305 308 //then it is an edge in the residual graph 306 309 bool is_admissible_forward_edge(OutEdgeIt j, int& new_level){ 310 307 311 if (capacity.get(j)>preflow.get(j)){ 308 312 if(level.get(G.tail(j))==level.get(G.head(j))+1){ … … 320 324 //then the edge reversd is an edge in the residual graph 321 325 bool is_admissible_backward_edge(InEdgeIt j, int& new_level){ 326 322 327 if (0<preflow.get(j)){ 323 328 if(level.get(G.tail(j))==level.get(G.head(j))-1){ 329 324 330 return true; 325 331 } … … 340 346 341 347 preprocess(); 342 348 //write_property_vector(level,"level"); 343 349 T e,v; 344 350 NodeIt a; 345 351 while (a=get_active_node(), a.valid()){ 352 346 353 //cout<<G.id(a)<<endl; 347 354 //write_property_vector(excess,"excess"); … … 352 359 e = excess.get(a); 353 360 while (!go_to_next_node){ 354 355 361 //Initial value for the new level for the active node we are dealing with 356 362 int new_level=2*number_of_nodes; … … 392 398 } 393 399 400 //if (G.id(a)==999) 401 //cout<<new_level<<" e: "<<e<<endl; 394 402 //cout<<G.id(a)<<" "<<new_level<<endl; 395 403
Note: See TracChangeset
for help on using the changeset viewer.