pub fn directional_central_difference<Output, Error, Evaluate, Difference>(
evaluate_at_offset: Evaluate,
step: f64,
difference: Difference,
) -> Result<Output, Error>Expand description
Estimates a directional derivative for an arbitrary output type.
evaluate_at_offset(scale) evaluates the primal at x + scale * v.
difference receives the positive value, negative value, and
denominator 2h. Keeping those operations in closures avoids imposing
public vector-space traits on scientific types.