COIN-OR::LEMON - Graph Library

Changes in / [376:4b2382fd80ef:378:80ec623f529f] in lemon-1.2


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/random.h

    r340 r378  
    689689    }
    690690
    691     /// \brief Returns a random real number the range [0, b)
    692     ///
    693     /// It returns a random real number from the range [0, b).
    694     template <typename Number>
    695     Number real(Number b) {
    696       return real<Number>() * b;
    697     }
    698 
    699     /// \brief Returns a random real number from the range [a, b)
    700     ///
    701     /// It returns a random real number from the range [a, b).
    702     template <typename Number>
    703     Number real(Number a, Number b) {
    704       return real<Number>() * (b - a) + a;
    705     }
    706 
    707691    /// \brief Returns a random real number from the range [0, 1)
    708692    ///
     
    715699    ///
    716700    /// It returns a random real number from the range [0, b).
    717     template <typename Number>
    718     Number operator()(Number b) {
    719       return real<Number>() * b;
     701    double operator()(double b) {
     702      return real<double>() * b;
    720703    }
    721704
     
    723706    ///
    724707    /// It returns a random real number from the range [a, b).
    725     template <typename Number>
    726     Number operator()(Number a, Number b) {
    727       return real<Number>() * (b - a) + a;
     708    double operator()(double a, double b) {
     709      return real<double>() * (b - a) + a;
    728710    }
    729711
Note: See TracChangeset for help on using the changeset viewer.