diff -r 1d685ac667ec -r 719220885b90 lemon/circulation.h --- a/lemon/circulation.h Tue Jun 05 17:24:35 2007 +0000 +++ b/lemon/circulation.h Tue Jun 05 17:27:54 2007 +0000 @@ -37,7 +37,7 @@ ///This class implements a preflow algorithm ///for the Network Circulation Problem. ///The exact formulation of this problem is the following. - /// \f[\sum_{e\in\rho(v)}x(e)-\sum_{e\in\delta(v)}x(e)\leq delta(v)\quad \forall v\in V \f] + /// \f[\sum_{e\in\rho(v)}x(e)-\sum_{e\in\delta(v)}x(e)\leq -delta(v)\quad \forall v\in V \f] /// \f[ lo(e)\leq x(e) \leq up(e) \quad \forall e\in E \f] /// template_up[e]) return false; for(NodeIt n(_g);n!=INVALID;++n) { - Value dif=_delta[n]; + Value dif=-_delta[n]; for(InEdgeIt e(_g,n);e!=INVALID;++e) dif-=x[e]; for(OutEdgeIt e(_g,n);e!=INVALID;++e) dif+=x[e]; if(_tol.negative(dif)) return false; @@ -140,7 +140,7 @@ Value delta=0; for(NodeIt n(_g);n!=INVALID;++n) if(bar[n]) - delta+=_delta[n]; + delta-=_delta[n]; for(EdgeIt e(_g);e!=INVALID;++e) { Node s=_g.source(e); @@ -279,7 +279,7 @@ ///Return a barrier ///Barrier is a set \e B of nodes for which - /// \f[ \sum_{v\in B}delta(v)<\sum_{e\in\rho(B)}lo(e)-\sum_{e\in\delta(B)}up(e) \f] + /// \f[ \sum_{v\in B}-delta(v)<\sum_{e\in\rho(B)}lo(e)-\sum_{e\in\delta(B)}up(e) \f] ///holds. The existence of a set with this property prooves that a feasible ///flow cannot exists. ///\pre The run() must have been executed, and its return value was -1.