pub fn integrate<const N: usize, F>(
f: F,
a: f64,
b: f64,
tolerance: Tolerance,
) -> Result<Integral<N>, CoreError>Expand description
Integrates the vector-valued f over [a, b] to tolerance.
a > b integrates backwards (the result changes sign) and a == b gives zeros. Integrands
whose components differ in scale should be scaled to order one first, so one absolute
tolerance suits them all.
§Errors
CoreError::Domainifaorbis not finite, or the tolerance is negative or NaN, or allows no subinterval.CoreError::QuadratureNotFiniteiffreturns NaN or an infinity (for example at an endpoint singularity the rule’s nodes happen to reach; the nodes never include the ends).CoreError::QuadratureDidNotConvergeiftolerance.max_intervalssubintervals don’t meet the tolerance.