|
noexcept |
Performs an in-place LUP decomposition of a square column-major matrix with the L and U components packed to a single square matrix and writes the permutation of LU expressed as an array of column indices.
ValueType | A type of a matrix element. |
[in,out] | column_matrix | A pointer to a buffer which on input contains the square matrix, of n by n elements, to decompose. On output the buffer holds the LU-decomposition such that lower-left triangular part, including the main diagonal, holds elements of the L component of decomposition, and the upper-right part holds the U component with the main diagonal elements always equal to ValueType(1) and as such not stored explicitly. Both input and output matrix values are represented by a column-major two-dimensional array of ValueType elements. |
n | A number of columns and a number of rows of the matrix. | |
[out] | P | A pointer to a one-dimensional array of indices of columns of the product of the L and U components rearranged as a result of permutation. One can reconstruct the permutation matrix from this array using set_permutation_scaling_matrix or construct_permutation_scaling_matrix. |
To construct this packed form of the decomposition to a different buffer, use either decompose_lup_construct, if the destination buffer is not initialized, or decompose_lup_copy, if the destination buffer already contains valid values of the type ValueType
.
To decompose a square matrix in place, use decompose_lup_inplace.
To obtain the decomposition components in an explicit matrix form or to decompose a rectangular matrix, use decompose_lup_explicit_copy or decompose_lup_explicit_construct.