|
NumericAL
A header-only C++20 lexer built on REAL
|
The eigenvalues and eigenvectors of a complex Hermitian matrix. More...
#include <decomposition.hpp>
Public Member Functions | |
| hermitian_eigen (const matrix< std::complex< double > > &input, eigen_method method=eigen_method::divide_and_conquer) | |
Diagonalises input. | |
| const vector< double > & | values () const noexcept |
| The eigenvalues, ascending. | |
| const matrix< std::complex< double > > & | vectors () const &noexcept |
| The eigenvectors as columns, ordered to match values. | |
| matrix< std::complex< double > > | vectors () && |
| The eigenvectors, moved out of an expiring decomposition. | |
Private Attributes | |
| std::size_t | n_ |
| The matrix order. | |
| vector< double > | values_ |
| Eigenvalues, ascending. | |
| matrix< std::complex< double > > | vectors_ |
| Eigenvectors as columns. | |
The eigenvalues and eigenvectors of a complex Hermitian matrix.
The matrix is reduced to a real symmetric tridiagonal by Householder reflections and unit phases (the method of LAPACK's zheevd), which the divide and conquer of symmetric_eigen diagonalises (implicit QL, zheev's, on request). The eigenvalues are real and returned in ascending order, with vectors j-th column the eigenvector of values [j] (A = V Λ Vᴴ, V unitary). Only the lower triangle is read and the imaginary part of the diagonal is ignored, as numpy.linalg.eigh reads a matrix by default.
Definition at line 4536 of file decomposition.hpp.
|
inlineexplicit |
Diagonalises input.
| [in] | input | A complex Hermitian matrix (its lower triangle is read). |
| [in] | method | The algorithm for the tridiagonal: eigen_method::divide_and_conquer or eigen_method::tridiagonal_ql. |
| std::invalid_argument | If method is eigen_method::jacobi, which has no complex form here. |
| dimension_error | If input is not square. |
| non_finite_error | If an entry is infinite or NaN. |
| convergence_error | If an iteration (implicit QL or the secular equation) did not converge within its bound (not observed). |
Definition at line 4551 of file decomposition.hpp.
The eigenvalues, ascending.
Definition at line 4604 of file decomposition.hpp.
The eigenvectors, moved out of an expiring decomposition.
Definition at line 4616 of file decomposition.hpp.
|
inlinenoexcept |
The eigenvectors as columns, ordered to match values.
Definition at line 4610 of file decomposition.hpp.
|
private |
The matrix order.
Definition at line 4623 of file decomposition.hpp.
Eigenvalues, ascending.
Definition at line 4624 of file decomposition.hpp.
Eigenvectors as columns.
Definition at line 4625 of file decomposition.hpp.