Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE

LDLT decomposition

LDLT-decomposition is a generalization of for symmetric matrices which are not positive definite. As opposed to Cholesky decomposition, which exists only for symmetric positive definite matrices, LDLT-decomposition exists for each symmetric matrix.

LDLT-decomposition of the matrix A is a decomposition of the form A = L·D·L ·T or A = U·D·U ·T. There are two differences compared to Cholesky decomposition. First, matrix D is used. D is a block-diagonal matrix with blocks 1x1 or 2x2. Secondly, the matrices L and U are not triangular matrices, but products of triangular matrices and permutation matrices:

L = PL·...·PL·... U = PL·...·PL·...

Here v is a column. Its width s is equal to the width of the diagonal block number k in matrix D (1 or 2), its height is equal to k-s for matrix U, n-k-s+1 for matrix L.

We can see that the LDLT-decomposition structure is much more complex than the structure of Cholesky decomposition or LU-decomposition, but this decomposition allows to factorize any symmetric matrix (as opposed to Cholesky decomposition) and it is faster than more general LU-decomposition. It should be noted that the LDLT-decomposition is faster than the LU-decomposition but slower than the Cholesky decomposition, so it is recommended to use the latter whenever possible.

Subroutine description

The matrix decomposition is performed by subroutine SMatrixLDLT, which gets the upper or lower triangle of matrix A as an input and replaces it with matrices L and D which are stored in compact form (it is described in the program's comments).

Algorithms of matrix inversion and solving systems of linear equations work with matrices in compact form and don't use matrices L and U, so there is no subroutine to "unpack" them. A detailed description of the structure of matrices L and U can be found in the program's comments, so, if necessary, you can unpack these matrices on your own.

This algorithm is transferred from the LAPACK library.

Report a bug

Source codes

C#

C# 1.0 source.
ldlt.csharp.zip - LDLT decomposition


C++

C++ source.
ldlt.cpp.zip - LDLT decomposition
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)


C++, multiple precision arithmetic

C++ source. MPFR/GMP is used.
GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.
ldlt.mpfr.zip - LDLT decomposition
mpfr.zip - precompiled Win32 MPFR/GMP binaries


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
ldlt.delphi.zip - LDLT decomposition


Visual Basic 6

Visual Basic 6 source.
ldlt.vb6.zip - LDLT decomposition


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
ldlt.zonnon.zip - LDLT decomposition



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008