QUADMOM
Quadrature Rules from Weight Moments
QUADMOM
is a C++ library which
computes a Gaussian quadrature rule for a weight function rho(x)
based on the GolubWelsch procedure that only requires knowledge
of the moments of rho(x).
The standard GolubWelsch procedure expects to work with the
coefficients alpha() and beta() of the three term recursion
for the orthogonal polynomials associated with the weight function rho(x).
However, in the same paper, Golub and Welsch discuss a related procedure
which, to compute a Gaussian quadrature rule of order N, requires the
values of the first M=2*N+1 moments associated with rho(x):
mu(k) = integral x^k rho(x) dx, 0 <= k <= 2*n
This library demonstrates this momentbased procedure.
Executing the sample program requires access to the TOMS655 library
as well.
Licensing:
The computer code and data files made available on this web page
are distributed under
the GNU LGPL license.
Languages:
QUADMOM is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
QUADRATURE_GOLUB_WELSCH,
a C++ library which
computes the points and weights of a Gaussian quadrature rule using the
GolubWelsch procedure, assuming that the points have been specified.
QUADRATURE_LEAST_SQUARES,
a C++ library which
computes weights for "subinterpolatory" quadrature rules,
that is, it estimates integrals by integrating a polynomial that
approximates the function data in a least squares sense.
QUADRULE,
a C++ library which
contains information about quadrature rules, both as tabulated values,
and as computational procedures.
TOMS655,
a C++ library which
computes the weights for interpolatory quadrature rules;
this library is commonly called IQPACK,
by Sylvan Elhay and Jaroslav Kautsky.
Reference:

Sylvan Elhay, Jaroslav Kautsky,
Algorithm 655:
IQPACK,
FORTRAN Subroutines for the Weights of Interpolatory Quadrature,
ACM Transactions on Mathematical Software,
Volume 13, Number 4, December 1987, pages 399415.

Gene Golub, John Welsch,
Calculation of Gaussian Quadrature Rules,
Mathematics of Computation,
Volume 23, Number 106, April 1969, pages 221230.

Jaroslav Kautsky, Sylvan Elhay,
Calculation of the Weights of Interpolatory Quadratures,
Numerische Mathematik,
Volume 40, Number 3, October 1982, pages 407422.
Source Code:
Examples and Tests:
List of Routines:

JACOBI_EIGENVALUE carries out the Jacobi eigenvalue iteration.

MOMENT_METHOD computes a quadrature rule by the method of moments.

MOMENTS_LAGUERRE returns moments of the Laguerre distribution.

MOMENTS_LEGENDRE returns moments of the Legendre weight on [A,B].

MOMENTS_NORMAL_01 returns moments of the standard Normal distribution.

MOMENTS_NORMAL returns moments of the standard Normal distribution.

MOMENTS_TRUNCATED_NORMAL_AB: moments of truncated Normal distribution.

MOMENTS_TRUNCATED_NORMAL_A: moments of lower truncated Normal.

MOMENTS_TRUNCATED_NORMAL_B: moments of upper truncated Normal.

NORMAL_01_CDF evaluates the Normal 01 CDF.

NORMAL_01_PDF evaluates the Normal 01 PDF.

R8_CHOOSE computes the binomial coefficient C(N,K) as an R8.

R8_FACTORIAL computes the factorial of N.

R8_FACTORIAL2 computes the double factorial function.

R8_MOP returns the Ith power of 1 as an R8 value.

R8MAT_CHOLESKY_FACTOR_UPPER: the upper Cholesky factor of a symmetric R8MAT.

R8MAT_COPY_NEW copies one R8MAT to a "new" R8MAT.

R8MAT_DIAG_GET_VECTOR gets the value of the diagonal of an R8MAT.

R8MAT_IDENTITY sets the square matrix A to the identity.

R8MAT_PRINT prints an R8MAT.

R8MAT_PRINT_SOME prints some of an R8MAT.

R8VEC_PRINT prints an R8VEC.

R8VEC2_PRINT prints an R8VEC2.

TIMESTAMP prints the current YMDHMS date as a time stamp.

TRUNCATED_NORMAL_AB_MOMENT: moments of the truncated Normal PDF.

TRUNCATED_NORMAL_A_MOMENT: moments of the lower truncated Normal PDF.

TRUNCATED_NORMAL_B_MOMENT: moments of the upper truncated Normal PDF.
You can go up one level to
the C++ source codes.
Last revised on 19 September 2013.