Encapsulates the eigenvalues and eigenvectors of a Hermitian matrix.
More...
#include <rw/lapack/hermeig.h>
template<class TypeT>
class RWHermEigDecomp< TypeT >
The class RWHermEigDecomp encapsulates the eigenvalues and eigenvectors of a Hermitian matrix. You can construct an eigenvalue decomposition object in two ways:
- Use the decomposition class constructor. This has the advantage of simplicity, but allows only limited control over the computation. Your only choice is whether or not to compute eigenvectors.
- Use an eigenvalue server object. This gives you more precise control over the computation. See RWHermEigServer for details.
- Synopsis
#include <rw/lapack/hermeig.h>
- Example
#include <iostream>
#include <rw/lapack/hermeig.h>
int main()
{
std::cin >> A;
std::cout <<
"eigenvalues: " << eig.
eigenValues() << std::endl;
std::cout << "eigenvectors: " << eig.eigenVectors() << std::endl;
return 0;
}
Default constructor. Builds a decomposition of a 0
x 0
matrix.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
Creates a copy of the passed value.
Returns the number of columns in the decomposed matrix.
Returns the i th eigenvalue.
Returns a vector of all computed eigenvalues.
Returns the i th eigenvector.
Returns a matrix whose columns are the eigenvectors.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed. The current contents of the decomposition are lost.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed. The current contents of the decomposition are lost.
Returns true
if an eigenvalue or eigenvector that is supposed to be computed fails to be computed.
Returns true
if all desired eigenvalues and eigenvectors are successfully computed to full desired accuracy.
Returns true
if either an eigenvalue or eigenvector that is supposed to be computed fails to be computed, or some of the computed quantities are not computed to full desired accuracy.
Returns the number of eigenvalues in this object.
Returns the number of eigenvectors in this object.
Assigns this decomposition the passed value. The current contents of the decomposition are lost.
Returns the number of rows in the decomposed matrix.