Function slu

Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where

P * A * Q = L * U

Syntax

slu(A, order, threshold);

Parameters

Parameter Type Description
A SparseMatrix A two dimensional sparse matrix for which to get the LU decomposition.
order Number The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic ordering and analisis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. This is appropriatefor LU factorization of unsymmetric matrices. 3 - Symbolic ordering and analisis is performed on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with more than 10*sqr(columns) entries.
threshold Number Partial pivoting threshold (1 for partial pivoting)

Returns

Type Description
Object The lower triangular matrix, the upper triangular matrix and the permutation vectors.

See also

lup, lsolve, usolve, lusolve