Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::normal_distribution< RealType > Class Template Reference

Instantiations of class template normal_distribution model a . More...

#include <normal_distribution.hpp>

Inheritance diagram for boost::random::normal_distribution< RealType >:

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 normal_distribution (const RealType &mean_arg=RealType(0.0), const RealType &sigma_arg=RealType(1.0))
 Constructs a normal_distribution object. More...
 
 normal_distribution (const param_type &parm)
 Constructs a normal_distribution object from its parameters. More...
 
RealType mean () const
 Returns the mean of the distribution. More...
 
RealType sigma () const
 Returns the standard deviation of the distribution. More...
 
RealType min BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the smallest value that the distribution can produce. More...
 
RealType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the largest value that the distribution can produce. More...
 
param_type param () const
 Returns the parameters of the distribution. More...
 
void param (const param_type &parm)
 Sets the parameters of the distribution. More...
 
void reset ()
 Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. More...
 
template<class Engine >
result_type operator() (Engine &eng)
 Returns a normal variate. More...
 
template<class URNG >
result_type operator() (URNG &urng, const param_type &parm)
 Returns a normal variate with parameters specified by param. More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, normal_distribution, nd)
 Writes a normal_distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, normal_distribution, nd)
 Reads a normal_distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (normal_distribution, lhs, rhs)
 Returns true if the two instances of normal_distribution will return identical sequences of values given equal generators. More...
 

Detailed Description

template<class RealType = double>
class boost::random::normal_distribution< RealType >

Instantiations of class template normal_distribution model a .

Such a distribution produces random numbers x distributed with probability density function $\displaystyle p(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $, where mean and sigma are the parameters of the distribution.

Member Typedef Documentation

template<class RealType = double>
typedef RealType boost::random::normal_distribution< RealType >::input_type
template<class RealType = double>
typedef RealType boost::random::normal_distribution< RealType >::result_type

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::normal_distribution< RealType >::normal_distribution ( const RealType &  mean_arg = RealType(0.0),
const RealType &  sigma_arg = RealType(1.0) 
)
inlineexplicit

Constructs a normal_distribution object.

mean and sigma are the parameters for the distribution.

Requires: sigma >= 0

Referenced by boost::random::normal_distribution< result_type >::operator()().

template<class RealType = double>
boost::random::normal_distribution< RealType >::normal_distribution ( const param_type parm)
inlineexplicit

Constructs a normal_distribution object from its parameters.

Member Function Documentation

template<class RealType = double>
RealType min boost::random::normal_distribution< RealType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the smallest value that the distribution can produce.

template<class RealType = double>
RealType max boost::random::normal_distribution< RealType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the largest value that the distribution can produce.

template<class RealType = double>
boost::random::normal_distribution< RealType >::BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR ( normal_distribution< RealType >  ,
lhs  ,
rhs   
)
inline

Returns true if the two instances of normal_distribution will return identical sequences of values given equal generators.

template<class RealType = double>
boost::random::normal_distribution< RealType >::BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR ( is  ,
normal_distribution< RealType >  ,
nd   
)
inline

Reads a normal_distribution from a std::istream.

template<class RealType = double>
boost::random::normal_distribution< RealType >::BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR ( os  ,
normal_distribution< RealType >  ,
nd   
)
inline

Writes a normal_distribution to a std::ostream.

template<class RealType = double>
RealType boost::random::normal_distribution< RealType >::mean ( ) const
inline

Returns the mean of the distribution.

template<class RealType = double>
template<class Engine >
result_type boost::random::normal_distribution< RealType >::operator() ( Engine &  eng)
inline

Returns a normal variate.

template<class RealType = double>
template<class URNG >
result_type boost::random::normal_distribution< RealType >::operator() ( URNG &  urng,
const param_type parm 
)
inline

Returns a normal variate with parameters specified by param.

template<class RealType = double>
param_type boost::random::normal_distribution< RealType >::param ( ) const
inline

Returns the parameters of the distribution.

Referenced by boost::random::lognormal_distribution< RealType >::param().

template<class RealType = double>
void boost::random::normal_distribution< RealType >::param ( const param_type parm)
inline

Sets the parameters of the distribution.

template<class RealType = double>
void boost::random::normal_distribution< RealType >::reset ( void  )
inline

Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.

template<class RealType = double>
RealType boost::random::normal_distribution< RealType >::sigma ( ) const
inline

Returns the standard deviation of the distribution.


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