blocking flow improvement
authormarci
Fri, 27 Feb 2004 13:58:41 +0000
changeset 1351e5060d1fa1d
parent 134 e606071614f0
child 136 e342e66d9762
blocking flow improvement
src/work/edmonds_karp.hh
     1.1 --- a/src/work/edmonds_karp.hh	Fri Feb 27 12:58:17 2004 +0000
     1.2 +++ b/src/work/edmonds_karp.hh	Fri Feb 27 13:58:41 2004 +0000
     1.3 @@ -641,10 +641,13 @@
     1.4  	    typename MutableGraph::EdgeIt e=pred.get(n);
     1.5  	    original_edge.get(e).augment(augment_value); 
     1.6  	    n=F.tail(e);
     1.7 -	    F.erase(e);
     1.8 +	    if (free_on_edge.get(e)==augment_value) 
     1.9 +	      F.erase(e); 
    1.10 +	    else 
    1.11 +	      free_on_edge.set(e, free_on_edge.get(e)-augment_value);
    1.12  	  }
    1.13  	}
    1.14 -
    1.15 +      
    1.16        }
    1.17              
    1.18        return _augment;