yat
0.14.5pre
|
#include <yat/random/random.h>
Public Types | |
typedef unsigned long int | result_type |
Public Member Functions | |
HyperGeometric (void) | |
Defaul constructor. | |
HyperGeometric (unsigned int n1, unsigned int n2, unsigned int t) | |
Constructor. More... | |
unsigned long int | operator() (void) const |
unsigned long int | operator() (unsigned int n1, unsigned int n2, unsigned int t) const |
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... | |
Protected Attributes | |
RNG * | rng_ |
GSL random gererator. | |
If we have n1 samples of type 1 and n2 samples of type 2 and draw t samples with replacement, number of drawn samples of type 1 will follow the hyper geometric distribution.
|
inherited |
type returned by operator()
theplu::yat::random::HyperGeometric::HyperGeometric | ( | unsigned int | n1, |
unsigned int | n2, | ||
unsigned int | t | ||
) |
Constructor.
n1 | number of samples of type 1 |
n2 | number of samples of type 2 |
t | number of samples to draw |
|
virtual |
Implements theplu::yat::random::Discrete.
unsigned long int theplu::yat::random::HyperGeometric::operator() | ( | unsigned int | n1, |
unsigned int | n2, | ||
unsigned int | t | ||
) | 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).
|
inherited |
Set the seed using the /dev/urandom device.