Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
boost::random::normal_distribution_v165< RealType > Class Template Reference

#include <Boost165NormalDistribution.hpp>

+ Collaboration diagram for boost::random::normal_distribution_v165< RealType >:

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 normal_distribution_v165 (const RealType &mean_arg=RealType(0.0), const RealType &sigma_arg=RealType(1.0))
 
 normal_distribution_v165 (const param_type &parm)
 
RealType mean () const
 
RealType sigma () const
 
RealType min BOOST_PREVENT_MACRO_SUBSTITUTION () const
 
RealType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
 
param_type param () const
 
void param (const param_type &parm)
 
void reset ()
 
template<class Engine >
result_type operator() (Engine &eng)
 
template<class URNG >
result_type operator() (URNG &urng, const param_type &parm)
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, normal_distribution_v165, nd)
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, normal_distribution_v165, nd)
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (normal_distribution_v165, lhs, rhs)
 

Private Attributes

RealType _mean
 
RealType _sigma
 

Detailed Description

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

Instantiations of class template normal_distribution model a \random_distribution. 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.

The implementation uses the "ziggurat" algorithm, as described in

@blockquote "The Ziggurat Method for Generating Random Variables", George Marsaglia and Wai Wan Tsang, Journal of Statistical Software, Volume 5, Number 8 (2000), 1-7. @endblockquote

Definition at line 259 of file Boost165NormalDistribution.hpp.

Member Typedef Documentation

◆ input_type

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

Definition at line 262 of file Boost165NormalDistribution.hpp.

◆ result_type

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

Definition at line 263 of file Boost165NormalDistribution.hpp.

Constructor & Destructor Documentation

◆ normal_distribution_v165() [1/2]

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

Constructs a normal_distribution_v165 object. mean and sigma are the parameters for the distribution.

Requires: sigma >= 0

Definition at line 323 of file Boost165NormalDistribution.hpp.

◆ normal_distribution_v165() [2/2]

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

Constructs a normal_distribution_v165 object from its parameters.

Definition at line 333 of file Boost165NormalDistribution.hpp.

Member Function Documentation

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [1/2]

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

Returns the smallest value that the distribution can produce.

Definition at line 344 of file Boost165NormalDistribution.hpp.

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [2/2]

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

Returns the largest value that the distribution can produce.

Definition at line 349 of file Boost165NormalDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR()

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

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

Definition at line 402 of file Boost165NormalDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR()

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

Reads a normal_distribution_v165 from a std::istream.

Definition at line 392 of file Boost165NormalDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR()

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

Writes a normal_distribution_v165 to a std::ostream.

Definition at line 385 of file Boost165NormalDistribution.hpp.

◆ mean()

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

Returns the mean of the distribution.

Definition at line 339 of file Boost165NormalDistribution.hpp.

References boost::random::normal_distribution_v165< RealType >::_mean.

◆ operator()() [1/2]

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

Returns a normal variate.

Definition at line 371 of file Boost165NormalDistribution.hpp.

References boost::random::normal_distribution_v165< RealType >::_mean.

◆ operator()() [2/2]

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

Returns a normal variate with parameters specified by param.

Definition at line 379 of file Boost165NormalDistribution.hpp.

◆ param() [1/2]

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

Returns the parameters of the distribution.

Definition at line 355 of file Boost165NormalDistribution.hpp.

References boost::random::normal_distribution_v165< RealType >::_mean.

◆ param() [2/2]

◆ reset()

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

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

Definition at line 367 of file Boost165NormalDistribution.hpp.

◆ sigma()

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

Returns the standard deviation of the distribution.

Definition at line 341 of file Boost165NormalDistribution.hpp.

Member Data Documentation

◆ _mean

template<class RealType = double>
RealType boost::random::normal_distribution_v165< RealType >::_mean
private

◆ _sigma

template<class RealType = double>
RealType boost::random::normal_distribution_v165< RealType >::_sigma
private

Definition at line 414 of file Boost165NormalDistribution.hpp.


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