std::negative_binomial_distribution
From cppreference.com
Defined in header <random>
|
||
template< class IntType = int > class negative_binomial_distribution; |
(since C++11) | |
Produces random non-negative integer values i, distributed according to discrete probability function:
- P(i|k,p) =⎛
⎜
⎝k + i − 1
i⎞
⎟
⎠ · pk
· (1 − p)i
The value represents the number of failures in a series of independent yes/no trials (each succeeds with probability p), before exactly k successes occur.
std::negative_binomial_distribution
satisfies RandomNumberDistribution.
Contents |