1.1 --- a/lemon/circulation.h Tue Aug 18 10:24:31 2009 +0200
1.2 +++ b/lemon/circulation.h Tue Aug 18 10:35:35 2009 +0200
1.3 @@ -450,9 +450,10 @@
1.4 return *_level;
1.5 }
1.6
1.7 - /// \brief Sets the tolerance used by algorithm.
1.8 + /// \brief Sets the tolerance used by the algorithm.
1.9 ///
1.10 - /// Sets the tolerance used by algorithm.
1.11 + /// Sets the tolerance object used by the algorithm.
1.12 + /// \return <tt>(*this)</tt>
1.13 Circulation& tolerance(const Tolerance& tolerance) {
1.14 _tol = tolerance;
1.15 return *this;
1.16 @@ -460,7 +461,8 @@
1.17
1.18 /// \brief Returns a const reference to the tolerance.
1.19 ///
1.20 - /// Returns a const reference to the tolerance.
1.21 + /// Returns a const reference to the tolerance object used by
1.22 + /// the algorithm.
1.23 const Tolerance& tolerance() const {
1.24 return _tol;
1.25 }
2.1 --- a/lemon/preflow.h Tue Aug 18 10:24:31 2009 +0200
2.2 +++ b/lemon/preflow.h Tue Aug 18 10:35:35 2009 +0200
2.3 @@ -97,7 +97,7 @@
2.4 /// \e push-relabel algorithm producing a \ref max_flow
2.5 /// "flow of maximum value" in a digraph.
2.6 /// The preflow algorithms are the fastest known maximum
2.7 - /// flow algorithms. The current implementation use a mixture of the
2.8 + /// flow algorithms. The current implementation uses a mixture of the
2.9 /// \e "highest label" and the \e "bound decrease" heuristics.
2.10 /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$.
2.11 ///
2.12 @@ -371,9 +371,10 @@
2.13 return *_level;
2.14 }
2.15
2.16 - /// \brief Sets the tolerance used by algorithm.
2.17 + /// \brief Sets the tolerance used by the algorithm.
2.18 ///
2.19 - /// Sets the tolerance used by algorithm.
2.20 + /// Sets the tolerance object used by the algorithm.
2.21 + /// \return <tt>(*this)</tt>
2.22 Preflow& tolerance(const Tolerance& tolerance) {
2.23 _tolerance = tolerance;
2.24 return *this;
2.25 @@ -381,7 +382,8 @@
2.26
2.27 /// \brief Returns a const reference to the tolerance.
2.28 ///
2.29 - /// Returns a const reference to the tolerance.
2.30 + /// Returns a const reference to the tolerance object used by
2.31 + /// the algorithm.
2.32 const Tolerance& tolerance() const {
2.33 return _tolerance;
2.34 }
3.1 --- a/test/circulation_test.cc Tue Aug 18 10:24:31 2009 +0200
3.2 +++ b/test/circulation_test.cc Tue Aug 18 10:35:35 2009 +0200
3.3 @@ -87,6 +87,11 @@
3.4 .upperMap(ucap)
3.5 .supplyMap(supply)
3.6 .flowMap(flow);
3.7 +
3.8 + const CirculationType::Elevator& elev = const_circ_test.elevator();
3.9 + circ_test.elevator(const_cast<CirculationType::Elevator&>(elev));
3.10 + CirculationType::Tolerance tol = const_circ_test.tolerance();
3.11 + circ_test.tolerance(tol);
3.12
3.13 circ_test.init();
3.14 circ_test.greedyInit();
4.1 --- a/test/preflow_test.cc Tue Aug 18 10:24:31 2009 +0200
4.2 +++ b/test/preflow_test.cc Tue Aug 18 10:35:35 2009 +0200
4.3 @@ -94,6 +94,11 @@
4.4 ::Create PreflowType;
4.5 PreflowType preflow_test(g, cap, n, n);
4.6 const PreflowType& const_preflow_test = preflow_test;
4.7 +
4.8 + const PreflowType::Elevator& elev = const_preflow_test.elevator();
4.9 + preflow_test.elevator(const_cast<PreflowType::Elevator&>(elev));
4.10 + PreflowType::Tolerance tol = const_preflow_test.tolerance();
4.11 + preflow_test.tolerance(tol);
4.12
4.13 preflow_test
4.14 .capacityMap(cap)