Eigen  5.0.1
 
Loading...
Searching...
No Matches
Catalogue of dense decompositions

This page presents a catalogue of the dense matrix decompositions offered by Eigen. For an introduction on linear solvers and decompositions, check this page . To get an overview of the true relative speed of the different decompositions, check this benchmark .

Catalogue of decompositions offered by Eigen

Generic information, not Eigen-specific

Eigen-specific

Decomposition Requirements on the matrix Speed Algorithm reliability and accuracy Rank-revealing Allows to compute (besides linear solving) Linear solver provided by Eigen Maturity of Eigen's implementation

Optimizations

PartialPivLU Invertible Fast Good4 - - Yes Excellent

Blocking, Implicit MT

FullPivLU - Slow (no blocking) Good4 Yes Rank, kernel, image Yes Excellent

-

HouseholderQR - Fast Good4 - Orthogonalization, least squares for overdetermined systems Yes (and does least squares) Excellent

Blocking

ColPivHouseholderQR - Fast Good4 Yes Orthogonalization, least squares for overdetermined systems Yes (and does least squares) Excellent

-

RandColPivHouseholderQR - Fast (large matrices) Good4 Yes Orthogonalization, least squares for overdetermined systems Yes (and does least squares) Good

Blocking, randomized pivot selection

FullPivHouseholderQR - Slow (no blocking) Good4 Yes Orthogonalization, least squares for overdetermined systems Yes (and does least squares) Average

-

CompleteOrthogonalDecomposition - Fast Good4 Yes Orthogonalization, minimum-norm least squares, pseudo-inverse Yes (and does least squares) Excellent

-

RandCompleteOrthogonalDecomposition - Fast (large matrices) Good4 Yes Orthogonalization, minimum-norm least squares, pseudo-inverse Yes (and does least squares) Good

Blocking, randomized pivot selection

LLT Positive definite Very fast Good5 - - Yes Excellent

Blocking

LDLT Positive or negative semidefinite1 Very fast Good - - Yes Excellent

-

BunchKaufman Self-adjoint (possibly indefinite) Very fast Good - Inertia Yes Good

Blocking


Singular values and eigenvalues decompositions

BDCSVD (divide & conquer) - One of the fastest SVD algorithms Excellent Yes Singular values/vectors, least squares Yes (and does least squares) Excellent

Blocked bidiagonalization

JacobiSVD (two-sided) - Slow (but fast for small matrices) High relative accuracy3 Yes Singular values/vectors, least squares Yes (and does least squares) Excellent

R-SVD

SelfAdjointEigenSolver Self-adjoint Fast-average2 Good - Eigenvalues/vectors - Excellent

Closed forms for 2x2 and 3x3

TridiagonalEigenSolver Symmetric tridiagonal Fast Good - Eigenvalues/vectors, subsets of the spectrum - Good

Vectorization, Explicit MT

ComplexEigenSolver Square Slow-very slow2 Depends on condition number - Eigenvalues/vectors - Average

-

EigenSolver Square and real Average-slow2 Depends on condition number - Eigenvalues/vectors - Average

-

GeneralizedSelfAdjointEigenSolver Square Fast-average2 Depends on condition number - Generalized eigenvalues/vectors - Good

-

GeneralizedEigenSolver Square and real Slow-very slow2 Depends on condition number - Generalized eigenvalues/vectors - Average

-


Helper decompositions

RealSchur Square and real Average-slow2 Depends on condition number - - - Average

-

ComplexSchur Square Slow-very slow2 Depends on condition number - - - Average

-

RealQZ Square and real (pair of matrices) Average-slow2 Depends on condition number - Generalized eigenvalues of a pencil - Average

-

ComplexQZ Square (pair of matrices) Slow-very slow2 Depends on condition number - Generalized eigenvalues of a pencil - Average

-

Tridiagonalization Self-adjoint Fast Good - - - Good

-

HessenbergDecomposition Square Average Good - - - Good

-

Notes:

Practical guidance

The following recommendations apply to the most common use cases:

Terminology

Selfadjoint
For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for hermitian. More generally, a matrix \( A \) is selfadjoint if and only if it is equal to its adjoint \( A^* \). The adjoint is also called the conjugate transpose.
Positive/negative definite
A selfadjoint matrix \( A \) is positive definite if \( v^* A v > 0 \) for any non zero vector \( v \). In the same vein, it is negative definite if \( v^* A v < 0 \) for any non zero vector \( v \)
Positive/negative semidefinite

A selfadjoint matrix \( A \) is positive semi-definite if \( v^* A v \ge 0 \) for any non zero vector \( v \). In the same vein, it is negative semi-definite if \( v^* A v \le 0 \) for any non zero vector \( v \)

Blocking
Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices.
Implicit Multi Threading (MT)
Means the algorithm can take advantage of multicore processors via OpenMP. "Implicit" means the algorithm itself is not parallelized, but that it relies on parallelized matrix-matrix product routines.
Explicit Multi Threading (MT)
Means the algorithm is explicitly parallelized to take advantage of multicore processors via OpenMP.
Meta-unroller
Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices.