DecomposeLU (FUN)¶
FUNCTION DecomposeLU : ResultCode
This function computes the LU-decomposition of a quadratic matrix A,
which is updated in-place.
The lower triangular matrix L and the upper triangular matrix R are stored
in A’, the updated A. The column permutation Q is stored in padiPCol^.
After successful completion the condition
A * Q = L * R
holds.
Note 1: this function is used for solving systems of linear equations A*x = b,
for inverting matrices, and for the computation of the determinant.
Note 2: the pivot strategy is to select the column that has the element with the
greatest absolute value for the given row.
- InOut:
Scope
Name
Type
Comment
Return
DecomposeLU
Inout
A
The input matrix, must be quadratic. The input is updated in-place.
Input
padiPCol
POINTER TO ARRAY [0..0] OF DINT
The permutation of the columns, pointer to an array of at least A.nRows elements.
Output
diSign
DINT
The sign of the permutation, equal to (-1)^np where np is the number of columns swaps