3 /** \eigenManualPage TopicLinearAlgebraDecompositions Catalogue of dense decompositions
5 This page presents a catalogue of the dense matrix decompositions offered by Eigen.
6 For an introduction on linear solvers and decompositions, check this \link TutorialLinearAlgebra page \endlink.
8 \section TopicLinAlgBigTable Catalogue of decompositions offered by Eigen
10 <table class="manual-vl">
12 <th class="meta"></th>
13 <th class="meta" colspan="5">Generic information, not Eigen-specific</th>
14 <th class="meta" colspan="3">Eigen-specific</th>
18 <th>Decomposition</th>
19 <th>Requirements on the matrix</th>
21 <th>Algorithm reliability and accuracy</th>
22 <th>Rank-revealing</th>
23 <th>Allows to compute (besides linear solving)</th>
24 <th>Linear solver provided by Eigen</th>
25 <th>Maturity of Eigen's implementation</th>
26 <th>Optimizations</th>
33 <td>Depends on condition number</td>
38 <td>Blocking, Implicit MT</td>
54 <td>HouseholderQR</td>
57 <td>Depends on condition number</td>
59 <td>Orthogonalization</td>
66 <td>ColPivHouseholderQR</td>
71 <td>Orthogonalization</td>
74 <td><em>Soon: blocking</em></td>
78 <td>FullPivHouseholderQR</td>
83 <td>Orthogonalization</td>
91 <td>Positive definite</td>
93 <td>Depends on condition number</td>
103 <td>Positive or negative semidefinite<sup><a href="#note1">1</a></sup></td>
110 <td><em>Soon: blocking</em></td>
113 <tr><th class="inter" colspan="9">\n Singular values and eigenvalues decompositions</th></tr>
116 <td>JacobiSVD (two-sided)</td>
118 <td>Slow (but fast for small matrices)</td>
119 <td>Excellent-Proven<sup><a href="#note3">3</a></sup></td>
121 <td>Singular values/vectors, least squares</td>
122 <td>Yes (and does least squares)</td>
128 <td>SelfAdjointEigenSolver</td>
129 <td>Self-adjoint</td>
130 <td>Fast-average<sup><a href="#note2">2</a></sup></td>
133 <td>Eigenvalues/vectors</td>
136 <td><em>Closed forms for 2x2 and 3x3</em></td>
140 <td>ComplexEigenSolver</td>
142 <td>Slow-very slow<sup><a href="#note2">2</a></sup></td>
143 <td>Depends on condition number</td>
145 <td>Eigenvalues/vectors</td>
153 <td>Square and real</td>
154 <td>Average-slow<sup><a href="#note2">2</a></sup></td>
155 <td>Depends on condition number</td>
157 <td>Eigenvalues/vectors</td>
164 <td>GeneralizedSelfAdjointEigenSolver</td>
166 <td>Fast-average<sup><a href="#note2">2</a></sup></td>
167 <td>Depends on condition number</td>
169 <td>Generalized eigenvalues/vectors</td>
175 <tr><th class="inter" colspan="9">\n Helper decompositions</th></tr>
179 <td>Square and real</td>
180 <td>Average-slow<sup><a href="#note2">2</a></sup></td>
181 <td>Depends on condition number</td>
190 <td>ComplexSchur</td>
192 <td>Slow-very slow<sup><a href="#note2">2</a></sup></td>
193 <td>Depends on condition number</td>
202 <td>Tridiagonalization</td>
203 <td>Self-adjoint</td>
210 <td><em>Soon: blocking</em></td>
214 <td>HessenbergDecomposition</td>
222 <td><em>Soon: blocking</em></td>
229 <li><a name="note1">\b 1: </a>There exist two variants of the LDLT algorithm. Eigen's one produces a pure diagonal D matrix, and therefore it cannot handle indefinite matrices, unlike Lapack's one which produces a block diagonal D matrix.</li>
230 <li><a name="note2">\b 2: </a>Eigenvalues, SVD and Schur decompositions rely on iterative algorithms. Their convergence speed depends on how well the eigenvalues are separated.</li>
231 <li><a name="note3">\b 3: </a>Our JacobiSVD is two-sided, making for proven and optimal precision for square matrices. For non-square matrices, we have to use a QR preconditioner first. The default choice, ColPivHouseholderQR, is already very reliable, but if you want it to be proven, use FullPivHouseholderQR instead.
234 \section TopicLinAlgTerminology Terminology
237 <dt><b>Selfadjoint</b></dt>
238 <dd>For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for \em hermitian.
239 More generally, a matrix \f$ A \f$ is selfadjoint if and only if it is equal to its adjoint \f$ A^* \f$. The adjoint is also called the \em conjugate \em transpose. </dd>
240 <dt><b>Positive/negative definite</b></dt>
241 <dd>A selfadjoint matrix \f$ A \f$ is positive definite if \f$ v^* A v > 0 \f$ for any non zero vector \f$ v \f$.
242 In the same vein, it is negative definite if \f$ v^* A v < 0 \f$ for any non zero vector \f$ v \f$ </dd>
243 <dt><b>Positive/negative semidefinite</b></dt>
244 <dd>A selfadjoint matrix \f$ A \f$ is positive semi-definite if \f$ v^* A v \ge 0 \f$ for any non zero vector \f$ v \f$.
245 In the same vein, it is negative semi-definite if \f$ v^* A v \le 0 \f$ for any non zero vector \f$ v \f$ </dd>
247 <dt><b>Blocking</b></dt>
248 <dd>Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices.</dd>
249 <dt><b>Implicit Multi Threading (MT)</b></dt>
250 <dd>Means the algorithm can take advantage of multicore processors via OpenMP. "Implicit" means the algortihm itself is not parallelized, but that it relies on parallelized matrix-matrix product rountines.</dd>
251 <dt><b>Explicit Multi Threading (MT)</b></dt>
252 <dd>Means the algorithm is explicitely parallelized to take advantage of multicore processors via OpenMP.</dd>
253 <dt><b>Meta-unroller</b></dt>
254 <dd>Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices.</dd>