SolveLU (FUN)ΒΆ

FUNCTION SolveLU : ResultCode

Solves a system of linear equations A*X = B for X.
The matrix A is modified in-place.

We use an LU-decomposition that is computed using gaussian elimination.
See DecomposeLU.

The solver can be used to efficiently solve the same matrix A for multiple
different values of b: the LU-decomposition is computed once for A and then
used to solve for each column of B in turn.
The result is stored column-wise in X.
InOut:

Scope

Name

Type

Comment

Return

SolveLU

ResultCode

Inout

X

Matrix

The result matrix, must be a n x p matrix

A

Matrix

The matrix to solve, must be a regular n x n matrix

B

Matrix

The right-hand side of the equation, must be a n x p matrix

Input

padiPCol

POINTER TO ARRAY [0..0] OF DINT

The permutation of the columns, pointer to an array of at least n elements.

padZ

POINTER TO ARRAY [0..0] OF LREAL

Pointer to an array with at least n elements