|
libstdc++
|
A discrete binomial random number distribution.
The formula for the binomial probability density function is
where
and
are the parameters of the distribution.
| typedef _IntType std::binomial_distribution< _IntType >::result_type |
| result_type std::binomial_distribution< _IntType >::max | ( | ) | const [inline] |
| result_type std::binomial_distribution< _IntType >::min | ( | ) | const [inline] |
| result_type std::binomial_distribution< _IntType >::operator() | ( | _UniformRandomNumberGenerator & | __urng | ) | [inline] |
Generating functions.
Definition at line 3525 of file random.h.
References std::binomial_distribution< _IntType >::operator()(), and std::binomial_distribution< _IntType >::param().
Referenced by std::binomial_distribution< _IntType >::operator()().
| binomial_distribution< _IntType >::result_type std::binomial_distribution< _IntType >::operator() | ( | _UniformRandomNumberGenerator & | __urng, |
| const param_type & | __param | ||
| ) |
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 1436 of file random.tcc.
References std::abs(), std::log(), and std::poisson_distribution< _IntType >::max().
| double std::binomial_distribution< _IntType >::p | ( | ) | const [inline] |
| param_type std::binomial_distribution< _IntType >::param | ( | ) | const [inline] |
Returns the parameter set of the distribution.
Definition at line 3495 of file random.h.
Referenced by std::binomial_distribution< _IntType >::operator()().
| void std::binomial_distribution< _IntType >::param | ( | const param_type & | __param | ) | [inline] |
| void std::binomial_distribution< _IntType >::reset | ( | ) | [inline] |
Resets the distribution state.
Definition at line 3474 of file random.h.
References std::normal_distribution< _RealType >::reset().
| _IntType std::binomial_distribution< _IntType >::t | ( | ) | const [inline] |
| std::basic_ostream<_CharT, _Traits>& operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os, |
| const std::binomial_distribution< _IntType1 > & | __x | ||
| ) | [friend] |
Inserts a binomial_distribution random number distribution __x into the output stream __os.
| __os | An output stream. |
| __x | A binomial_distribution random number distribution. |
__x inserted or in an error state. | bool operator== | ( | const std::binomial_distribution< _IntType1 > & | __d1, |
| const std::binomial_distribution< _IntType1 > & | __d2 | ||
| ) | [friend] |
| std::basic_istream<_CharT, _Traits>& operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is, |
| std::binomial_distribution< _IntType1 > & | __x | ||
| ) | [friend] |
Extracts a binomial_distribution random number distribution __x from the input stream __is.
| __is | An input stream. |
| __x | A binomial_distribution random number generator engine. |
__x extracted or in an error state.