Function consalign::bfgs

pub fn bfgs<F, G>(
    x0: ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
    f: F,
    g: G
) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, ()>where
    F: Fn(&ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>) -> f64,
    G: Fn(&ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>) -> ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
Expand description

Returns a value of x that should minimize f. f must be convex and twice-differentiable.

  • x0 is an initial guess for x. Often this is chosen randomly.
  • f is the objective function
  • g is the gradient of f