[Lemon-commits] Peter Kovacs: Better return type for cycleLength...
Lemon HG
hg at lemon.cs.elte.hu
Sat Feb 27 07:55:17 CET 2010
details: http://lemon.cs.elte.hu/hg/lemon/rev/aa8c9008b3de
changeset: 914:aa8c9008b3de
user: Peter Kovacs <kpeter [at] inf.elte.hu>
date: Fri Feb 26 23:53:09 2010 +0100
description:
Better return type for cycleLength() functions (#179) in the min
mean cycle algorithms.
The original Value type is used instead of the LargeValue type,
which is introduced for internal computations.
diffstat:
lemon/hartmann_orlin.h | 4 ++--
lemon/howard.h | 4 ++--
lemon/karp.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diffs (42 lines):
diff --git a/lemon/hartmann_orlin.h b/lemon/hartmann_orlin.h
--- a/lemon/hartmann_orlin.h
+++ b/lemon/hartmann_orlin.h
@@ -405,8 +405,8 @@
///
/// \pre \ref run() or \ref findMinMean() must be called before
/// using this function.
- LargeValue cycleLength() const {
- return _best_length;
+ Value cycleLength() const {
+ return static_cast<Value>(_best_length);
}
/// \brief Return the number of arcs on the found cycle.
diff --git a/lemon/howard.h b/lemon/howard.h
--- a/lemon/howard.h
+++ b/lemon/howard.h
@@ -384,8 +384,8 @@
///
/// \pre \ref run() or \ref findMinMean() must be called before
/// using this function.
- LargeValue cycleLength() const {
- return _best_length;
+ Value cycleLength() const {
+ return static_cast<Value>(_best_length);
}
/// \brief Return the number of arcs on the found cycle.
diff --git a/lemon/karp.h b/lemon/karp.h
--- a/lemon/karp.h
+++ b/lemon/karp.h
@@ -392,8 +392,8 @@
///
/// \pre \ref run() or \ref findMinMean() must be called before
/// using this function.
- LargeValue cycleLength() const {
- return _cycle_length;
+ Value cycleLength() const {
+ return static_cast<Value>(_cycle_length);
}
/// \brief Return the number of arcs on the found cycle.
More information about the Lemon-commits
mailing list