approximate_gradient_fd_into

Function approximate_gradient_fd_into 

Source
pub fn approximate_gradient_fd_into<'a, T>(
    df: DVectorViewMut<'_, T>,
    f: impl FnMut(DVectorView<'_, T>) -> T,
    x: impl Into<DVectorViewMut<'a, T>>,
    h: T,
)
where T: Real,
Expand description

Approximates the derivative of the function f: R^n -> R with finite differences.

Analogous to approximate_gradient_fd, but stores the result in the provided output vector.

The vector x is mutable in order to contain intermediate results, but upon returning, its content remains unchanged.