COIN-OR::LEMON - Graph Library

Ticket #307: 307-1-bugfix-1f08e846df29.patch

File 307-1-bugfix-1f08e846df29.patch, 1.4 KB (added by Peter Kovacs, 10 years ago)
  • lemon/circulation.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1250583871 -7200
    # Node ID 1f08e846df296135814062a8a9c4feb22c76d4ab
    # Parent  257e91516e09d8d6be58236c587e3e0199770412
    Bug fix in Preflow and Circulation (#307)
    
    diff --git a/lemon/circulation.h b/lemon/circulation.h
    a b  
    453453    /// \brief Sets the tolerance used by algorithm.
    454454    ///
    455455    /// Sets the tolerance used by algorithm.
    456     Circulation& tolerance(const Tolerance& tolerance) const {
     456    Circulation& tolerance(const Tolerance& tolerance) {
    457457      _tol = tolerance;
    458458      return *this;
    459459    }
     
    462462    ///
    463463    /// Returns a const reference to the tolerance.
    464464    const Tolerance& tolerance() const {
    465       return tolerance;
     465      return _tol;
    466466    }
    467467
    468468    /// \name Execution Control
  • lemon/preflow.h

    diff --git a/lemon/preflow.h b/lemon/preflow.h
    a b  
    374374    /// \brief Sets the tolerance used by algorithm.
    375375    ///
    376376    /// Sets the tolerance used by algorithm.
    377     Preflow& tolerance(const Tolerance& tolerance) const {
     377    Preflow& tolerance(const Tolerance& tolerance) {
    378378      _tolerance = tolerance;
    379379      return *this;
    380380    }
     
    383383    ///
    384384    /// Returns a const reference to the tolerance.
    385385    const Tolerance& tolerance() const {
    386       return tolerance;
     386      return _tolerance;
    387387    }
    388388
    389389    /// \name Execution Control