spot  0.8.2
Classes | Namespaces | Functions
random.hh File Reference
#include <cmath>
Include dependency graph for random.hh:

Go to the source code of this file.

Classes

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

Namespaces

namespace  spot

Functions

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

Please comment this page and report errors about it on the RefDocComments page.
Generated on Thu Jan 19 2012 19:33:04 for spot by doxygen 1.7.6.1