Merge
authorAlpar Juttner <alpar@cs.elte.hu>
Tue, 11 Nov 2008 10:25:57 +0000
changeset 37880ec623f529f
parent 376 4b2382fd80ef
parent 377 c4aa9f097ef1
child 384 fc6954b4fce4
Merge
lemon/random.h
     1.1 --- a/lemon/random.h	Mon Nov 10 11:14:56 2008 +0000
     1.2 +++ b/lemon/random.h	Tue Nov 11 10:25:57 2008 +0000
     1.3 @@ -688,22 +688,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      /// \brief Returns a random real number from the range [0, 1)
    1.24      ///
    1.25      /// It returns a random double from the range [0, 1).
    1.26 @@ -714,17 +698,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