Eigenvalue Decomposition. More...
#include <FgEigenvalueDecomposition.h>
Public Member Functions | |
EigenvalueDecomposition (af::array &A) | |
Constructor. More... | |
~EigenvalueDecomposition () | |
Destructor. More... | |
void | Compute (af::array &A) |
Computes the eigenvalues and -vectors in decending order More... | |
af::array | Eigenvalues () |
Gets the eigenvalues in decending order. More... | |
af::array | Eigenvectors () |
Gets the corresponding eigenvectors. More... | |
Private Member Functions | |
void | compute () |
void | orthes () |
Nonsymmetric reduction to Hessenberg form. More... | |
void | hqr2 () |
Nonsymmetric reduction from Hessenberg to real Schur form. More... | |
void | cdiv (double xr, double xi, double yr, double yi) |
template<typename _Tp > | |
_Tp * | alloc_1d (int m) |
template<typename _Tp > | |
_Tp * | alloc_1d (int m, _Tp val) |
template<typename _Tp > | |
_Tp ** | alloc_2d (int m, int n) |
template<typename _Tp > | |
_Tp ** | alloc_2d (int m, int n, _Tp val) |
Private Attributes | |
int | n |
double | cdivr |
double | cdivi |
double * | d |
double * | e |
double * | ort |
double ** | V |
double ** | H |
af::array | fV |
af::array | fd |
Eigenvalue Decomposition.
<note> In linear algebra, eigendecomposition or sometimes spectral decomposition is the factorization of a matrix into a canonical form, whereby the matrix is represented in terms of its eigenvalues and eigenvectors. Only diagonalizable matrices can be factorized in this way. </note>
Hmetal T, 08.03.2017.
Definition at line 35 of file FgEigenvalueDecomposition.h.
NeuralEngine::MachineLearning::EigenvalueDecomposition::EigenvalueDecomposition | ( | af::array & | A | ) |
Constructor.
Hmetal T, 14.04.2017.
A | [in,out] Positive definit matrix. |
NeuralEngine::MachineLearning::EigenvalueDecomposition::~EigenvalueDecomposition | ( | ) |
Destructor.
Hmetal T, 14.04.2017.
void NeuralEngine::MachineLearning::EigenvalueDecomposition::Compute | ( | af::array & | A | ) |
Computes the eigenvalues and -vectors in decending order
<note> Let A be a square (N×N) matrix with N linearly independent eigenvectors, q_i ( i = 1 , … , N ). Then A can be factorized as
A = Q Λ Q^(− 1)
where Q is the square(N×N) matrix whose ith column is the eigenvector q_i of A and Λ is the diagonal matrix whose diagonal elements are the corresponding eigenvalues, i.e., Λ_(i i) = λ_i. Note that only diagonalizable matrices can be factorized in this way. </note>
Hmetal T, 08.03.2017.
A | [in,out] Positiv semidefinit input matrix. |
outEigvec | [in,out] Corresponding eigenvectors. |
af::array NeuralEngine::MachineLearning::EigenvalueDecomposition::Eigenvalues | ( | ) |
Gets the eigenvalues in decending order.
Hmetal T, 14.04.2017.
af::array NeuralEngine::MachineLearning::EigenvalueDecomposition::Eigenvectors | ( | ) |
Gets the corresponding eigenvectors.
Hmetal T, 14.04.2017.
|
private |
Nonsymmetric reduction to Hessenberg form.
This is derived from the Algol procedures orthes and ortran, by Martin and Wilkinson, Handbook for Auto. Comp., Vol.ii-Linear Algebra, and the corresponding Fortran subroutines in EISPACK.
|
private |
Nonsymmetric reduction from Hessenberg to real Schur form.
This is derived from the Algol procedure hqr2, by Martin and Wilkinson, Handbook for Auto. Comp., Vol.ii-Linear Algebra, and the corresponding Fortran subroutine in EISPACK.
|
inlineprivate |
Definition at line 134 of file FgEigenvalueDecomposition.h.
|
inlineprivate |
Definition at line 140 of file FgEigenvalueDecomposition.h.
|
inlineprivate |
Definition at line 149 of file FgEigenvalueDecomposition.h.
|
inlineprivate |
Definition at line 158 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 125 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 126 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 126 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 128 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 128 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 128 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 129 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 129 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 131 of file FgEigenvalueDecomposition.h.
|
private |
Definition at line 131 of file FgEigenvalueDecomposition.h.