A discrete binomial random number distribution. More...
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 3417 of file random.h.
| typedef _IntType std::binomial_distribution< _IntType >::result_type |
| result_type std::binomial_distribution< _IntType >::max | ( | ) | const [inline] |
Returns the least upper bound value of the distribution.
Definition at line 3527 of file random.h.
Referenced by std::binomial_distribution< _IntType >::operator()().
| result_type std::binomial_distribution< _IntType >::min | ( | ) | const [inline] |
| result_type std::binomial_distribution< _IntType >::operator() | ( | _UniformRandomNumberGenerator & | __urng | ) | [inline] |
Generating functions.
Definition at line 3535 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 1390 of file random.tcc.
References std::abs(), std::log(), and std::binomial_distribution< _IntType >::max().
| double std::binomial_distribution< _IntType >::p | ( | ) | const [inline] |
| void std::binomial_distribution< _IntType >::param | ( | const param_type & | __param | ) | [inline] |
| param_type std::binomial_distribution< _IntType >::param | ( | ) | const [inline] |
Returns the parameter set of the distribution.
Definition at line 3505 of file random.h.
Referenced by std::binomial_distribution< _IntType >::operator()().
| void std::binomial_distribution< _IntType >::reset | ( | ) | [inline] |
Resets the distribution state.
Definition at line 3484 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 > & | , | |
| const std::binomial_distribution< _IntType1 > & | ||||
| ) | [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 > & | , | |
| std::binomial_distribution< _IntType1 > & | ||||
| ) | [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.
1.7.1