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

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

#include <lognormal_distribution.hpp>

Classes

class  param_type
 

Public Types

typedef normal_distribution
< RealType >::input_type 
input_type
 
typedef RealType result_type
 

Public Member Functions

 lognormal_distribution (RealType m_arg=RealType(0.0), RealType s_arg=RealType(1.0))
 Constructs a lognormal_distribution. More...
 
 lognormal_distribution (const param_type &parm)
 Constructs a lognormal_distribution from its parameters. More...
 
RealType m () const
 Returns the m parameter of the distribution. More...
 
RealType s () const
 Returns the s parameter 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 random variate distributed according to the lognormal distribution. More...
 
template<class Engine >
result_type operator() (Engine &eng, const param_type &parm)
 Returns a random variate distributed according to the lognormal distribution with parameters specified by param. More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, lognormal_distribution, ld)
 Writes the distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, lognormal_distribution, ld)
 Reads the distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (lognormal_distribution, lhs, rhs)
 Returns true if the two distributions will produce identical sequences of values given equal generators. More...
 

Detailed Description

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

Instantiations of class template lognormal_distribution model a .

Such a distribution produces random numbers with $\displaystyle p(x) = \frac{1}{x s \sqrt{2\pi}} e^{\frac{-\left(\log(x)-m\right)^2}{2s^2}}$ for x > 0.

This distribution has been updated to match the C++ standard. Its behavior has changed from the original boost::lognormal_distribution. A backwards compatible version is provided in namespace boost.

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::lognormal_distribution< RealType >::lognormal_distribution ( RealType  m_arg = RealType(0.0),
RealType  s_arg = RealType(1.0) 
)
inlineexplicit

Constructs a lognormal_distribution.

m and s are the parameters of the distribution.

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

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

Constructs a lognormal_distribution from its parameters.

Member Function Documentation

template<class RealType = double>
RealType min boost::random::lognormal_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::lognormal_distribution< RealType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the largest value that the distribution can produce.

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

Returns true if the two distributions will produce identical sequences of values given equal generators.

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

Reads the distribution from a std::istream.

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

Writes the distribution to a std::ostream.

template<class RealType = double>
RealType boost::random::lognormal_distribution< RealType >::m ( ) const
inline

Returns the m parameter of the distribution.

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

Returns a random variate distributed according to the lognormal distribution.

References boost::math::ef::exp().

template<class RealType = double>
template<class Engine >
result_type boost::random::lognormal_distribution< RealType >::operator() ( Engine &  eng,
const param_type parm 
)
inline

Returns a random variate distributed according to the lognormal distribution with parameters specified by param.

References boost::random::lognormal_distribution< RealType >::lognormal_distribution().

template<class RealType = double>
void boost::random::lognormal_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::lognormal_distribution< RealType >::s ( ) const
inline

Returns the s parameter of the distribution.


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