1.1 --- a/lemon/preflow.h Fri Apr 17 18:04:36 2009 +0200
1.2 +++ b/lemon/preflow.h Fri Apr 17 18:14:35 2009 +0200
1.3 @@ -46,18 +46,18 @@
1.4 typedef CM CapacityMap;
1.5
1.6 /// \brief The type of the flow values.
1.7 - typedef typename CapacityMap::Value Value;
1.8 + typedef typename CapacityMap::Value Flow;
1.9
1.10 /// \brief The type of the map that stores the flow values.
1.11 ///
1.12 /// The type of the map that stores the flow values.
1.13 /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
1.14 - typedef typename Digraph::template ArcMap<Value> FlowMap;
1.15 + typedef typename Digraph::template ArcMap<Flow> FlowMap;
1.16
1.17 /// \brief Instantiates a FlowMap.
1.18 ///
1.19 /// This function instantiates a \ref FlowMap.
1.20 - /// \param digraph The digraph, to which we would like to define
1.21 + /// \param digraph The digraph for which we would like to define
1.22 /// the flow map.
1.23 static FlowMap* createFlowMap(const Digraph& digraph) {
1.24 return new FlowMap(digraph);
1.25 @@ -74,7 +74,7 @@
1.26 /// \brief Instantiates an Elevator.
1.27 ///
1.28 /// This function instantiates an \ref Elevator.
1.29 - /// \param digraph The digraph, to which we would like to define
1.30 + /// \param digraph The digraph for which we would like to define
1.31 /// the elevator.
1.32 /// \param max_level The maximum level of the elevator.
1.33 static Elevator* createElevator(const Digraph& digraph, int max_level) {
1.34 @@ -84,7 +84,7 @@
1.35 /// \brief The tolerance used by the algorithm
1.36 ///
1.37 /// The tolerance used by the algorithm to handle inexact computation.
1.38 - typedef lemon::Tolerance<Value> Tolerance;
1.39 + typedef lemon::Tolerance<Flow> Tolerance;
1.40
1.41 };
1.42
1.43 @@ -124,7 +124,7 @@
1.44 ///The type of the capacity map.
1.45 typedef typename Traits::CapacityMap CapacityMap;
1.46 ///The type of the flow values.
1.47 - typedef typename Traits::Value Value;
1.48 + typedef typename Traits::Flow Flow;
1.49
1.50 ///The type of the flow map.
1.51 typedef typename Traits::FlowMap FlowMap;
1.52 @@ -150,7 +150,7 @@
1.53 Elevator* _level;
1.54 bool _local_level;
1.55
1.56 - typedef typename Digraph::template NodeMap<Value> ExcessMap;
1.57 + typedef typename Digraph::template NodeMap<Flow> ExcessMap;
1.58 ExcessMap* _excess;
1.59
1.60 Tolerance _tolerance;
1.61 @@ -469,7 +469,7 @@
1.62 }
1.63
1.64 for (NodeIt n(_graph); n != INVALID; ++n) {
1.65 - Value excess = 0;
1.66 + Flow excess = 0;
1.67 for (InArcIt e(_graph, n); e != INVALID; ++e) {
1.68 excess += (*_flow)[e];
1.69 }
1.70 @@ -518,7 +518,7 @@
1.71 _level->initFinish();
1.72
1.73 for (OutArcIt e(_graph, _source); e != INVALID; ++e) {
1.74 - Value rem = (*_capacity)[e] - (*_flow)[e];
1.75 + Flow rem = (*_capacity)[e] - (*_flow)[e];
1.76 if (_tolerance.positive(rem)) {
1.77 Node u = _graph.target(e);
1.78 if ((*_level)[u] == _level->maxLevel()) continue;
1.79 @@ -530,7 +530,7 @@
1.80 }
1.81 }
1.82 for (InArcIt e(_graph, _source); e != INVALID; ++e) {
1.83 - Value rem = (*_flow)[e];
1.84 + Flow rem = (*_flow)[e];
1.85 if (_tolerance.positive(rem)) {
1.86 Node v = _graph.source(e);
1.87 if ((*_level)[v] == _level->maxLevel()) continue;
1.88 @@ -563,11 +563,11 @@
1.89 int num = _node_num;
1.90
1.91 while (num > 0 && n != INVALID) {
1.92 - Value excess = (*_excess)[n];
1.93 + Flow excess = (*_excess)[n];
1.94 int new_level = _level->maxLevel();
1.95
1.96 for (OutArcIt e(_graph, n); e != INVALID; ++e) {
1.97 - Value rem = (*_capacity)[e] - (*_flow)[e];
1.98 + Flow rem = (*_capacity)[e] - (*_flow)[e];
1.99 if (!_tolerance.positive(rem)) continue;
1.100 Node v = _graph.target(e);
1.101 if ((*_level)[v] < level) {
1.102 @@ -590,7 +590,7 @@
1.103 }
1.104
1.105 for (InArcIt e(_graph, n); e != INVALID; ++e) {
1.106 - Value rem = (*_flow)[e];
1.107 + Flow rem = (*_flow)[e];
1.108 if (!_tolerance.positive(rem)) continue;
1.109 Node v = _graph.source(e);
1.110 if ((*_level)[v] < level) {
1.111 @@ -636,11 +636,11 @@
1.112
1.113 num = _node_num * 20;
1.114 while (num > 0 && n != INVALID) {
1.115 - Value excess = (*_excess)[n];
1.116 + Flow excess = (*_excess)[n];
1.117 int new_level = _level->maxLevel();
1.118
1.119 for (OutArcIt e(_graph, n); e != INVALID; ++e) {
1.120 - Value rem = (*_capacity)[e] - (*_flow)[e];
1.121 + Flow rem = (*_capacity)[e] - (*_flow)[e];
1.122 if (!_tolerance.positive(rem)) continue;
1.123 Node v = _graph.target(e);
1.124 if ((*_level)[v] < level) {
1.125 @@ -663,7 +663,7 @@
1.126 }
1.127
1.128 for (InArcIt e(_graph, n); e != INVALID; ++e) {
1.129 - Value rem = (*_flow)[e];
1.130 + Flow rem = (*_flow)[e];
1.131 if (!_tolerance.positive(rem)) continue;
1.132 Node v = _graph.source(e);
1.133 if ((*_level)[v] < level) {
1.134 @@ -777,12 +777,12 @@
1.135
1.136 Node n;
1.137 while ((n = _level->highestActive()) != INVALID) {
1.138 - Value excess = (*_excess)[n];
1.139 + Flow excess = (*_excess)[n];
1.140 int level = _level->highestActiveLevel();
1.141 int new_level = _level->maxLevel();
1.142
1.143 for (OutArcIt e(_graph, n); e != INVALID; ++e) {
1.144 - Value rem = (*_capacity)[e] - (*_flow)[e];
1.145 + Flow rem = (*_capacity)[e] - (*_flow)[e];
1.146 if (!_tolerance.positive(rem)) continue;
1.147 Node v = _graph.target(e);
1.148 if ((*_level)[v] < level) {
1.149 @@ -805,7 +805,7 @@
1.150 }
1.151
1.152 for (InArcIt e(_graph, n); e != INVALID; ++e) {
1.153 - Value rem = (*_flow)[e];
1.154 + Flow rem = (*_flow)[e];
1.155 if (!_tolerance.positive(rem)) continue;
1.156 Node v = _graph.source(e);
1.157 if ((*_level)[v] < level) {
1.158 @@ -896,7 +896,7 @@
1.159 ///
1.160 /// \pre Either \ref run() or \ref init() must be called before
1.161 /// using this function.
1.162 - Value flowValue() const {
1.163 + Flow flowValue() const {
1.164 return (*_excess)[_target];
1.165 }
1.166
1.167 @@ -907,7 +907,7 @@
1.168 ///
1.169 /// \pre Either \ref run() or \ref init() must be called before
1.170 /// using this function.
1.171 - Value flow(const Arc& arc) const {
1.172 + Flow flow(const Arc& arc) const {
1.173 return (*_flow)[arc];
1.174 }
1.175