|
NumericAL
A header-only C++20 lexer built on REAL
|
The Schur decomposition A = Z T Zᴴ of a square matrix, as scipy.linalg.schur (LAPACK's dgees/zgees): Z orthogonal (unitary), T upper quasi-triangular for a real A (a complex pair a 2 × 2 block in standard form, its diagonal equal, its off-diagonal of opposite signs), upper triangular for a complex one; T's diagonal (and blocks) holds the eigenvalues. Eigenvalues isolated first by permutations (detail::isolate, dgees's ‘dgebal('P’)), which keepZorthogonal and leave a triangular or block-triangular part no iteration; no diagonal scaling, which would not. \tparam Tdoubleorstd::complex<double>`.
More...
#include <eigen.hpp>
Classes | |
| struct | sorted_form |
| A decomposition and the count its sort moved first. More... | |
Public Member Functions | |
| schur_decomposition (const matrix< T > &input) | |
Decomposes input. | |
| schur_decomposition (matrix< T > &&input) | |
Decomposes input in its own storage, an expiring matrix's elements taken over. | |
| template<typename Select > requires std::predicate<Select&, const std::complex<double>&> | |
| schur_decomposition (const matrix< T > &input, Select select) | |
Decomposes input, then moves the eigenvalues for which select holds to the leading block of T (sort), as scipy.linalg.schur(a, sort=...) (LAPACK's dgees/zgees with a selection). | |
| std::vector< std::complex< double > > | values () const |
The eigenvalues, in T's order: its diagonal, a real 2 × 2 block a conjugate pair, the positive first. | |
| std::size_t | reorder (const std::vector< bool > &chosen) |
Moves the eigenvalues whose entries of chosen (one per eigenvalue, in values's order) are set to the leading block of T, in their order, Z turning with them, as LAPACK's trsen (MATLAB's ordschur): a real conjugate pair moves where either of its two is chosen. A = Z T Zᴴ still holds. | |
| std::size_t | sort (const detail::eigenvalue_selection &select) |
The eigenvalues for which select holds moved to the leading block (reorder), as dgees/zgees sort them: | |
| std::size_t | leading () const noexcept |
The eigenvalues the selecting constructor moved to the leading block (its sdim); 0 otherwise. | |
| const matrix< T > & | t () const &noexcept |
T, upper quasi-triangular (real) or triangular (complex). | |
| matrix< T > | t () && |
T, moved out of an expiring decomposition. | |
| const matrix< T > & | z () const &noexcept |
Z, the Schur vectors as columns. | |
| matrix< T > | z () && |
Z, moved out of an expiring decomposition. | |
Private Member Functions | |
| schur_decomposition (sorted_form form) | |
The decomposition form holds. | |
Static Private Member Functions | |
| static sorted_form | sorted (schur_decomposition s, const detail::eigenvalue_selection &select) |
s sorted by select (sort), taken apart for the constructor that holds the count. | |
Private Attributes | |
| matrix< T > | t_ |
| The Schur form. | |
| matrix< T > | z_ |
| The Schur vectors. | |
| std::size_t | leading_ {0} |
| The eigenvalues the selecting constructor moved first. | |
The Schur decomposition A = Z T Zᴴ of a square matrix, as scipy.linalg.schur (LAPACK's dgees/zgees): Z orthogonal (unitary), T upper quasi-triangular for a real A (a complex pair a 2 × 2 block in standard form, its diagonal equal, its off-diagonal of opposite signs), upper triangular for a complex one; T's diagonal (and blocks) holds the eigenvalues. Eigenvalues isolated first by permutations (detail::isolate, dgees's ‘dgebal('P’)), which keepZorthogonal and leave a triangular or block-triangular part no iteration; no diagonal scaling, which would not. \tparam Tdoubleorstd::complex<double>`.
|
inlineexplicit |
Decomposes input.
| dimension_error | If input is not square. |
| non_finite_error | If an entry is infinite or NaN. |
| convergence_error | If the QR iterations did not converge. |
|
inlineexplicit |
|
inline |
Decomposes input, then moves the eigenvalues for which select holds to the leading block of T (sort), as scipy.linalg.schur(a, sort=...) (LAPACK's dgees/zgees with a selection).
| dimension_error | If input is not square. |
| non_finite_error | If an entry is infinite or NaN. |
| convergence_error | If the QR iterations did not converge, or as sort. |
|
inlineexplicitprivate |
|
inlinenoexcept |
|
inline |
Moves the eigenvalues whose entries of chosen (one per eigenvalue, in values's order) are set to the leading block of T, in their order, Z turning with them, as LAPACK's trsen (MATLAB's ordschur): a real conjugate pair moves where either of its two is chosen. A = Z T Zᴴ still holds.
| dimension_error | If chosen does not hold one entry per eigenvalue. |
| convergence_error | If two blocks were too close to exchange. |
|
inline |
The eigenvalues for which select holds moved to the leading block (reorder), as dgees/zgees sort them:
sdim, a real pair counted twice where either of its two is selected. | convergence_error | If two blocks were too close to exchange, or (real) the rounding of the exchanges left a selected eigenvalue past one not selected, as dgees's info n + 1 and n + 2. |
|
inlinestaticprivate |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
private |
|
private |
|
private |