24#include <ql/math/integrals/gaussianorthogonalpolynomial.hpp>
25#include <ql/math/distributions/gammadistribution.hpp>
26#include <ql/math/comparison.hpp>
27#include <ql/errors.hpp>
45 return std::sqrt(
w(x))*
value(n, x);
51 QL_REQUIRE(s > -1.0,
"s must be bigger than -1");
67 return std::pow(x,
s_)*std::exp(-x);
73 QL_REQUIRE(mu > -0.5,
"mu must be bigger than -0.5");
85 return (i % 2) != 0U ?
Real(i / 2.0 +
mu_) :
Real(i / 2.0);
89 return std::pow(std::fabs(x), 2*
mu_)*std::exp(-x*x);
93 : alpha_(alpha), beta_ (beta) {
94 QL_REQUIRE(
alpha_+
beta_ > -2.0,
"alpha+beta must be bigger than -2");
95 QL_REQUIRE(
alpha_ > -1.0,
"alpha must be bigger than -1");
96 QL_REQUIRE(
beta_ > -1.0,
"beta must be bigger than -1");
112 QL_FAIL(
"can't compute a_k for jacobi integration\n");
119 QL_ASSERT(!
close_enough(denom,0.0),
"can't compute a_k for jacobi integration\n");
133 QL_FAIL(
"can't compute b_k for jacobi integration\n");
139 QL_ASSERT(!
close_enough(denom,0.0),
"can't compute b_k for jacobi integration\n");
175 return i != 0U ? M_PI_2 * M_PI_2 * i * i : M_PI;
179 return 1/std::cosh(x);
GaussChebyshev2ndPolynomial()
GaussChebyshevPolynomial()
GaussGegenbauerPolynomial(Real lambda)
Real mu_0() const override
Real beta(Size i) const override
Real alpha(Size i) const override
Real w(Real x) const override
GaussHermitePolynomial(Real mu=0.0)
Real mu_0() const override
Real beta(Size i) const override
Real alpha(Size i) const override
Real w(Real x) const override
Real mu_0() const override
Real beta(Size i) const override
Real alpha(Size i) const override
Real w(Real x) const override
GaussJacobiPolynomial(Real alpha, Real beta)
Real mu_0() const override
GaussLaguerrePolynomial(Real s=0.0)
Real beta(Size i) const override
Real alpha(Size i) const override
Real w(Real x) const override
GaussLegendrePolynomial()
virtual Real alpha(Size i) const =0
Real weightedValue(Size i, Real x) const
Real value(Size i, Real x) const
virtual Real beta(Size i) const =0
virtual Real w(Real x) const =0
std::size_t Size
size of a container
bool close_enough(const Quantity &m1, const Quantity &m2, Size n)