41 for (i=1; i <
n; ++i) {
43 e[i-1] = std::sqrt(orthPoly.
beta(i));
57 w_[i] = mu_0*ev[0][i]*ev[0][i] / orthPoly.
w(
x_[i]);
63 template <
class Integration>
67 integration_(ext::make_shared<Integration>(
n))
70 template <
class Integration>
74 const Real c1 = 0.5*(
b-a);
75 const Real c2 = 0.5*(a+
b);
77 return c1*integration_->operator()(
78 [c1, c2,
f](
Real x) {
return f(c1*x+c2);});
1-D array used in linear algebra.
orthogonal polynomial for Gaussian quadratures
virtual Real mu_0() const =0
virtual Real alpha(Size i) const =0
virtual Real beta(Size i) const =0
virtual Real w(Real x) const =0
GaussianQuadrature(Size n, const GaussianOrthogonalPolynomial &p)
Matrix used in linear algebra.
template class providing a null value for a given type.
static const Real x20[10]
static const Real w20[10]
tridiag. QR eigen decomposition with explicite shift aka Wilkinson
@ OnlyFirstRowEigenVector
const Matrix & eigenvectors() const
const Array & eigenvalues() const
GaussianQuadratureIntegrator(Size n)
Real integrate(const ext::function< Real(Real)> &f, Real a, Real b) const override
#define QL_FAIL(message)
throw an error (possibly with file and line information)
ext::function< Real(Real)> b
Integral of a 1-dimensional function using the Gauss quadratures.
std::size_t Size
size of a container
Eigenvalues/eigenvectors of a real symmetric matrix.
tridiag. QR eigen decompositions with implicit shift