Function rasterize::utils::integrate_quadrature[][src]

pub fn integrate_quadrature(
    x0: Scalar,
    x1: Scalar,
    f: impl Fn(Scalar) -> Scalar,
    table: &[(Scalar, Scalar)]
) -> Scalar

Find an integral of a function f on an interval from x0 to x1 using Legendre-Gauss quadrature method.

This method is equivalent to interpolation of the function with polynomial of degree table.len() * 2 - 1 and calculating its integral.

Refernece: