COIN-OR::LEMON - Graph Library

Ticket #179: 179-valuetype-aa8c9008b3de.patch

File 179-valuetype-aa8c9008b3de.patch, 1.7 KB (added by Peter Kovacs, 15 years ago)
  • lemon/hartmann_orlin.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1267224789 -3600
    # Node ID aa8c9008b3de9bb247ce81ad736a53c0d96f7b5b
    # Parent  2914b6f0fde0a1378a2d87c564bd2ac5c9153dda
    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.
    
    diff --git a/lemon/hartmann_orlin.h b/lemon/hartmann_orlin.h
    a b  
    405405    ///
    406406    /// \pre \ref run() or \ref findMinMean() must be called before
    407407    /// using this function.
    408     LargeValue cycleLength() const {
    409       return _best_length;
     408    Value cycleLength() const {
     409      return static_cast<Value>(_best_length);
    410410    }
    411411
    412412    /// \brief Return the number of arcs on the found cycle.
  • lemon/howard.h

    diff --git a/lemon/howard.h b/lemon/howard.h
    a b  
    384384    ///
    385385    /// \pre \ref run() or \ref findMinMean() must be called before
    386386    /// using this function.
    387     LargeValue cycleLength() const {
    388       return _best_length;
     387    Value cycleLength() const {
     388      return static_cast<Value>(_best_length);
    389389    }
    390390
    391391    /// \brief Return the number of arcs on the found cycle.
  • lemon/karp.h

    diff --git a/lemon/karp.h b/lemon/karp.h
    a b  
    392392    ///
    393393    /// \pre \ref run() or \ref findMinMean() must be called before
    394394    /// using this function.
    395     LargeValue cycleLength() const {
    396       return _cycle_length;
     395    Value cycleLength() const {
     396      return static_cast<Value>(_cycle_length);
    397397    }
    398398
    399399    /// \brief Return the number of arcs on the found cycle.