Eigen
3.4.90 (git rev 9297aae66fd4c13230769c66702c88cde9f355a0)
|
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 .
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 | Depends on condition number | - | - | Yes | Excellent | Blocking, Implicit MT |
FullPivLU | - | Slow | Proven | Yes | - | Yes | Excellent | - |
HouseholderQR | - | Fast | Depends on condition number | - | Orthogonalization | Yes | Excellent | Blocking |
ColPivHouseholderQR | - | Fast | Good | Yes | Orthogonalization | Yes | Excellent | - |
FullPivHouseholderQR | - | Slow | Proven | Yes | Orthogonalization | Yes | Average | - |
CompleteOrthogonalDecomposition | - | Fast | Good | Yes | Orthogonalization | Yes | Excellent | - |
LLT | Positive definite | Very fast | Depends on condition number | - | - | Yes | Excellent | Blocking |
LDLT | Positive or negative semidefinite1 | Very fast | Good | - | - | Yes | Excellent | Soon: blocking |
| ||||||||
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) | Proven3 | Yes | Singular values/vectors, least squares | Yes (and does least squares) | Excellent | R-SVD |
SelfAdjointEigenSolver | Self-adjoint | Fast-average2 | Good | Yes | Eigenvalues/vectors | - | Excellent | Closed forms for 2x2 and 3x3 |
ComplexEigenSolver | Square | Slow-very slow2 | Depends on condition number | Yes | Eigenvalues/vectors | - | Average | - |
EigenSolver | Square and real | Average-slow2 | Depends on condition number | Yes | Eigenvalues/vectors | - | Average | - |
GeneralizedSelfAdjointEigenSolver | Square | Fast-average2 | Depends on condition number | - | Generalized eigenvalues/vectors | - | Good | - |
| ||||||||
RealSchur | Square and real | Average-slow2 | Depends on condition number | Yes | - | - | Average | - |
ComplexSchur | Square | Slow-very slow2 | Depends on condition number | Yes | - | - | Average | - |
Tridiagonalization | Self-adjoint | Fast | Good | - | - | - | Good | Soon: blocking |
HessenbergDecomposition | Square | Average | Good | - | - | - | Good | Soon: blocking |
Notes:
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 \)