diff -r c86db0f7f917 -r a8081c9cd96a lemon/cycle_canceling.h --- a/lemon/cycle_canceling.h Thu Nov 08 14:21:28 2007 +0000 +++ b/lemon/cycle_canceling.h Wed Nov 14 06:28:08 2007 +0000 @@ -25,8 +25,8 @@ /// \brief A cycle-canceling algorithm for finding a minimum cost flow. #include +#include #include -#include /// \brief The used cycle-canceling method. #define LIMITED_CYCLE_CANCELING @@ -79,7 +79,7 @@ /// \warning /// - Edge capacities and costs should be nonnegative integers. /// However \c CostMap::Value should be signed type. - /// - Supply values should be integers. + /// - Supply values should be signed integers. /// - \c LowerMap::Value must be convertible to /// \c CapacityMap::Value and \c CapacityMap::Value must be /// convertible to \c SupplyMap::Value. @@ -131,12 +131,9 @@ public: - typedef typename MapBase::Value Value; - typedef typename MapBase::Key Key; - ResCostMap(const CostMap &_cost) : cost_map(_cost) {} - Value operator[](const Key &e) const { + Cost operator[](const ResEdge &e) const { return ResGraph::forward(e) ? cost_map[e] : -cost_map[e]; }