|
akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
|
Computes eigenvalues and eigenvectors satisfying A V = V diag(lambda). More...
#include <eig_decomp.hpp>
Public Types | |
| using | T = matrix_scalar_t< Mat > |
| using | Real = real_type_t< T > |
| using | Complex = std::conditional_t< linalg::Complex< T >, T, std::complex< Real > > |
Public Member Functions | |
| constexpr | EigenDecomposition (const Mat &A) |
| Compute eigenvalues and eigenvectors using the nominal configuration. | |
| constexpr | EigenDecomposition (const Mat &A, const config::FactorConfig< Real > &config_in) |
| Compute eigenvalues and eigenvectors with explicit settings. | |
| constexpr auto | spectral_radius () const |
| Select the eigenvalue whose magnitude is the spectral radius. | |
Static Public Member Functions | |
| static constexpr config::FactorConfig< Real > | default_config () |
| Construct the nominal shifted-QR configuration. | |
Public Attributes | |
| Vector< Complex, N > | lambda |
| eigendecomposition member variables | |
| Matrix< Complex, N, N > | V |
| eigenvectors | |
| bool | converged {false} |
| eigenvalue convergence flag | |
Static Public Attributes | |
| static constexpr std::size_t | N = mat_rows_v<Mat> |
Computes eigenvalues and eigenvectors satisfying A V = V diag(lambda).
Reduces A to Hessenberg form, applies shifted QR to obtain Schur form, then recovers eigenvectors in the original coordinates. Hermitian matrices use the accumulated orthonormal basis directly.
| Mat | Square real or complex matrix type. |
Definition at line 27 of file eig_decomp.hpp.
| using linalg::EigenDecomposition< Mat >::Complex = std::conditional_t<linalg::Complex<T>, T, std::complex<Real> > |
Definition at line 33 of file eig_decomp.hpp.
| using linalg::EigenDecomposition< Mat >::Real = real_type_t<T> |
Definition at line 32 of file eig_decomp.hpp.
| using linalg::EigenDecomposition< Mat >::T = matrix_scalar_t<Mat> |
Definition at line 29 of file eig_decomp.hpp.
|
inlineexplicitconstexpr |
Compute eigenvalues and eigenvectors using the nominal configuration.
| [in] | A | Square input matrix. |
Definition at line 55 of file eig_decomp.hpp.
References linalg::mat_rows_v.
|
inlineexplicitconstexpr |
Compute eigenvalues and eigenvectors with explicit settings.
| [in] | A | Square input matrix. |
| [in] | config_in | Iteration budget, relative deflation tolerance, and normalization floor. |
Definition at line 64 of file eig_decomp.hpp.
References linalg::mat_rows_v.
|
inlinestaticconstexpr |
Construct the nominal shifted-QR configuration.
Definition at line 43 of file eig_decomp.hpp.
References config::FactorConfig< T >::steps.
|
inlineconstexpr |
Select the eigenvalue whose magnitude is the spectral radius.
Definition at line 76 of file eig_decomp.hpp.
References linalg::constexpr_sqrt_safe(), linalg::EigenDecomposition< Mat >::lambda, linalg::mat_rows_v, and linalg::EigenDecomposition< Mat >::N.
| bool linalg::EigenDecomposition< Mat >::converged {false} |
eigenvalue convergence flag
Definition at line 92 of file eig_decomp.hpp.
| Vector<Complex, N> linalg::EigenDecomposition< Mat >::lambda |
eigendecomposition member variables
eigenvalues
Definition at line 90 of file eig_decomp.hpp.
Referenced by linalg::EigenDecomposition< Mat >::spectral_radius().
|
staticconstexpr |
Definition at line 35 of file eig_decomp.hpp.
Referenced by linalg::EigenDecomposition< Mat >::spectral_radius().
| Matrix<Complex, N, N> linalg::EigenDecomposition< Mat >::V |
eigenvectors
Definition at line 91 of file eig_decomp.hpp.