# HG changeset patch # User Peter Kovacs # Date 1225201677 -3600 # Node ID 0badf3bb38c2a0ef9cb4c0dc1c2bd994979d043a # Parent 2593e163e407403990ba8f4323f684190a625a62 Minor doc improvements diff -r 2593e163e407 -r 0badf3bb38c2 lemon/random.h --- a/lemon/random.h Thu Jun 19 17:33:06 2008 +0100 +++ b/lemon/random.h Tue Oct 28 14:47:57 2008 +0100 @@ -540,10 +540,6 @@ /// /// @{ - ///\name Initialization - /// - /// @{ - /// \brief Default constructor /// /// Constructor with constant seeding. @@ -708,12 +704,6 @@ return real() * (b - a) + a; } - /// @} - - ///\name Uniform distributions - /// - /// @{ - /// \brief Returns a random real number from the range [0, 1) /// /// It returns a random double from the range [0, 1). @@ -771,8 +761,6 @@ return _random_bits::IntConversion::convert(core); } - /// @} - unsigned int uinteger() { return uinteger(); } @@ -806,19 +794,18 @@ ///\name Non-uniform distributions /// - ///@{ - /// \brief Returns a random bool + /// \brief Returns a random bool with given probability of true result. /// /// It returns a random bool with given probability of true result. bool boolean(double p) { return operator()() < p; } - /// Standard Gauss distribution + /// Standard normal (Gauss) distribution - /// Standard Gauss distribution. + /// Standard normal (Gauss) distribution. /// \note The Cartesian form of the Box-Muller /// transformation is used to generate a random normal distribution. double gauss() @@ -831,9 +818,9 @@ } while(S>=1); return std::sqrt(-2*std::log(S)/S)*V1; } - /// Gauss distribution with given mean and standard deviation + /// Normal (Gauss) distribution with given mean and standard deviation - /// Gauss distribution with given mean and standard deviation. + /// Normal (Gauss) distribution with given mean and standard deviation. /// \sa gauss() double gauss(double mean,double std_dev) { @@ -864,7 +851,7 @@ /// standard deviation. The return value can direcly be passed to /// lognormal(). std::pair lognormalParamsFromMD(double mean, - double std_dev) + double std_dev) { double fr=std_dev/mean; fr*=fr; @@ -872,14 +859,14 @@ return std::pair(std::log(mean)-lg/2.0,std::sqrt(lg)); } /// Lognormal distribution with given mean and standard deviation - + /// Lognormal distribution with given mean and standard deviation. /// double lognormalMD(double mean,double std_dev) { return lognormal(lognormalParamsFromMD(mean,std_dev)); } - + /// Exponential distribution with given mean /// This function generates an exponential distribution random number @@ -983,7 +970,6 @@ ///\name Two dimensional distributions /// - ///@{ /// Uniform distribution on the full unit circle @@ -1000,7 +986,7 @@ } while(V1*V1+V2*V2>=1); return dim2::Point(V1,V2); } - /// A kind of two dimensional Gauss distribution + /// A kind of two dimensional normal (Gauss) distribution /// This function provides a turning symmetric two-dimensional distribution. /// Both coordinates are of standard normal distribution, but they are not