1.1 --- a/lemon/network_simplex.h Thu Nov 08 14:21:28 2007 +0000
1.2 +++ b/lemon/network_simplex.h Wed Nov 14 06:28:08 2007 +0000
1.3 @@ -26,8 +26,9 @@
1.4 /// flow.
1.5
1.6 #include <limits>
1.7 +#include <lemon/graph_adaptor.h>
1.8 +#include <lemon/graph_utils.h>
1.9 #include <lemon/smart_graph.h>
1.10 -#include <lemon/graph_utils.h>
1.11
1.12 /// \brief The pivot rule used in the algorithm.
1.13 //#define FIRST_ELIGIBLE_PIVOT
1.14 @@ -85,7 +86,7 @@
1.15 /// \warning
1.16 /// - Edge capacities and costs should be nonnegative integers.
1.17 /// However \c CostMap::Value should be signed type.
1.18 - /// - Supply values should be integers.
1.19 + /// - Supply values should be signed integers.
1.20 /// - \c LowerMap::Value must be convertible to
1.21 /// \c CapacityMap::Value and \c CapacityMap::Value must be
1.22 /// convertible to \c SupplyMap::Value.
1.23 @@ -148,15 +149,12 @@
1.24
1.25 public:
1.26
1.27 - typedef typename MapBase<Edge, Cost>::Value Value;
1.28 - typedef typename MapBase<Edge, Cost>::Key Key;
1.29 -
1.30 ReducedCostMap( const SGraph &_gr,
1.31 const SCostMap &_cm,
1.32 const SPotentialMap &_pm ) :
1.33 gr(_gr), cost_map(_cm), pot_map(_pm) {}
1.34
1.35 - Value operator[](const Key &e) const {
1.36 + Cost operator[](const Edge &e) const {
1.37 return cost_map[e] - pot_map[gr.source(e)] + pot_map[gr.target(e)];
1.38 }
1.39