spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Functions

Classes

class  spot::barand< gen >
 Compute pseudo-random integer value between 0 and n included, following a binomial distribution for probability p. More...
 

Functions

SPOT_API void spot::srand (unsigned int seed)
 Reset the seed of the pseudo-random number generator. More...
 
SPOT_API int spot::rrand (int min, int max)
 Compute a pseudo-random integer value between min and max included. More...
 
SPOT_API int spot::mrand (int max)
 Compute a pseudo-random integer value between 0 and max-1 included. More...
 
SPOT_API double spot::drand ()
 Compute a pseudo-random double value between 0.0 and 1.0 (1.0 excluded). More...
 
SPOT_API double spot::nrand ()
 Compute a pseudo-random double value following a standard normal distribution. (Odeh & Evans) More...
 
SPOT_API double spot::bmrand ()
 Compute a pseudo-random double value following a standard normal distribution. (Box-Muller) More...
 
SPOT_API int spot::prand (double p)
 Return a pseudo-random positive integer value following a Poisson distribution with parameter p. More...
 

Detailed Description

Function Documentation

SPOT_API double spot::bmrand ( )

Compute a pseudo-random double value following a standard normal distribution. (Box-Muller)

This uses the polar form of the Box-Muller transform to generate random values.

SPOT_API double spot::drand ( )

Compute a pseudo-random double value between 0.0 and 1.0 (1.0 excluded).

See Also
mrand, rrand, srand
SPOT_API int spot::mrand ( int  max)

Compute a pseudo-random integer value between 0 and max-1 included.

See Also
drand, rrand, srand
SPOT_API double spot::nrand ( )

Compute a pseudo-random double value following a standard normal distribution. (Odeh & Evans)

This uses a polynomial approximation of the inverse cumulated density function from Odeh & Evans, Journal of Applied Statistics, 1974, vol 23, pp 96-97.

SPOT_API int spot::prand ( double  p)

Return a pseudo-random positive integer value following a Poisson distribution with parameter p.

Precondition
p > 0
SPOT_API int spot::rrand ( int  min,
int  max 
)

Compute a pseudo-random integer value between min and max included.

See Also
drand, mrand, srand
SPOT_API void spot::srand ( unsigned int  seed)

Reset the seed of the pseudo-random number generator.

See Also
drand, mrand, rrand

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Sat Dec 6 2014 12:28:44 for spot by doxygen 1.8.4