Geomtric Distribution.
More...
#include <yat/random/random.h>
Geomtric Distribution.
The number of independent trials with probability p until the first success.
Probability function
- Since
- New in yat 0.14
type returned by operator()
- Since
- New in yat 0.10
theplu::yat::random::Geometric::Geometric |
( |
double |
p | ) |
|
Constructor.
- Parameters
-
p | is probability for success in one trial |
unsigned long theplu::yat::random::Geometric::operator() |
( |
void |
| ) |
const |
|
virtual |
unsigned long theplu::yat::random::Geometric::operator() |
( |
double |
p | ) |
const |
- Returns
- a number from Geomtric distribution with success rate p
- Note
- this operator ignores parameters set in Constructor
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.
unsigned long theplu::yat::random::Discrete::seed_from_devurandom |
( |
void |
| ) |
|
|
inherited |
The documentation for this class was generated from the following file: