25#ifndef quantlib_poisson_distribution_hpp
26#define quantlib_poisson_distribution_hpp
93 "mu must be non negative (" <<
mu_ <<
" not allowed)");
100 if (k==0)
return 1.0;
104 return std::exp(k*std::log(
mu_) - logFactorial -
mu_);
115 "Inverse cumulative Poisson distribution is "
116 "only defined on the interval [0,1]");
128 return Real(index-1);
Cumulative Poisson distribution function.
Real operator()(BigNatural k) const
CumulativePoissonDistribution(Real mu)
static Real get(Natural n)
static Real ln(Natural n)
Inverse cumulative Poisson distribution function.
Real operator()(Real x) const
Real calcSummand(BigNatural index) const
InverseCumulativePoisson(Real lambda=1.0)
Poisson distribution function.
Real operator()(BigNatural k) const
PoissonDistribution(Real mu)
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Factorial numbers calculator.
QL_INTEGER Integer
integer number
Incomplete Gamma function.
Real incompleteGammaFunction(Real a, Real x, Real accuracy, Integer maxIteration)
Incomplete Gamma function.
unsigned QL_BIG_INTEGER BigNatural
large positive integer