lemon/cycle_canceling.h
changeset 2509 a8081c9cd96a
parent 2457 8c791ee69a45
child 2526 b7727edd44f2
     1.1 --- a/lemon/cycle_canceling.h	Thu Nov 08 14:21:28 2007 +0000
     1.2 +++ b/lemon/cycle_canceling.h	Wed Nov 14 06:28:08 2007 +0000
     1.3 @@ -25,8 +25,8 @@
     1.4  /// \brief A cycle-canceling algorithm for finding a minimum cost flow.
     1.5  
     1.6  #include <vector>
     1.7 +#include <lemon/graph_adaptor.h>
     1.8  #include <lemon/circulation.h>
     1.9 -#include <lemon/graph_adaptor.h>
    1.10  
    1.11  /// \brief The used cycle-canceling method.
    1.12  #define LIMITED_CYCLE_CANCELING
    1.13 @@ -79,7 +79,7 @@
    1.14    /// \warning
    1.15    /// - Edge capacities and costs should be nonnegative integers.
    1.16    ///	However \c CostMap::Value should be signed type.
    1.17 -  /// - Supply values should be integers.
    1.18 +  /// - Supply values should be signed integers.
    1.19    /// - \c LowerMap::Value must be convertible to
    1.20    ///	\c CapacityMap::Value and \c CapacityMap::Value must be
    1.21    ///	convertible to \c SupplyMap::Value.
    1.22 @@ -131,12 +131,9 @@
    1.23  
    1.24      public:
    1.25  
    1.26 -      typedef typename MapBase<ResEdge, Cost>::Value Value;
    1.27 -      typedef typename MapBase<ResEdge, Cost>::Key Key;
    1.28 -
    1.29        ResCostMap(const CostMap &_cost) : cost_map(_cost) {}
    1.30  
    1.31 -      Value operator[](const Key &e) const {
    1.32 +      Cost operator[](const ResEdge &e) const {
    1.33  	return ResGraph::forward(e) ? cost_map[e] : -cost_map[e];
    1.34        }
    1.35