yat
0.14.5pre
|
#include <yat/random/random.h>
Public Types | |
typedef unsigned long int | result_type |
Public Member Functions | |
NegativeHyperGeometric (void) | |
Default constructor. | |
NegativeHyperGeometric (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. | |
We have n1 samples of type 1 and n2 samples of type 2. Samples are drawn with replacement until t samles of type 2 are drawn. Then k, number of drawn samples of type 1, follows negative hypergeometric distribution.
|
inherited |
type returned by operator()
theplu::yat::random::NegativeHyperGeometric::NegativeHyperGeometric | ( | 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 of type 2 to draw |
|
virtual |
Implements theplu::yat::random::Discrete.
unsigned long int theplu::yat::random::NegativeHyperGeometric::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.