Function bfgs::bfgs [−][src]
pub fn bfgs<F, G>(x0: Array1<f64>, f: F, g: G) -> Result<Array1<f64>, ()> where
F: Fn(&Array1<f64>) -> f64,
G: Fn(&Array1<f64>) -> Array1<f64>,
Returns a value of x
that should minimize f
. f
must be convex and twice-differentiable.
x0
is an initial guess forx
. Often this is chosen randomly.f
is the objective functiong
is the gradient off