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

The beta distribution is a real-valued distribution which produces values in the range [0, 1]. More...

#include <beta_distribution.hpp>

Classes

class  param_type
 

Public Types

typedef RealType result_type
 
typedef RealType input_type
 

Public Member Functions

 beta_distribution (RealType alpha_arg=RealType(1.0), RealType beta_arg=RealType(1.0))
 Constructs an beta_distribution from its "alpha" and "beta" parameters. More...
 
 beta_distribution (const param_type &parm)
 Constructs an beta_distribution from its parameters. More...
 
template<class URNG >
RealType operator() (URNG &urng) const
 Returns a random variate distributed according to the beta distribution. More...
 
template<class URNG >
RealType operator() (URNG &urng, const param_type &parm) const
 Returns a random variate distributed accordint to the beta distribution with parameters specified by param. More...
 
RealType alpha () const
 Returns the "alpha" parameter of the distribution. More...
 
RealType beta () const
 Returns the "beta" 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...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, beta_distribution, wd)
 Writes an beta_distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, beta_distribution, wd)
 Reads an beta_distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (beta_distribution, lhs, rhs)
 Returns true if the two instances of beta_distribution will return identical sequences of values given equal generators. More...
 

Detailed Description

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

The beta distribution is a real-valued distribution which produces values in the range [0, 1].

It has two parameters, alpha and beta.

It has $\displaystyle p(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}$.

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::beta_distribution< RealType >::beta_distribution ( RealType  alpha_arg = RealType(1.0),
RealType  beta_arg = RealType(1.0) 
)
inlineexplicit

Constructs an beta_distribution from its "alpha" and "beta" parameters.

Requires: alpha > 0, beta > 0

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

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

Constructs an beta_distribution from its parameters.

Member Function Documentation

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

Returns the "alpha" parameter of the distribution.

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

Returns the "beta" parameter of the distribution.

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

Returns the largest value that the distribution can produce.

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

Returns true if the two instances of beta_distribution will return identical sequences of values given equal generators.

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

Reads an beta_distribution from a std::istream.

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

Writes an beta_distribution to a std::ostream.

template<class RealType = double>
template<class URNG >
RealType boost::random::beta_distribution< RealType >::operator() ( URNG &  urng) const
inline

Returns a random variate distributed according to the beta distribution.

References boost::a, and boost::asio::b.

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

Returns a random variate distributed accordint to the beta distribution with parameters specified by param.

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

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

Returns the parameters of the distribution.

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

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