pub fn characteristic_polynomial(
n: usize,
data: &[f64],
) -> Result<Vec<f64>, SolversError>Expand description
Characteristic polynomial of a row-major n×n matrix via the Faddeev–LeVerrier
algorithm. Returns DESCENDING coefficients [1, c₁, …, cₙ] of
p(λ) = λⁿ + c₁λⁿ⁻¹ + … + cₙ (so det(A) = (-1)ⁿ·cₙ). Exact for integer matrices;
for large/ill-conditioned matrices prefer an iterative eigensolver.