Skip to main content

simpson_vec

Function simpson_vec 

Source
pub fn simpson_vec<F: Fn(f64) -> Vec<f64>>(
    g: &F,
    a: f64,
    b: f64,
    panels: usize,
) -> Vec<f64>
Expand description

Composite Simpson’s rule for a vector-valued integrand g: t → ℝᵏ, integrated component-wise (e.g. a vector field along a parameter, or a state trajectory). The output length is the length of g(a); panels is forced even and ≥ 2.