diff -r 49d4fe04fbc0 -r 58243a389464 src/hugo/max_flow.h --- a/src/hugo/max_flow.h Thu Aug 05 11:41:36 2004 +0000 +++ b/src/hugo/max_flow.h Tue Aug 17 10:24:19 2004 +0000 @@ -344,16 +344,18 @@ } - /// Returns the maximum value of a flow. + /// Returns the value of the maximum flow. - /// Returns the maximum value of a flow, by counting the - /// over-flow of the target node \ref t. + /// Returns the excess of the target node \ref t. + /// After running \ref preflowPhase1, this is the value of + /// the maximum flow. /// It can be called already after running \ref preflowPhase1. Num flowValue() const { - Num a=0; - for(InEdgeIt e(*g,t);g->valid(e);g->next(e)) a+=(*flow)[e]; - for(OutEdgeIt e(*g,t);g->valid(e);g->next(e)) a-=(*flow)[e]; - return a; +// Num a=0; +// for(InEdgeIt e(*g,t);g->valid(e);g->next(e)) a+=(*flow)[e]; +// for(OutEdgeIt e(*g,t);g->valid(e);g->next(e)) a-=(*flow)[e]; +// return a; + return excess[t]; //marci figyu: excess[t] epp ezt adja preflow 1. fazisa utan }