#include <ortho_poly.h>
Public Member Functions | |
GenMomentsPolynomial (const Array1D< double > &moments, const double a, const double b, const unsigned int N) | |
GenMomentsPolynomial (const Array1D< double > &moments, const OrthogonalPolynomial &T, const double a, const double b, const unsigned int N) | |
double | a (const unsigned int k) const |
double | b (const unsigned int k) const |
orthogonal polynomials on [a,b] given by monomial or generalized moments of the weight function = ^b T_k(x)w(x)dx where the T_k also fulfill a three-term recursion; since we can only input a finite number of moments (2N), it is only possible to access a_1,...,a_N and b_1,...,b_N, so you should initialize with N as large as required for your purposes.
references: + Sack/Donovan: An Algorithm for Gaussian Quadrature given Modified Moments, Numer. Math. 18(1972), 465-478 + Golub/Gutknecht: Modified Moments for Indefinite Weight Functions, Numer. Math. 57(1990), 607-624 + Golub/Welsch: Calculation of Gauss quadrature rules, Math. Comp. 23(1969), 221-230
MathTL::GenMomentsPolynomial::GenMomentsPolynomial | ( | const Array1D< double > & | moments, |
const double | a, | ||
const double | b, | ||
const unsigned int | N | ||
) |
Golub/Welsch algorithm: [GW]
moments | (at least) 2*N+1 monomial moments of the weight function |
N | number of three-term recursion coefficients created |
MathTL::GenMomentsPolynomial::GenMomentsPolynomial | ( | const Array1D< double > & | moments, |
const OrthogonalPolynomial & | T, | ||
const double | a, | ||
const double | b, | ||
const unsigned int | N | ||
) |
Sack/Donovan algorithm: 2(i),(ii) of [GG]
double MathTL::GenMomentsPolynomial::a | ( | const unsigned int | k | ) | const [virtual] |
the coefficients a_k
Implements MathTL::OrthogonalPolynomial.
double MathTL::GenMomentsPolynomial::b | ( | const unsigned int | k | ) | const [virtual] |
the coefficients b_k
Implements MathTL::OrthogonalPolynomial.