[][src]Function nlopt::approximate_gradient

pub fn approximate_gradient(
    x0: &[f64],
    f: fn(_: &[f64]) -> f64,
    grad: &mut [f64]
)

Helper function to calculate gradient of function numerically. Can be useful when a gradient must be provided to the optimization algorithm and a closed-form derivative cannot be obtained