#include <yat/random/random.h>
Public Member Functions | |
Poisson (const double m=1) | |
Constructor. | |
unsigned long | operator() (void) const |
unsigned long | operator() (const double m) const |
void | seed (unsigned long s) const |
Set the seed to s. | |
unsigned long | seed_from_devurandom (void) |
Set the seed using the /dev/urandom device. | |
Protected Attributes | |
RNG * | rng_ |
GSL random gererator. |
Having a Poisson process (i.e. no memory), number of occurences within a given time window is Poisson distributed. This distribution is the limit of a Binomial distribution when number of attempts is large, and the probability for one attempt to be succesful is small (in such a way that the expected number of succesful attempts is .
Probability function for
Expectation value:
Variance:
theplu::yat::random::Poisson::Poisson | ( | const double | m = 1 |
) | [explicit] |
Constructor.
m | is expectation value |
unsigned long theplu::yat::random::Poisson::operator() | ( | const double | m | ) | const |
unsigned long theplu::yat::random::Poisson::operator() | ( | void | ) | const [virtual] |
void theplu::yat::random::Discrete::seed | ( | unsigned long | s | ) | const [inherited] |
Set the seed to s.
Set the seed to s in the underlying rng. If s is zero, a default value from the rng's original implementation is used (cf. GSL documentation).
unsigned long theplu::yat::random::Discrete::seed_from_devurandom | ( | void | ) | [inherited] |
Set the seed using the /dev/urandom device.