diff -r 0ba8dfce7259 -r 85cb3aa71cce lemon/preflow.h --- a/lemon/preflow.h Tue Apr 21 13:08:19 2009 +0100 +++ b/lemon/preflow.h Tue Apr 21 15:18:54 2009 +0100 @@ -46,18 +46,18 @@ typedef CAP CapacityMap; /// \brief The type of the flow values. - typedef typename CapacityMap::Value Value; + typedef typename CapacityMap::Value Flow; /// \brief The type of the map that stores the flow values. /// /// The type of the map that stores the flow values. /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. - typedef typename Digraph::template ArcMap FlowMap; + typedef typename Digraph::template ArcMap FlowMap; /// \brief Instantiates a FlowMap. /// /// This function instantiates a \ref FlowMap. - /// \param digraph The digraph, to which we would like to define + /// \param digraph The digraph for which we would like to define /// the flow map. static FlowMap* createFlowMap(const Digraph& digraph) { return new FlowMap(digraph); @@ -74,7 +74,7 @@ /// \brief Instantiates an Elevator. /// /// This function instantiates an \ref Elevator. - /// \param digraph The digraph, to which we would like to define + /// \param digraph The digraph for which we would like to define /// the elevator. /// \param max_level The maximum level of the elevator. static Elevator* createElevator(const Digraph& digraph, int max_level) { @@ -84,7 +84,7 @@ /// \brief The tolerance used by the algorithm /// /// The tolerance used by the algorithm to handle inexact computation. - typedef lemon::Tolerance Tolerance; + typedef lemon::Tolerance Tolerance; }; @@ -125,7 +125,7 @@ ///The type of the capacity map. typedef typename Traits::CapacityMap CapacityMap; ///The type of the flow values. - typedef typename Traits::Value Value; + typedef typename Traits::Flow Flow; ///The type of the flow map. typedef typename Traits::FlowMap FlowMap; @@ -151,7 +151,7 @@ Elevator* _level; bool _local_level; - typedef typename Digraph::template NodeMap ExcessMap; + typedef typename Digraph::template NodeMap ExcessMap; ExcessMap* _excess; Tolerance _tolerance; @@ -470,7 +470,7 @@ } for (NodeIt n(_graph); n != INVALID; ++n) { - Value excess = 0; + Flow excess = 0; for (InArcIt e(_graph, n); e != INVALID; ++e) { excess += (*_flow)[e]; } @@ -519,7 +519,7 @@ _level->initFinish(); for (OutArcIt e(_graph, _source); e != INVALID; ++e) { - Value rem = (*_capacity)[e] - (*_flow)[e]; + Flow rem = (*_capacity)[e] - (*_flow)[e]; if (_tolerance.positive(rem)) { Node u = _graph.target(e); if ((*_level)[u] == _level->maxLevel()) continue; @@ -531,7 +531,7 @@ } } for (InArcIt e(_graph, _source); e != INVALID; ++e) { - Value rem = (*_flow)[e]; + Flow rem = (*_flow)[e]; if (_tolerance.positive(rem)) { Node v = _graph.source(e); if ((*_level)[v] == _level->maxLevel()) continue; @@ -564,11 +564,11 @@ int num = _node_num; while (num > 0 && n != INVALID) { - Value excess = (*_excess)[n]; + Flow excess = (*_excess)[n]; int new_level = _level->maxLevel(); for (OutArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_capacity)[e] - (*_flow)[e]; + Flow rem = (*_capacity)[e] - (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.target(e); if ((*_level)[v] < level) { @@ -591,7 +591,7 @@ } for (InArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_flow)[e]; + Flow rem = (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.source(e); if ((*_level)[v] < level) { @@ -637,11 +637,11 @@ num = _node_num * 20; while (num > 0 && n != INVALID) { - Value excess = (*_excess)[n]; + Flow excess = (*_excess)[n]; int new_level = _level->maxLevel(); for (OutArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_capacity)[e] - (*_flow)[e]; + Flow rem = (*_capacity)[e] - (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.target(e); if ((*_level)[v] < level) { @@ -664,7 +664,7 @@ } for (InArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_flow)[e]; + Flow rem = (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.source(e); if ((*_level)[v] < level) { @@ -778,12 +778,12 @@ Node n; while ((n = _level->highestActive()) != INVALID) { - Value excess = (*_excess)[n]; + Flow excess = (*_excess)[n]; int level = _level->highestActiveLevel(); int new_level = _level->maxLevel(); for (OutArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_capacity)[e] - (*_flow)[e]; + Flow rem = (*_capacity)[e] - (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.target(e); if ((*_level)[v] < level) { @@ -806,7 +806,7 @@ } for (InArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_flow)[e]; + Flow rem = (*_flow)[e]; if (!_tolerance.positive(rem)) continue; Node v = _graph.source(e); if ((*_level)[v] < level) { @@ -897,7 +897,7 @@ /// /// \pre Either \ref run() or \ref init() must be called before /// using this function. - Value flowValue() const { + Flow flowValue() const { return (*_excess)[_target]; } @@ -908,7 +908,7 @@ /// /// \pre Either \ref run() or \ref init() must be called before /// using this function. - Value flow(const Arc& arc) const { + Flow flow(const Arc& arc) const { return (*_flow)[arc]; }