Skip to main content

bfgs

Function bfgs 

Source
pub fn bfgs(
    cfg: &OptimConfig,
    f: &dyn Fn(&[f64]) -> f64,
    grad: Option<&dyn Fn(&[f64]) -> Vec<f64>>,
    x0: &[f64],
) -> OptimResult
Expand description

Minimize f from x0 by BFGS. grad falls back to central finite differences when absent. The inverse-Hessian update is skipped whenever the curvature condition s.y > 0 fails, which keeps the approximation positive definite under the Armijo-only line search.