Changeset 641:756a5ec551c8 in lemon1.2 for lemon/circulation.h
 Timestamp:
 04/29/09 14:25:51 (11 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/circulation.h
r622 r641 65 65 typedef SM SupplyMap; 66 66 67 /// \brief The type of the flow values.68 typedef typename SupplyMap::Value Flow;67 /// \brief The type of the flow and supply values. 68 typedef typename SupplyMap::Value Value; 69 69 70 70 /// \brief The type of the map that stores the flow values. … … 73 73 /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" 74 74 /// concept. 75 typedef typename Digraph::template ArcMap< Flow> FlowMap;75 typedef typename Digraph::template ArcMap<Value> FlowMap; 76 76 77 77 /// \brief Instantiates a FlowMap. … … 105 105 /// 106 106 /// The tolerance used by the algorithm to handle inexact computation. 107 typedef lemon::Tolerance< Flow> Tolerance;107 typedef lemon::Tolerance<Value> Tolerance; 108 108 109 109 }; … … 188 188 ///The type of the digraph the algorithm runs on. 189 189 typedef typename Traits::Digraph Digraph; 190 ///The type of the flow values.191 typedef typename Traits:: Flow Flow;190 ///The type of the flow and supply values. 191 typedef typename Traits::Value Value; 192 192 193 193 ///The type of the lower bound map. … … 222 222 bool _local_level; 223 223 224 typedef typename Digraph::template NodeMap< Flow> ExcessMap;224 typedef typename Digraph::template NodeMap<Value> ExcessMap; 225 225 ExcessMap* _excess; 226 226 … … 531 531 (*_excess)[_g.source(e)] = (*_lo)[e]; 532 532 } else { 533 Flowfc = (*_excess)[_g.target(e)];533 Value fc = (*_excess)[_g.target(e)]; 534 534 _flow>set(e, fc); 535 535 (*_excess)[_g.target(e)] = 0; … … 564 564 int actlevel=(*_level)[act]; 565 565 int mlevel=_node_num; 566 Flowexc=(*_excess)[act];566 Value exc=(*_excess)[act]; 567 567 568 568 for(OutArcIt e(_g,act);e!=INVALID; ++e) { 569 569 Node v = _g.target(e); 570 Flowfc=(*_up)[e](*_flow)[e];570 Value fc=(*_up)[e](*_flow)[e]; 571 571 if(!_tol.positive(fc)) continue; 572 572 if((*_level)[v]<actlevel) { … … 592 592 for(InArcIt e(_g,act);e!=INVALID; ++e) { 593 593 Node v = _g.source(e); 594 Flowfc=(*_flow)[e](*_lo)[e];594 Value fc=(*_flow)[e](*_lo)[e]; 595 595 if(!_tol.positive(fc)) continue; 596 596 if((*_level)[v]<actlevel) { … … 662 662 ///@{ 663 663 664 /// \brief Returns the flow on the given arc.665 /// 666 /// Returns the flow on the given arc.664 /// \brief Returns the flow value on the given arc. 665 /// 666 /// Returns the flow value on the given arc. 667 667 /// 668 668 /// \pre Either \ref run() or \ref init() must be called before 669 669 /// using this function. 670 Flowflow(const Arc& arc) const {670 Value flow(const Arc& arc) const { 671 671 return (*_flow)[arc]; 672 672 } … … 751 751 for(NodeIt n(_g);n!=INVALID;++n) 752 752 { 753 Flowdif=(*_supply)[n];753 Value dif=(*_supply)[n]; 754 754 for(InArcIt e(_g,n);e!=INVALID;++e) dif=(*_flow)[e]; 755 755 for(OutArcIt e(_g,n);e!=INVALID;++e) dif+=(*_flow)[e]; … … 766 766 bool checkBarrier() const 767 767 { 768 Flowdelta=0;769 Flow inf_cap = std::numeric_limits<Flow>::has_infinity ?770 std::numeric_limits< Flow>::infinity() :771 std::numeric_limits< Flow>::max();768 Value delta=0; 769 Value inf_cap = std::numeric_limits<Value>::has_infinity ? 770 std::numeric_limits<Value>::infinity() : 771 std::numeric_limits<Value>::max(); 772 772 for(NodeIt n(_g);n!=INVALID;++n) 773 773 if(barrier(n))
Note: See TracChangeset
for help on using the changeset viewer.