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

#include <Boost165GammaDistribution.hpp>

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

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 BOOST_STATIC_ASSERT (!std::numeric_limits< RealType >::is_integer)
 
 gamma_distribution_v165 (const result_type &alpha_arg=result_type(1.0), const result_type &beta_arg=result_type(1.0))
 
 gamma_distribution_v165 (const param_type &parm)
 
RealType alpha () const
 
RealType beta () 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 >
RealType operator() (URNG &urng, const param_type &parm) const
 

Private Attributes

exponential_distribution_v165< RealType > _exp
 
result_type _alpha
 
result_type _beta
 
result_type _p
 

Friends

template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const gamma_distribution_v165 &gd)
 
template<class CharT , class Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, gamma_distribution_v165 &gd)
 
bool operator== (const gamma_distribution_v165 &lhs, const gamma_distribution_v165 &rhs)
 
bool operator!= (const gamma_distribution_v165 &lhs, const gamma_distribution_v165 &rhs)
 

Detailed Description

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

The gamma distribution is a continuous distribution with two parameters alpha and beta. It produces values > 0.

It has $\displaystyle p(x) = x^{\alpha-1}\frac{e^{-x/\beta}}{\beta^\alpha\Gamma(\alpha)}$.

Definition at line 59 of file Boost165GammaDistribution.hpp.

Member Typedef Documentation

◆ input_type

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

Definition at line 62 of file Boost165GammaDistribution.hpp.

◆ result_type

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

Definition at line 63 of file Boost165GammaDistribution.hpp.

Constructor & Destructor Documentation

◆ gamma_distribution_v165() [1/2]

template<class RealType = double>
boost::random::gamma_distribution_v165< RealType >::gamma_distribution_v165 ( const result_type &  alpha_arg = result_type(1.0),
const result_type &  beta_arg = result_type(1.0) 
)
inlineexplicit

Creates a new gamma_distribution with parameters "alpha" and "beta".

Requires: alpha > 0 && beta > 0

Definition at line 133 of file Boost165GammaDistribution.hpp.

◆ gamma_distribution_v165() [2/2]

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

Constructs a gamma_distribution from its parameters.

Definition at line 143 of file Boost165GammaDistribution.hpp.

Member Function Documentation

◆ alpha()

template<class RealType = double>
RealType boost::random::gamma_distribution_v165< RealType >::alpha ( ) const
inline

Returns the "alpha" paramter of the distribution.

Definition at line 152 of file Boost165GammaDistribution.hpp.

◆ beta()

template<class RealType = double>
RealType boost::random::gamma_distribution_v165< RealType >::beta ( ) const
inline

Returns the "beta" parameter of the distribution.

Definition at line 154 of file Boost165GammaDistribution.hpp.

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [1/2]

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

Returns the smallest value that the distribution can produce.

Definition at line 156 of file Boost165GammaDistribution.hpp.

◆ BOOST_PREVENT_MACRO_SUBSTITUTION() [2/2]

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

Definition at line 158 of file Boost165GammaDistribution.hpp.

◆ operator()() [1/2]

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

Returns a random variate distributed according to the gamma distribution.

Definition at line 184 of file Boost165GammaDistribution.hpp.

◆ operator()() [2/2]

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

Definition at line 243 of file Boost165GammaDistribution.hpp.

◆ param() [1/2]

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

Returns the parameters of the distribution.

Definition at line 164 of file Boost165GammaDistribution.hpp.

◆ param() [2/2]

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

◆ reset()

template<class RealType = double>
void boost::random::gamma_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 177 of file Boost165GammaDistribution.hpp.

Friends And Related Symbol Documentation

◆ operator!=

template<class RealType = double>
bool operator!= ( const gamma_distribution_v165< RealType > &  lhs,
const gamma_distribution_v165< RealType > &  rhs 
)
friend

Returns true if the two distributions can produce different sequences of random variates, given equal generators.

Definition at line 285 of file Boost165GammaDistribution.hpp.

◆ operator<<

template<class RealType = double>
template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< ( std::basic_ostream< CharT, Traits > &  os,
const gamma_distribution_v165< RealType > &  gd 
)
friend

Writes a gamma_distribution_v165 to a std::ostream.

Definition at line 251 of file Boost165GammaDistribution.hpp.

◆ operator==

template<class RealType = double>
bool operator== ( const gamma_distribution_v165< RealType > &  lhs,
const gamma_distribution_v165< RealType > &  rhs 
)
friend

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

Definition at line 273 of file Boost165GammaDistribution.hpp.

◆ operator>>

template<class RealType = double>
template<class CharT , class Traits >
std::basic_istream< CharT, Traits > & operator>> ( std::basic_istream< CharT, Traits > &  is,
gamma_distribution_v165< RealType > &  gd 
)
friend

Reads a gamma_distribution from a std::istream.

Definition at line 262 of file Boost165GammaDistribution.hpp.

Member Data Documentation

◆ _alpha

template<class RealType = double>
result_type boost::random::gamma_distribution_v165< RealType >::_alpha
private

Definition at line 315 of file Boost165GammaDistribution.hpp.

◆ _beta

template<class RealType = double>
result_type boost::random::gamma_distribution_v165< RealType >::_beta
private

Definition at line 316 of file Boost165GammaDistribution.hpp.

◆ _exp

template<class RealType = double>
exponential_distribution_v165<RealType> boost::random::gamma_distribution_v165< RealType >::_exp
private

Definition at line 314 of file Boost165GammaDistribution.hpp.

◆ _p

template<class RealType = double>
result_type boost::random::gamma_distribution_v165< RealType >::_p
private

Definition at line 318 of file Boost165GammaDistribution.hpp.


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