num::lu_result¶
Defined in header <linear/factorization/lu.hpp>
template <std::floating_point T>
struct lu_result;
The factorization \(PA = LU\), in precision T.
Both factors share the matrix LU, the layout LAPACK getrf returns: \(U\) on and above the diagonal, \(L\) strictly below it. \(L\) has a unit diagonal, which is not stored. lower() and upper() copy the two factors out.
\(P\) is stored as the row swaps that built it: step k exchanged rows k and swaps[k]. swaps is empty when the factorization did not pivot, so \(P = I\).
Members¶
| member | description |
|---|---|
mat<T> LU |
|
array<idx> swaps |
|
bool singular = false |
True when a pivot fell below tolerance. |
idx size() const |