The formula for the normal probability mass function is .
Definition at line 2231 of file tr1_impl/random.
std::normal_distribution< _RealType >::normal_distribution | ( | const result_type & | __mean = result_type(0) , |
|
const result_type & | __sigma = result_type(1) | |||
) | [inline, explicit] |
Constructs a normal distribution with parameters and .
Definition at line 2244 of file tr1_impl/random.
_RealType std::normal_distribution< _RealType >::mean | ( | ) | const [inline] |
Gets the mean of the distribution.
Definition at line 2255 of file tr1_impl/random.
normal_distribution< _RealType >::result_type std::normal_distribution< _RealType >::operator() | ( | _UniformRandomNumberGenerator & | __urng | ) | [inline] |
Polar method due to Marsaglia.
Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag, New York, 1986, Ch. V, Sect. 4.4.
Definition at line 1390 of file random.tcc.
References std::log(), and std::sqrt().
void std::normal_distribution< _RealType >::reset | ( | ) | [inline] |
Resets the distribution.
Definition at line 2269 of file tr1_impl/random.
_RealType std::normal_distribution< _RealType >::sigma | ( | ) | const [inline] |
Gets the of the distribution.
Definition at line 2262 of file tr1_impl/random.
std::basic_ostream<_CharT, _Traits>& operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os, | |
const normal_distribution< _RealType1 > & | __x | |||
) | [friend] |
Inserts a normal_distribution random number distribution __x
into the output stream __os
.
__os | An output stream. | |
__x | A normal_distribution random number distribution. |
__x
inserted or in an error state. std::basic_istream<_CharT, _Traits>& operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is, | |
normal_distribution< _RealType1 > & | __x | |||
) | [friend] |
Extracts a normal_distribution random number distribution __x
from the input stream __is
.
__is | An input stream. | |
__x | A normal_distribution random number generator engine. |
__x
extracted or in an error state.