Skip to main content

tensor_gauss_legendre

Function tensor_gauss_legendre 

Source
pub fn tensor_gauss_legendre<F: Fn(&[f64]) -> f64>(
    f: F,
    lower: &[f64],
    upper: &[f64],
    points_per_axis: usize,
) -> Result<f64, ErrorsJSL>
Expand description

The tensor-product Gauss-Legendre rule with points_per_axis nodes along every axis: exact for polynomials of degree 2·points − 1 in each variable, at a cost of pointsᵈ evaluations (practical up to about five dimensions).