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§
- A Gauss-Laguerre quadrature scheme.
- The error returned by
GaussLaguerre::new
if given a degree,deg
, less than 2 and/or analpha
of -1 or less. - An owning iterator over the node-weight pairs of the quadrature rule.
- An iterator over the node-weight pairs of the quadrature rule.
- An iterator over the nodes of the quadrature rule.
- An iterator over the weights of the quadrature rule.
Enums§
- The reason for the
GaussLaguerreError
, returned by theGaussLaguerreError::reason
function.