pub fn gradient(
    interval_width: f64,
    kind: Option<DerivativeKind>,
    point: &[f64],
    mut value_fn: impl FnMut(&[f64]) -> f64,
) -> Vec<f64> {
    try_gradient::<Never, _>(interval_width, kind, point, |x| Ok(value_fn(x)))
        .unwrap_or_else(|e| match e {})
}
/// Numerically compute a gradient.
///
/// This independently performs a slope check along each individual
/// axis of the input.  The number of function calls it makes will
/// be linearly proportional to the input size. This might be
/// prohibitively expensive!!
Numerically compute a gradient.
This independently performs a slope check along each individual
axis of the input.  The number of function calls it makes will
be linearly proportional to the input size. This might be
prohibitively expensive
Numerically compute a gradient . This independently performs a slope check along each individual axis of the input . The number of function calls it makes will be linearly proportional to the input size . This might be prohibitively expensive
pub fn gradient(
    interval_width: f64,
    kind: Option<DerivativeKind>,
    point: &[f64],
    mut value_fn: impl FnMut(&[f64]) -> f64,
) -> Vec<f64> {
    try_gradient::<Never, _>(interval_width, kind, point, |x| Ok(value_fn(x)))
        .unwrap_or_else(|e| match e {})
}
pub fn gradient ( interval_width : f64 , kind : Option < DerivativeKind > , point : & [ f64 ] , mut value_fn : impl FnMut ( & [ f64 ] ) -> f64 , ) -> Vec < f64 > { try_gradient :: < Never , _ > ( interval_width , kind , point , | x | Ok ( value_fn ( x ) ) ) . unwrap_or_else ( | e | match e { } ) }
Numerically compute a gradient.
Numerically compute a gradient .
interval_width
f64
kind
Option<DerivativeKind>
point
&[f64]
value_fn
impl FnMut(&[f64]) -> f64
interval_width
f64
kind
Option<DerivativeKind>
point
&[f64]
value_fn
impl FnMut(&[f64]) -> f64