diff --git a/lemon/circulation.h b/lemon/circulation.h --- a/lemon/circulation.h +++ b/lemon/circulation.h @@ -64,15 +64,15 @@ /// It must conform to the \ref concepts::ReadMap "ReadMap" concept. typedef SM SupplyMap; - /// \brief The type of the flow values. - typedef typename SupplyMap::Value Flow; + /// \brief The type of the flow and supply values. + typedef typename SupplyMap::Value Value; /// \brief The type of the map that stores the flow values. /// /// The type of the map that stores the flow values. /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" /// concept. - typedef typename Digraph::template ArcMap FlowMap; + typedef typename Digraph::template ArcMap FlowMap; /// \brief Instantiates a FlowMap. /// @@ -104,7 +104,7 @@ /// \brief The tolerance used by the algorithm /// /// The tolerance used by the algorithm to handle inexact computation. - typedef lemon::Tolerance Tolerance; + typedef lemon::Tolerance Tolerance; }; @@ -187,8 +187,8 @@ typedef TR Traits; ///The type of the digraph the algorithm runs on. typedef typename Traits::Digraph Digraph; - ///The type of the flow values. - typedef typename Traits::Flow Flow; + ///The type of the flow and supply values. + typedef typename Traits::Value Value; ///The type of the lower bound map. typedef typename Traits::LowerMap LowerMap; @@ -221,7 +221,7 @@ Elevator* _level; bool _local_level; - typedef typename Digraph::template NodeMap ExcessMap; + typedef typename Digraph::template NodeMap ExcessMap; ExcessMap* _excess; Tolerance _tol; @@ -530,7 +530,7 @@ (*_excess)[_g.target(e)] += (*_lo)[e]; (*_excess)[_g.source(e)] -= (*_lo)[e]; } else { - Flow fc = -(*_excess)[_g.target(e)]; + Value fc = -(*_excess)[_g.target(e)]; _flow->set(e, fc); (*_excess)[_g.target(e)] = 0; (*_excess)[_g.source(e)] -= fc; @@ -563,11 +563,11 @@ while((act=_level->highestActive())!=INVALID) { int actlevel=(*_level)[act]; int mlevel=_node_num; - Flow exc=(*_excess)[act]; + Value exc=(*_excess)[act]; for(OutArcIt e(_g,act);e!=INVALID; ++e) { Node v = _g.target(e); - Flow fc=(*_up)[e]-(*_flow)[e]; + Value fc=(*_up)[e]-(*_flow)[e]; if(!_tol.positive(fc)) continue; if((*_level)[v](*_up)[e]) return false; for(NodeIt n(_g);n!=INVALID;++n) { - Flow dif=-(*_supply)[n]; + Value dif=-(*_supply)[n]; for(InArcIt e(_g,n);e!=INVALID;++e) dif-=(*_flow)[e]; for(OutArcIt e(_g,n);e!=INVALID;++e) dif+=(*_flow)[e]; if(_tol.negative(dif)) return false; @@ -765,10 +765,10 @@ ///\sa barrierMap() bool checkBarrier() const { - Flow delta=0; - Flow inf_cap = std::numeric_limits::has_infinity ? - std::numeric_limits::infinity() : - std::numeric_limits::max(); + Value delta=0; + Value inf_cap = std::numeric_limits::has_infinity ? + std::numeric_limits::infinity() : + std::numeric_limits::max(); for(NodeIt n(_g);n!=INVALID;++n) if(barrier(n)) delta-=(*_supply)[n];