Module laguerre

Source
Expand description

Numerical integration using the generalized Gauss-Laguerre quadrature rule.

A Gauss-Laguerre rule of degree n has nodes and weights chosen such that it can integrate polynomials of degree 2n-1 exactly with the weighing function w(x, alpha) = x^alpha * e^(-x) over the domain [0, ∞).

§Examples

use gauss_quad::laguerre::GaussLaguerre;
use approx::assert_abs_diff_eq;

let quad = GaussLaguerre::new(10, 1.0)?;

let integral = quad.integrate(|x| x.powi(2));

assert_abs_diff_eq!(integral, 6.0, epsilon = 1e-14);

Structs§

GaussLaguerre
A Gauss-Laguerre quadrature scheme.
GaussLaguerreError
The error returned by GaussLaguerre::new if given a degree, deg, less than 2 and/or an alpha of -1 or less.
GaussLaguerreIntoIter
An owning iterator over the node-weight pairs of the quadrature rule.
GaussLaguerreIter
An iterator over the node-weight pairs of the quadrature rule.
GaussLaguerreNodes
An iterator over the nodes of the quadrature rule.
GaussLaguerreWeights
An iterator over the weights of the quadrature rule.

Enums§

GaussLaguerreErrorReason
The reason for the GaussLaguerreError, returned by the GaussLaguerreError::reason function.