Negative Binomial Distribution.
More...
#include <yat/random/random.h>
Negative Binomial Distribution.
Probability function
Mean: Variance:
- Note
- The parameterisation used here is different from wikipedia.
- Since
- New in yat 0.20
◆ result_type
type returned by operator()
- Since
- New in yat 0.10
◆ NegativeBinomial()
theplu::yat::random::NegativeBinomial::NegativeBinomial |
( |
double |
p, |
|
|
double |
r |
|
) |
| |
Constructor.
- Parameters
-
p | probability of success [0-1] |
r | number of successes, r>=1 |
◆ operator()() [1/2]
unsigned long theplu::yat::random::NegativeBinomial::operator() |
( |
void |
| ) |
const |
|
virtual |
◆ operator()() [2/2]
unsigned long theplu::yat::random::NegativeBinomial::operator() |
( |
double |
p, |
|
|
double |
r |
|
) |
| const |
- Returns
- A number from a Negative Binomial Distribution
◆ seed()
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).
- Deprecated:
- Provided for backward compatibility with the 0.7 API. Use RNG::instance()->seed(s) instead.
◆ seed_from_devurandom()
unsigned long theplu::yat::random::Discrete::seed_from_devurandom |
( |
void |
| ) |
|
|
inherited |
The documentation for this class was generated from the following file: