Skip to main content
← OpenMECP Documentation

update_hessian_by_method

Function update_hessian_by_method 

Source
pub fn update_hessian_by_method(
    hessian: &DMatrix<f64>,
    delta_x: &DVector<f64>,
    delta_g: &DVector<f64>,
    method: &HessianMethod,
) -> DMatrix<f64>
Expand description

Updates the Hessian matrix using the specified method.

Dispatches to the appropriate update formula based on the HessianMethod:

  • DirectPsb: PSB (Powell-Symmetric-Broyden) rank-2 update on direct H
  • InverseBfgs: BFGS inverse Hessian update (legacy)
  • Bofill: Bofill weighted update for saddle-point-like crossings
  • Powell: Powell symmetric rank-one (SR1) update
  • BfgsPowellMix: Adaptive BFGS/Powell blend with Bofill weighting

§Arguments

  • hessian - Current Hessian matrix (direct or inverse depending on method)
  • delta_x - Step vector (x_new - x_old) in A
  • delta_g - Gradient difference (g_new - g_old) in Ha/A
  • method - Hessian update method to use

§Returns

Updated Hessian matrix.