fn spd_inverse(a: &[f64], n: usize) -> Vec<f64>
Inverse of an SPD matrix (row-major in, row-major out) via Cholesky.