Changes in / [376:4b2382fd80ef:378:80ec623f529f] in lemon1.2
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/random.h
r340 r378 689 689 } 690 690 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 707 691 /// \brief Returns a random real number from the range [0, 1) 708 692 /// … … 715 699 /// 716 700 /// 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; 720 703 } 721 704 … … 723 706 /// 724 707 /// 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; 728 710 } 729 711
Note: See TracChangeset
for help on using the changeset viewer.