1.1 --- a/lemon/cost_scaling.h Sun Oct 05 13:36:43 2008 +0000
1.2 +++ b/lemon/cost_scaling.h Sun Oct 05 13:37:17 2008 +0000
1.3 @@ -64,7 +64,6 @@
1.4 /// <tt>long int</tt> in the inside computations.
1.5 ///
1.6 /// \author Peter Kovacs
1.7 -
1.8 template < typename Graph,
1.9 typename LowerMap = typename Graph::template EdgeMap<int>,
1.10 typename CapacityMap = typename Graph::template EdgeMap<int>,
1.11 @@ -102,8 +101,7 @@
1.12
1.13 /// \brief Map adaptor class for handling residual edge costs.
1.14 ///
1.15 - /// \ref ResidualCostMap is a map adaptor class for handling
1.16 - /// residual edge costs.
1.17 + /// Map adaptor class for handling residual edge costs.
1.18 template <typename Map>
1.19 class ResidualCostMap : public MapBase<ResEdge, typename Map::Value>
1.20 {
1.21 @@ -126,8 +124,7 @@
1.22
1.23 /// \brief Map adaptor class for handling reduced edge costs.
1.24 ///
1.25 - /// \ref ReducedCostMap is a map adaptor class for handling reduced
1.26 - /// edge costs.
1.27 + /// Map adaptor class for handling reduced edge costs.
1.28 class ReducedCostMap : public MapBase<Edge, LCost>
1.29 {
1.30 private:
1.31 @@ -326,9 +323,9 @@
1.32 delete _red_cost;
1.33 }
1.34
1.35 - /// \brief Sets the flow map.
1.36 + /// \brief Set the flow map.
1.37 ///
1.38 - /// Sets the flow map.
1.39 + /// Set the flow map.
1.40 ///
1.41 /// \return \c (*this)
1.42 CostScaling& flowMap(FlowMap &map) {
1.43 @@ -340,9 +337,9 @@
1.44 return *this;
1.45 }
1.46
1.47 - /// \brief Sets the potential map.
1.48 + /// \brief Set the potential map.
1.49 ///
1.50 - /// Sets the potential map.
1.51 + /// Set the potential map.
1.52 ///
1.53 /// \return \c (*this)
1.54 CostScaling& potentialMap(PotentialMap &map) {
1.55 @@ -355,14 +352,12 @@
1.56 }
1.57
1.58 /// \name Execution control
1.59 - /// The only way to execute the algorithm is to call the run()
1.60 - /// function.
1.61
1.62 /// @{
1.63
1.64 - /// \brief Runs the algorithm.
1.65 + /// \brief Run the algorithm.
1.66 ///
1.67 - /// Runs the algorithm.
1.68 + /// Run the algorithm.
1.69 ///
1.70 /// \return \c true if a feasible flow can be found.
1.71 bool run() {
1.72 @@ -373,25 +368,26 @@
1.73
1.74 /// \name Query Functions
1.75 /// The result of the algorithm can be obtained using these
1.76 - /// functions.
1.77 - /// \n run() must be called before using them.
1.78 + /// functions.\n
1.79 + /// \ref lemon::CostScaling::run() "run()" must be called before
1.80 + /// using them.
1.81
1.82 /// @{
1.83
1.84 - /// \brief Returns a const reference to the edge map storing the
1.85 + /// \brief Return a const reference to the edge map storing the
1.86 /// found flow.
1.87 ///
1.88 - /// Returns a const reference to the edge map storing the found flow.
1.89 + /// Return a const reference to the edge map storing the found flow.
1.90 ///
1.91 /// \pre \ref run() must be called before using this function.
1.92 const FlowMap& flowMap() const {
1.93 return *_flow;
1.94 }
1.95
1.96 - /// \brief Returns a const reference to the node map storing the
1.97 + /// \brief Return a const reference to the node map storing the
1.98 /// found potentials (the dual solution).
1.99 ///
1.100 - /// Returns a const reference to the node map storing the found
1.101 + /// Return a const reference to the node map storing the found
1.102 /// potentials (the dual solution).
1.103 ///
1.104 /// \pre \ref run() must be called before using this function.
1.105 @@ -399,27 +395,27 @@
1.106 return *_potential;
1.107 }
1.108
1.109 - /// \brief Returns the flow on the given edge.
1.110 + /// \brief Return the flow on the given edge.
1.111 ///
1.112 - /// Returns the flow on the given edge.
1.113 + /// Return the flow on the given edge.
1.114 ///
1.115 /// \pre \ref run() must be called before using this function.
1.116 Capacity flow(const Edge& edge) const {
1.117 return (*_flow)[edge];
1.118 }
1.119
1.120 - /// \brief Returns the potential of the given node.
1.121 + /// \brief Return the potential of the given node.
1.122 ///
1.123 - /// Returns the potential of the given node.
1.124 + /// Return the potential of the given node.
1.125 ///
1.126 /// \pre \ref run() must be called before using this function.
1.127 Cost potential(const Node& node) const {
1.128 return (*_potential)[node];
1.129 }
1.130
1.131 - /// \brief Returns the total cost of the found flow.
1.132 + /// \brief Return the total cost of the found flow.
1.133 ///
1.134 - /// Returns the total cost of the found flow. The complexity of the
1.135 + /// Return the total cost of the found flow. The complexity of the
1.136 /// function is \f$ O(e) \f$.
1.137 ///
1.138 /// \pre \ref run() must be called before using this function.
1.139 @@ -434,7 +430,7 @@
1.140
1.141 private:
1.142
1.143 - /// Initializes the algorithm.
1.144 + /// Initialize the algorithm.
1.145 bool init() {
1.146 if (!_valid_supply) return false;
1.147
1.148 @@ -469,7 +465,7 @@
1.149 }
1.150
1.151
1.152 - /// Executes the algorithm.
1.153 + /// Execute the algorithm.
1.154 bool start() {
1.155 std::deque<Node> active_nodes;
1.156 typename Graph::template NodeMap<bool> hyper(_graph, false);