libstdc++
std::normal_distribution< _RealType > Class Template Reference

Classes

struct  param_type
 

Public Types

typedef _RealType result_type
 

Public Member Functions

 normal_distribution (const param_type &__p)
 
 normal_distribution (result_type __mean, result_type __stddev=result_type(1))
 
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
 
_RealType mean () 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)
 
param_type param () const
 
void param (const param_type &__param)
 
void reset ()
 
_RealType stddev () const
 

Friends

template<typename _RealType1 , typename _CharT , typename _Traits >
std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::normal_distribution< _RealType1 > &__x)
 
template<typename _RealType1 >
bool operator== (const std::normal_distribution< _RealType1 > &__d1, const std::normal_distribution< _RealType1 > &__d2)
 
template<typename _RealType1 , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, std::normal_distribution< _RealType1 > &__x)
 

Detailed Description

template<typename _RealType = double>
class std::normal_distribution< _RealType >

A normal continuous distribution for random numbers.

The formula for the normal probability density function is

\[ p(x|\mu,\sigma) = \frac{1}{\sigma \sqrt{2 \pi}} e^{- \frac{{x - \mu}^ {2}}{2 \sigma ^ {2}} } \]

Definition at line 1961 of file random.h.


The documentation for this class was generated from the following files: