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

The exponential distribution is a model of with a single parameter lambda. More...

#include <exponential_distribution.hpp>

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

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

Detailed Description

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

The exponential distribution is a model of with a single parameter lambda.

It has $\displaystyle p(x) = \lambda e^{-\lambda x}$

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::exponential_distribution< RealType >::exponential_distribution ( RealType  lambda_arg = RealType(1.0))
inlineexplicit

Constructs an exponential_distribution with a given lambda.

Requires: lambda > 0

References BOOST_ASSERT.

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

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

Constructs an exponential_distribution from its parameters.

Member Function Documentation

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

Returns the largest value that the distribution can produce.

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

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

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

Reads the distribution from a std::istream.

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

Writes the distribution to a std::ostream.

template<class RealType = double>
RealType boost::random::exponential_distribution< RealType >::lambda ( ) const
inline

Returns the lambda parameter of the distribution.

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

Returns a random variate distributed according to the exponential distribution.

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

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

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

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

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

Returns the parameters of the distribution.

References boost::random::exponential_distribution< RealType >::param_type::param_type().

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

Sets the parameters of the distribution.

References boost::random::exponential_distribution< RealType >::param_type::lambda().

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

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


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