Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
boost::random::exponential_distribution_v165< RealType > Class Template Reference

#include <Boost165ExponentialDistribution.hpp>

+ Inheritance diagram for boost::random::exponential_distribution_v165< RealType >:
+ Collaboration diagram for boost::random::exponential_distribution_v165< RealType >:

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 exponential_distribution_v165 (RealType lambda_arg=RealType(1.0))
 
 exponential_distribution_v165 (const param_type &parm)
 
RealType lambda () 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) const
 
template<class Engine >
result_type operator() (Engine &eng, const param_type &parm) const
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, exponential_distribution_v165, ed)
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, exponential_distribution_v165, ed)
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (exponential_distribution_v165, lhs, rhs)
 

Private Attributes

result_type _lambda
 

Detailed Description

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

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

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

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 267 of file Boost165ExponentialDistribution.hpp.

Member Typedef Documentation

◆ input_type

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

Definition at line 270 of file Boost165ExponentialDistribution.hpp.

◆ result_type

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

Definition at line 271 of file Boost165ExponentialDistribution.hpp.

Constructor & Destructor Documentation

◆ exponential_distribution_v165() [1/2]

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

Constructs an exponential_distribution with a given lambda.

Requires: lambda > 0

Definition at line 321 of file Boost165ExponentialDistribution.hpp.

References boost::random::exponential_distribution_v165< RealType >::_lambda.

◆ exponential_distribution_v165() [2/2]

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

Constructs an exponential_distribution from its parameters

Definition at line 327 of file Boost165ExponentialDistribution.hpp.

Member Function Documentation

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [1/2]

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

Returns the smallest value that the distribution can produce.

Definition at line 336 of file Boost165ExponentialDistribution.hpp.

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [2/2]

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

Returns the largest value that the distribution can produce.

Definition at line 341 of file Boost165ExponentialDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR()

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

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

Definition at line 396 of file Boost165ExponentialDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR()

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

Reads the distribution from a std::istream.

Definition at line 386 of file Boost165ExponentialDistribution.hpp.

◆ BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR()

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

Writes the distribution to a std::ostream.

Definition at line 379 of file Boost165ExponentialDistribution.hpp.

◆ lambda()

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

Returns the lambda parameter of the distribution.

Definition at line 333 of file Boost165ExponentialDistribution.hpp.

References boost::random::exponential_distribution_v165< RealType >::_lambda.

◆ operator()() [1/2]

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

Returns a random variate distributed according to the exponential distribution.

Definition at line 362 of file Boost165ExponentialDistribution.hpp.

References boost::random::exponential_distribution_v165< RealType >::_lambda.

◆ operator()() [2/2]

template<class RealType = double>
template<class Engine >
result_type boost::random::exponential_distribution_v165< 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.

Definition at line 373 of file Boost165ExponentialDistribution.hpp.

◆ param() [1/2]

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

Returns the parameters of the distribution.

Definition at line 347 of file Boost165ExponentialDistribution.hpp.

References boost::random::exponential_distribution_v165< RealType >::_lambda.

◆ param() [2/2]

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

◆ reset()

template<class RealType = double>
void boost::random::exponential_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 355 of file Boost165ExponentialDistribution.hpp.

Member Data Documentation

◆ _lambda


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