Module linalg

Source
Expand description

Dense linear algebra for small and medium systems.

  • Lu: Gaussian elimination with partial pivoting, for square systems (OCCT math_Gauss).
  • Cholesky: L L^T for symmetric positive definite systems, such as normal equations and fairing energies (OCCT math_Crout covers the symmetric case there).
  • Qr: Householder QR with column pivoting, for linear least squares and rank detection (OCCT math_Householder, LAPACK xGEQP3).
  • constrained_least_squares: least squares subject to linear equality constraints, by the null-space method (Golub and Van Loan, Matrix Computations, 6.2).

Every solve reports a condition estimate (Hager’s 1-norm estimator as refined by Higham, LAPACK xLACON) and a relative forward error estimate derived from it. Singular and rank-deficient systems are refused by name rather than solved into infinities.

Structs§

Cholesky
A = L L^T for a symmetric positive definite matrix.
ConstrainedSolution
The solution of an equality-constrained least-squares problem.
LeastSquaresSolution
The solution of a linear least-squares problem.
LinearSolution
The solution of a square linear system.
Lu
P A = L U with partial pivoting.
Matrix
A dense row-major matrix of f64.
Qr
Householder QR with column pivoting: A P = Q R.

Functions§

constrained_least_squares
Minimise ||A x - b||_2 subject to C x = d by the null-space method.
least_squares
Minimise ||A x - b||_2: a convenience for Qr::new followed by Qr::solve_least_squares. Factor once with Qr when several right-hand sides share A (one per coordinate when fitting points).