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

The cauchy distribution is a continuous distribution with two parameters, median and sigma. More...

#include <cauchy_distribution.hpp>

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 cauchy_distribution (RealType median_arg=RealType(0.0), RealType sigma_arg=RealType(1.0))
 Constructs a with the paramters median and sigma. More...
 
 cauchy_distribution (const param_type &parm)
 Constructs a from it's parameters. More...
 
RealType median () const
 Returns: the "median" parameter of the distribution. More...
 
RealType sigma () const
 Returns: the "sigma" parameter of the distribution. More...
 
RealType a () const
 Returns: the "median" parameter of the distribution. More...
 
RealType b () const
 Returns: the "sigma" 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
 
void param (const param_type &parm)
 
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)
 Returns: A random variate distributed according to the cauchy distribution. More...
 
template<class Engine >
result_type operator() (Engine &eng, const param_type &parm)
 Returns: A random variate distributed according to the cauchy distribution with parameters specified by param. More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, cauchy_distribution, cd)
 Writes the distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, cauchy_distribution, cd)
 Reads the distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (cauchy_distribution, lhs, rhs)
 Returns true if the two distributions will produce identical sequences of values, given equal generators. More...
 

Detailed Description

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

The cauchy distribution is a continuous distribution with two parameters, median and sigma.

It has $\displaystyle p(x) = \frac{\sigma}{\pi(\sigma^2 + (x-m)^2)}$

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::cauchy_distribution< RealType >::cauchy_distribution ( RealType  median_arg = RealType(0.0),
RealType  sigma_arg = RealType(1.0) 
)
inlineexplicit

Constructs a with the paramters median and sigma.

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

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

Constructs a from it's parameters.

Member Function Documentation

template<class RealType = double>
RealType boost::random::cauchy_distribution< RealType >::a ( ) const
inline

Returns: the "median" parameter of the distribution.

template<class RealType = double>
RealType boost::random::cauchy_distribution< RealType >::b ( ) const
inline

Returns: the "sigma" parameter of the distribution.

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

Returns the largest value that the distribution can produce.

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

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

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

Reads the distribution from a std::istream.

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

Writes the distribution to a std::ostream.

template<class RealType = double>
RealType boost::random::cauchy_distribution< RealType >::median ( ) const
inline

Returns: the "median" parameter of the distribution.

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

Returns: A random variate distributed according to the cauchy distribution.

References boost::math::ef::tan(), and boost::phoenix::val().

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

Returns: A random variate distributed according to the cauchy distribution with parameters specified by param.

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

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

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

template<class RealType = double>
RealType boost::random::cauchy_distribution< RealType >::sigma ( ) const
inline

Returns: the "sigma" parameter of the distribution.


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