feat(internal): add Cholesky factorization helper for SPD matrices

Hand-rolled `A = L · L^T` factorization plus forward/backward triangular
solves, used by the upcoming Bayesian Optimization implementation for
the GP posterior. Same f64 row-major Vec<Vec<f64>> interface as the
existing Jacobi eigen helper so we don't pull in nalgebra for one
algorithm.

Returns Err on non-positive-definite input (a small jitter is the
typical caller-side fix). Tested against the standard 2x2 case, the
3x3 known-result case, A·x = b round-trip, and the SPD-failure case.
This commit is contained in:
2026-05-05 09:51:12 -06:00
parent 60b17f58c9
commit 284f1143de
2 changed files with 138 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
//! Internal helpers used by built-in algorithms but not part of the public API.
pub(crate) mod cholesky;
pub(crate) mod eigen;