From e32f5ffa6661fdfa6d04a10eaf5de48d71e48b64 Mon Sep 17 00:00:00 2001 From: lenhan Date: Sun, 17 May 2026 17:22:28 +1000 Subject: [PATCH] Removed dead code --- src/optimizer.rs | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/optimizer.rs b/src/optimizer.rs index 25b5ee3..e692567 100644 --- a/src/optimizer.rs +++ b/src/optimizer.rs @@ -3339,41 +3339,6 @@ pub fn stepsize_blend( old_x + d_x } -/// Computes GDIIS error vectors by INVERTING the mean true Hessian. -/// -#[allow(dead_code)] -fn compute_error_vectors_blend( - combined_forces: &[DVector], - true_hessians: &VecDeque>, -) -> Vec> { - let n = combined_forces.len(); - if n == 0 || true_hessians.is_empty() { - return Vec::new(); - } - - // Compute mean of TRUE Hessians: Hm = sum(Hhist) / nX - let mut h_mean = DMatrix::zeros( - true_hessians[0].nrows(), - true_hessians[0].ncols(), - ); - for hess in true_hessians { - h_mean += hess; - } - h_mean /= n as f64; - - // Compute error vectors by solving Hm @ e_i = F_i for each i. - let lu = h_mean.lu(); - combined_forces - .iter() - .map(|f| { - lu.solve(f).unwrap_or_else(|| { - // Fallback if Hessian is singular: return force itself - f.clone() - }) - }) - .collect() -} - /// Builds the GEDIIS B-matrix using the Taylor expansion formula. /// /// # Formula