yat
0.14.5pre
|
Discrete random number distributions. More...
#include <yat/random/random.h>
Public Types | |
typedef unsigned long int | result_type |
Public Member Functions | |
Discrete (void) | |
Constructor. | |
virtual | ~Discrete (void) |
The destructor. | |
void | seed (unsigned long s) const |
Set the seed to s. More... | |
unsigned long | seed_from_devurandom (void) |
Set the seed using the /dev/urandom device. More... | |
virtual result_type | operator() (void) const =0 |
Protected Attributes | |
RNG * | rng_ |
GSL random gererator. | |
Discrete random number distributions.
Abstract base class for discrete random number distributions. Given K discrete events with different probabilities , produce a random value k consistent with its probability.
typedef unsigned long int theplu::yat::random::Discrete::result_type |
type returned by operator()
|
pure virtual |
void theplu::yat::random::Discrete::seed | ( | unsigned long | s | ) | const |
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 | ) |
Set the seed using the /dev/urandom device.