Main       Commercial support       FAQ       Forum       Contact Us

QR and LQ decompositions

QR decomposition is a best known decomposition from a whole family of orthogonal factorizations, which includes QR, LQ, RQ and QL decompositions. Here Q denotes orthogonal matrix, R and L denote upper and lower triangular matrices. ALGLIB package contains implementations of two most popular decompositions: QR and LQ. These decompositions may be used to solve full rank least squares problem, as preliminary step in the construction of the SVD decomposition, or for other tasks. QL and RQ decompositions are less popular and they are not implemented in the ALGLIB.

Contents

    Aglorithm
    Performance
    Subroutines
    Manual entries

Aglorithm

QR(LQ) decomposition is implemented in LAPACK-similar manner:

Performance

Unlike triangular factorization algorithms (LU, Cholesky), QR/LQ are not implemented in cache oblivious manner. Nevertheless, ALGLIB implementation of QR/LQ is still efficient enough without CPU-specific tuning. Algorithm makes use of ALGLIB BLAS, mostly of rank-k updates.

From performance point of view matrices being factorized may be divided into two classes:

Subroutines

ALGLIB package contains both real and complex QR(LQ) decomposition subroutines. Real subroutines are listed below:

Complex versions of subroutines have similar names:

Manual entries

C++ ortfac.h   
C# ortfac.cs   
MPFR ortfac.h   
Delphi ortfac.pas   
FreePascal ortfac.pas   
VBA ortfac.bas   

This article is intended for personal use only.

Download ALGLIB

C#

C# source.

Downloads page

 

C++

C++ source.

Downloads page

 

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.

Downloads page

 

FreePascal

FreePascal source.

Downloads page

 

Delphi

Delphi source.

Downloads page

 

Visual Basic

VBA source.

Downloads page

 

 

ALGLIB project, 1999-2010