24#ifndef quantlib_polar_student_t_rng_h
25#define quantlib_polar_student_t_rng_h
27#include <ql/methods/montecarlo/sample.hpp>
28#include <ql/errors.hpp>
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
unsigned QL_BIG_INTEGER BigNatural
large positive integer