Encapsulates the eigenvalues and eigenvectors of a nonsymmetric matrix.
More...
#include <rw/lapack/eig.h>
template<class TypeT>
class RWEigDecomp< TypeT >
The class RWEigDecomp encapsulates the eigenvalues and eigenvectors of a nonsymmetric 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 RWEigServer in this manual for details.
- Synopsis
#include <rw/lapack/eig.h>
- Example
#include <iostream>
#include <rw/lapack/eig.h>
int main()
{
std::cin >> A;
std::cout << "eigenvalues: " << eig.eigenValues() <<
std::endl;
std::cout << "left eigenvectors: " << eig.leftEigenVectors()
<< std::endl;
std::cout << "right vectors: " << eig.rightEigenVectors() << endl;
return 0;
}
Default constructor. Builds a decomposition of a 0 x 0 matrix.
Copy constructor. Where possible, data is referenced for efficiency.
template<class TypeT>
template<class TypeU >
precision conversion constructor. Where possible, data is referenced for efficiency.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter computeVecs controls whether eigenvectors are computed.
Returns the number of columns in the decomposed matrix.
Returns the ith eigenvalue.
Returns a vector of all computed eigenvalues.
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter computeVecs 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 ith left eigenvector.
Returns a vector of all computed left eigenvectors.
template<class TypeT>
unsigned RWEigDecomp< TypeT >::numEigenValues |
( |
| ) |
const |
|
inline |
Returns the number of eigenvalues or eigenvectors represented in this object.
template<class TypeT>
unsigned RWEigDecomp< TypeT >::numLeftEigenVectors |
( |
| ) |
const |
|
inline |
Returns the number of eigenvalues or eigenvectors represented in this object.
template<class TypeT>
unsigned RWEigDecomp< TypeT >::numRightEigenVectors |
( |
| ) |
const |
|
inline |
Returns the number of eigenvalues or eigenvectors represented in this object.
Assigns the passed value to this decomposition. The current contents of the decomposition are lost.
Returns the ith right eigenvector.
Returns a matrix of all computed right eigenvectors.
Returns the number of rows in the decomposed matrix.