Skip to main content

Module gauss

Module gauss 

Source
Expand description

Gauss quadrature rules for numerical integration

This module provides quadrature rules for approximating integrals by weighted sums.

The integral of f(x) * omega(x) is approximated by a weighted sum:

sum(f(xi) * wi for (xi, wi) in zip(x, w))

where we generally have superexponential convergence for smooth f(x) with the number of quadrature points.

Structs§

Rule
Quadrature rule for numerical integration.

Functions§

legendre
Create a Gauss-Legendre quadrature rule with n points on [-1, 1].
legendre_custom
Create a Gauss-Legendre quadrature rule with n points on [-1, 1] (CustomNumeric version).
legendre_generic
Generic Legendre Gauss quadrature rule for CustomNumeric types
legendre_twofloat
Create a Gauss-Legendre quadrature rule with n points on [-1, 1] (Df64 version).
legendre_vandermonde
Create Legendre Vandermonde matrix for polynomial interpolation