Chaste  Release::2018.1
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.

Constructor & Destructor Documentation

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.

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

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.

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.

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.

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.

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.

template<class RealType = double>
void boost::random::gamma_distribution_v165< RealType >::param ( const param_type parm)
inline
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 Function Documentation

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.

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 252 of file Boost165GammaDistribution.hpp.

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.

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.


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