pub fn update_inverse_hessian_bfgs(
h_inv: &DMatrix<f64>,
delta_x: &DVector<f64>,
delta_g: &DVector<f64>,
) -> DMatrix<f64>Expand description
Updates the inverse Hessian using BFGS formula.
This is the standard BFGS inverse update used in the main optimizer:
H⁻¹_new = (I - ρ·s·y^T) · H⁻¹ · (I - ρ·y·s^T) + ρ·s·s^Twhere ρ = 1/(y^T·s), s = Δx, y = Δg.
Equivalent Old Code formula from UpdateX:
fac = 1 / (DelG · DelX)
fad = 1 / (DelG · H_inv · DelG)
w = fac * DelX - fad * H_inv · DelG
H_inv_new = H_inv + fac * DelX * DelX^T - fad * HDelG * HDelG^T + fae * w * w^T