Better return type for cycleLength() functions (#179)
authorPeter Kovacs <kpeter@inf.elte.hu>
Fri, 26 Feb 2010 23:53:09 +0100
changeset 841aa8c9008b3de
parent 840 2914b6f0fde0
child 843 81f7e910060b
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.
lemon/hartmann_orlin.h
lemon/howard.h
lemon/karp.h
     1.1 --- a/lemon/hartmann_orlin.h	Fri Feb 26 14:00:20 2010 +0100
     1.2 +++ b/lemon/hartmann_orlin.h	Fri Feb 26 23:53:09 2010 +0100
     1.3 @@ -405,8 +405,8 @@
     1.4      ///
     1.5      /// \pre \ref run() or \ref findMinMean() must be called before
     1.6      /// using this function.
     1.7 -    LargeValue cycleLength() const {
     1.8 -      return _best_length;
     1.9 +    Value cycleLength() const {
    1.10 +      return static_cast<Value>(_best_length);
    1.11      }
    1.12  
    1.13      /// \brief Return the number of arcs on the found cycle.
     2.1 --- a/lemon/howard.h	Fri Feb 26 14:00:20 2010 +0100
     2.2 +++ b/lemon/howard.h	Fri Feb 26 23:53:09 2010 +0100
     2.3 @@ -384,8 +384,8 @@
     2.4      ///
     2.5      /// \pre \ref run() or \ref findMinMean() must be called before
     2.6      /// using this function.
     2.7 -    LargeValue cycleLength() const {
     2.8 -      return _best_length;
     2.9 +    Value cycleLength() const {
    2.10 +      return static_cast<Value>(_best_length);
    2.11      }
    2.12  
    2.13      /// \brief Return the number of arcs on the found cycle.
     3.1 --- a/lemon/karp.h	Fri Feb 26 14:00:20 2010 +0100
     3.2 +++ b/lemon/karp.h	Fri Feb 26 23:53:09 2010 +0100
     3.3 @@ -392,8 +392,8 @@
     3.4      ///
     3.5      /// \pre \ref run() or \ref findMinMean() must be called before
     3.6      /// using this function.
     3.7 -    LargeValue cycleLength() const {
     3.8 -      return _cycle_length;
     3.9 +    Value cycleLength() const {
    3.10 +      return static_cast<Value>(_cycle_length);
    3.11      }
    3.12  
    3.13      /// \brief Return the number of arcs on the found cycle.