|
| binomial_distribution (_IntType __t=_IntType(1), double __p=0.5) |
|
| binomial_distribution (const param_type &__p) |
|
template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > |
void | __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng) |
|
template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > |
void | __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const param_type &__p) |
|
template<typename _UniformRandomNumberGenerator > |
void | __generate (result_type *__f, result_type *__t, _UniformRandomNumberGenerator &__urng, const param_type &__p) |
|
result_type | max () const |
|
result_type | min () const |
|
template<typename _UniformRandomNumberGenerator > |
result_type | operator() (_UniformRandomNumberGenerator &__urng) |
|
template<typename _UniformRandomNumberGenerator > |
result_type | operator() (_UniformRandomNumberGenerator &__urng, const param_type &__p) |
|
double | p () const |
|
param_type | param () const |
|
void | param (const param_type &__param) |
|
void | reset () |
|
_IntType | t () const |
|
template<typename _IntType = int>
class std::binomial_distribution< _IntType >
A discrete binomial random number distribution.
The formula for the binomial probability density function is where and are the parameters of the distribution.
Definition at line 3612 of file random.h.
template<typename _IntType >
template<typename _UniformRandomNumberGenerator >
A rejection algorithm when t * p >= 8 and a simple waiting time method - the second in the referenced book - otherwise. NB: The former is available only if _GLIBCXX_USE_C99_MATH_TR1 is defined.
Reference: Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag, New York, 1986, Ch. X, Sect. 4 (+ Errata!).
Definition at line 1534 of file bits/random.tcc.
References std::abs(), std::dec(), std::numeric_limits< _Tp >::epsilon(), std::ios_base::flags(), std::left(), std::log(), std::numeric_limits< _Tp >::max(), std::__detail::operator>>(), std::binomial_distribution< _IntType >::param(), std::scientific(), and std::skipws().