Expand description
Symmetric Indefinite Factorization (LDL^T / Bunch-Kaufman).
Computes P * A * P^T = L * D * L^T where:
- P is a permutation matrix (encoded in pivot_info)
- L is unit lower triangular
- D is block diagonal with 1x1 and 2x2 blocks
§Algorithm — Bunch-Kaufman Pivoting
At each step, the algorithm decides whether to use a 1x1 or 2x2 pivot by examining the magnitudes of diagonal and off-diagonal elements:
- Let
alpha = (1 + sqrt(17)) / 8(~0.6404). - Find
lambda = max |A[i, k]|for i != k (largest off-diagonal in column k). - If
|A[k,k]| >= alpha * lambda: use 1x1 pivot at position k. - Otherwise, find
sigma = max |A[i, r]|for i != r, where r is the row achieving lambda. - If
|A[k,k]| * sigma >= alpha * lambda^2: use 1x1 pivot. - If
|A[r,r]| >= alpha * sigma: use 1x1 pivot at position r (with swap). - Otherwise: use 2x2 pivot at positions (k, r).
This guarantees bounded element growth in L.
Structs§
- Ldlt
Result - LDL^T factorization result.
Functions§
- ldlt
- Computes the Bunch-Kaufman LDL^T factorization of a symmetric indefinite matrix.
- ldlt_
solve - Solves
A * x = busing the LDL^T factorization.