![]() |
Home | Libraries | People | FAQ | More |
boost::random::non_central_chi_squared_distribution
// In header: <boost/random/non_central_chi_squared_distribution.hpp> template<typename RealType> class non_central_chi_squared_distribution { public: // types typedef ; typedef ; // member classes/structs/unions class param_type { public: // types typedef non_central_chi_squared_distribution ; // construct/copy/destruct ( = , = ); // public member functions () ; () ; // friend functions template<typename CharT, typename Traits> (, param_type &); template<typename CharT, typename Traits> (, param_type &); (param_type &, param_type &); (param_type &, param_type &); }; // construct/copy/destruct ( = , = ); (param_type &); // public member functions template<typename URNG> (, param_type &) ; template<typename URNG> (); () ; () ; param_type () ; (param_type &); (); () ; () ; // friend functions template<typename CharT, typename Traits> (, non_central_chi_squared_distribution &); template<typename CharT, typename Traits> (, non_central_chi_squared_distribution &); (non_central_chi_squared_distribution &, non_central_chi_squared_distribution &); (non_central_chi_squared_distribution &, non_central_chi_squared_distribution &); };
The noncentral chi-squared distribution is a real valued distribution with two parameter, k
and lambda
. The distribution produces values > 0.
This is the distribution of the sum of squares of k Normal distributed variates each with variance one and the sum of squares of the normal means.
The distribution function is . where
is a modified Bessel function of the first kind.
The algorithm is taken from
"Monte Carlo Methods in Financial Engineering", Paul Glasserman, 2003, XIII, 596 p, Stochastic Modelling and Applied Probability, Vol. 53, ISBN 978-0-387-21617-1, p 124, Fig. 3.5.
non_central_chi_squared_distribution
public
construct/copy/destruct( k = , lambda = );
Construct a
object. non_central_chi_squared_distribution
k
and lambda
are the parameter of the distribution.
Requires: k > 0 && lambda > 0
(param_type & param);
Construct a
object from the parameter. non_central_chi_squared_distribution
non_central_chi_squared_distribution
public member functionstemplate<typename URNG> ( eng, param_type & param) ;
Returns a random variate distributed according to the non central chi squared distribution specified by param
.
template<typename URNG> ( eng);
Returns a random variate distributed according to the non central chi squared distribution.
() ;
Returns the k
parameter of the distribution.
() ;
Returns the lambda
parameter of the distribution.
param_type () ;
Returns the parameters of the distribution.
(param_type & param);
Sets parameters of the distribution.
();
Resets the distribution, so that subsequent uses does not depend on values already produced by it.
() ;
Returns the smallest value that the distribution can produce.
() ;
Returns the largest value that the distribution can produce.
non_central_chi_squared_distribution
friend functionstemplate<typename CharT, typename Traits> ( os, non_central_chi_squared_distribution & dist);
Writes the parameters of the distribution to a std::ostream
.
template<typename CharT, typename Traits> ( is, non_central_chi_squared_distribution & dist);
reads the parameters of the distribution from a std::istream
.
(non_central_chi_squared_distribution & lhs, non_central_chi_squared_distribution & rhs);
Returns true if two distributions have the same parameters and produce the same sequence of random numbers given equal generators.
(non_central_chi_squared_distribution & lhs, non_central_chi_squared_distribution & rhs);
Returns true if two distributions have different parameters and/or can produce different sequences of random numbers given equal generators.