lemon/min_cost_max_flow.h
changeset 2507 6520edb2c3f3
parent 2440 c9218405595b
child 2515 caa640aa9a7e
     1.1 --- a/lemon/min_cost_max_flow.h	Tue Oct 30 20:44:53 2007 +0000
     1.2 +++ b/lemon/min_cost_max_flow.h	Wed Nov 07 21:52:57 2007 +0000
     1.3 @@ -75,6 +75,7 @@
     1.4  
     1.5      /// \brief The type of the flow map.
     1.6      typedef typename Graph::template EdgeMap<Capacity> FlowMap;
     1.7 +    typedef typename CostMap::Value Cost;
     1.8  
     1.9    private:
    1.10  
    1.11 @@ -133,7 +134,7 @@
    1.12      /// \pre \ref run() must be called before using this function.
    1.13      Cost totalCost() const {
    1.14        Cost c = 0;
    1.15 -      for (EdgeIt e(graph); e != INVALID; ++e)
    1.16 +      for (typename Graph::EdgeIt e(graph); e != INVALID; ++e)
    1.17  	c += flow[e] * cost[e];
    1.18        return c;
    1.19      }