Merge bugfix #173 1.0
authorAlpar Juttner <alpar@cs.elte.hu>
Tue, 11 Nov 2008 12:13:07 +0000
branch1.0
changeset 3937d85a624093e
parent 389 a0b5131b958e
parent 391 c4aa9f097ef1
child 420 cb5f50e6c78b
Merge bugfix #173
     1.1 --- a/lemon/random.h	Fri Nov 07 14:17:44 2008 +0000
     1.2 +++ b/lemon/random.h	Tue Nov 11 12:13:07 2008 +0000
     1.3 @@ -692,22 +692,6 @@
     1.4        return real<double>();
     1.5      }
     1.6  
     1.7 -    /// \brief Returns a random real number the range [0, b)
     1.8 -    ///
     1.9 -    /// It returns a random real number from the range [0, b).
    1.10 -    template <typename Number>
    1.11 -    Number real(Number b) {
    1.12 -      return real<Number>() * b;
    1.13 -    }
    1.14 -
    1.15 -    /// \brief Returns a random real number from the range [a, b)
    1.16 -    ///
    1.17 -    /// It returns a random real number from the range [a, b).
    1.18 -    template <typename Number>
    1.19 -    Number real(Number a, Number b) {
    1.20 -      return real<Number>() * (b - a) + a;
    1.21 -    }
    1.22 -
    1.23      /// @}
    1.24  
    1.25      ///\name Uniform distributions
    1.26 @@ -724,17 +708,15 @@
    1.27      /// \brief Returns a random real number from the range [0, b)
    1.28      ///
    1.29      /// It returns a random real number from the range [0, b).
    1.30 -    template <typename Number>
    1.31 -    Number operator()(Number b) {
    1.32 -      return real<Number>() * b;
    1.33 +    double operator()(double b) {
    1.34 +      return real<double>() * b;
    1.35      }
    1.36  
    1.37      /// \brief Returns a random real number from the range [a, b)
    1.38      ///
    1.39      /// It returns a random real number from the range [a, b).
    1.40 -    template <typename Number>
    1.41 -    Number operator()(Number a, Number b) {
    1.42 -      return real<Number>() * (b - a) + a;
    1.43 +    double operator()(double a, double b) {
    1.44 +      return real<double>() * (b - a) + a;
    1.45      }
    1.46  
    1.47      /// \brief Returns a random integer from a range