Performs an LUP decomposition of a column-major matrix and copy-assigns the three results to three separate buffers.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in] | column_matrix | A pointer to the matrix to decompose. The matrix is represented by a column-major two-dimensional array of ValueType elements. |
| columns | A number of columns in the matrix to decompose. |
| rows | A number of rows in the matrix to decompose. |
[in,out] | L | A buffer of columns by rows elements which accept the lower-triangular component of the decomposition. |
[in,out] | U | A pointer to a square matrix of columns by columns elements which the upper-triangular component of the decomposition is assigned to. The main diagonal of the U component always contains multiplicative identities, ValueType(1) , on output. |
[in,out] | P | A pointer to a square matrix of columns by columns elements, which the permutation matrix is assigned to. |
- Returns
- Properties of the LUP-decomposition defined as a bitmask of the LU_status enumeration type. If the result signals singularity, then only the
L
component will be singular. Neither the upper, U
, component not the permutation matrix will be singular.
The resulting matrices, L
, U
and P
, are assigned to, rather than constructed in, buffers pointed to by, respectively, L
, U
and P
. Therefore, elements of those matrices must be valid prior to the invocation of decompose_lup_explicit_copy
. To assign decomposition to uninitialized buffers, use decompose_lup_explicit_construct.
The function assumes the following preconditions are met:
Rows(L) == Rows(column_matrix)
;
Columns(L) == Rows(U) == Columns(U) == Rows(P) == Columns(P) == Columns(column_matrix)
, where Rows(X)
and Columns(X)
are respectively the numbers of rows and columns the matrix/buffer X
holds/capable of holding. - See also
- decompose_lup_copy, decompose_lup_inplace.