# HG changeset patch # User athos # Date 1077535061 0 # Node ID 9b3345f9d8ed1a169677070b0e5f663c3f65eb5d # Parent 38e16c594a4f0a8cc3ca43d89b89ba4de6eb910c Alpar, nezz bele diff -r 38e16c594a4f -r 9b3345f9d8ed src/work/athos/preflow_push.hh --- a/src/work/athos/preflow_push.hh Mon Feb 23 07:05:27 2004 +0000 +++ b/src/work/athos/preflow_push.hh Mon Feb 23 11:17:41 2004 +0000 @@ -8,7 +8,7 @@ //#include //#include -#include "reverse_bfs.hh" +#include using namespace std; @@ -175,7 +175,7 @@ //Gives the active node to work with //(depending on the implementation to be used) NodeIt get_active_node(){ - //cout<=0) { + + NodeIt a=active_nodes[highest_active].front(); active_nodes[highest_active].pop_front(); + return a; } else { @@ -304,6 +307,7 @@ //If the preflow is less than the capacity on the given edge //then it is an edge in the residual graph bool is_admissible_forward_edge(OutEdgeIt j, int& new_level){ + if (capacity.get(j)>preflow.get(j)){ if(level.get(G.tail(j))==level.get(G.head(j))+1){ return true; @@ -319,8 +323,10 @@ //If the preflow is greater than 0 on the given edge //then the edge reversd is an edge in the residual graph bool is_admissible_backward_edge(InEdgeIt j, int& new_level){ + if (0::run() { preprocess(); - + //write_property_vector(level,"level"); T e,v; NodeIt a; while (a=get_active_node(), a.valid()){ + //cout<