pub fn forward_difference_jacobian<P, V>(
problem: &P,
x: &V,
function_precision: f64,
fixed_step: Option<f64>,
) -> Result<<V as DenseMatrixFromFn>::Matrix, P::Error>where
P: Residual<Param = V, Output = V> + MaybeSync,
V: Clone + VectorLen + VectorIndex + DenseMatrixFromFn + MaybeSync + MaybeSend,
P::Error: MaybeSend,Expand description
Forward-difference Jacobian, column j ≈ (r(x+hⱼeⱼ) − r(x)) / hⱼ.
Reproduces MINPACK fdjac2: eps = sqrt(function_precision),
hⱼ = eps·|xⱼ|, hⱼ = eps when xⱼ = 0. n+1 residual evaluations.
The result is an m × n matrix (m = r(x).len(), n = x.len()).
Returns Err if any probe’s residual does.