Skip to main content

inverse

Function inverse 

pub(crate) fn inverse(matrix: &[Vec<f64>]) -> Option<Vec<Vec<f64>>>
Expand description

The inverse of a square matrix by Gauss-Jordan elimination with partial pivoting, or None when it is singular to working precision.

Shared by the calibration ladder — which inverts ∂q/∂z to state a curve’s par Jacobian — and by the least-squares step below, which inverts the damped normal equations. One copy, because a pivot threshold that drifted between two copies would be a difference nobody would look for.