24#ifndef quantlib_polar_student_t_rng_h
25#define quantlib_polar_student_t_rng_h
59 "Invalid degrees of freedom parameter.");
66 "Invalid degrees of freedom parameter.");
82 v = 2.* uniformGenerator_.next().value - 1.;
83 u = 2.* uniformGenerator_.next().value - 1.;
86 return {u * std::sqrt(degFreedom_ * (std::pow(rSqr, -2. / degFreedom_) - 1.) / rSqr), 1.};
Student t random number generator.
PolarStudentTRng(Real degFreedom, BigNatural seed=0)
PolarStudentTRng(Real degFreedom, const URNG &urng)
sample_type next() const
returns a sample from a Student-t distribution
Sample< Real > sample_type
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
unsigned QL_BIG_INTEGER BigNatural
large positive integer
ext::shared_ptr< BlackVolTermStructure > v