Encapsulates the eigenvalues and eigenvectors of a symmetric matrix.
More...
#include <rw/lapack/symeig.h>
|
template<class T1 > |
class | RWHermEigDecomp |
|
template<class T1 > |
class | RWHermEigServer |
|
class | RWSymEigServer< TypeT > |
|
template<class TypeT>
class RWSymEigDecomp< TypeT >
The class RWSymEigDecomp encapsulates the eigenvalues and eigenvectors of a symmetric 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 RWSymEigServer for details.
- Synopsis
#include <rw/lapack/symeig.h>
Encapsulates the eigenvalues and eigenvectors of a symmetric matrix.
Definition symeig.h:86
- Example
#include <rw/lapack/symeig.h>
#include <iostream>
int main() {
std::cin >> A;
std::cout << "eigenvalues: " << eig.eigenValues() << std::endl;
std::cout << "eigenvectors: " << eig.eigenVectors() << std::endl;
return 0;
}
Represents a symmetric matrix.
Definition symmat.h:112
◆ RWSymEigDecomp() [1/4]
Default constructor. Builds a decomposition of a 0
x 0
matrix.
◆ RWSymEigDecomp() [2/4]
Copy and precision conversion constructor. Where possible, data is referenced for efficiency.
◆ RWSymEigDecomp() [3/4]
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
◆ RWSymEigDecomp() [4/4]
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
◆ cols()
Returns the number of columns in the decomposed matrix.
◆ eigenValue()
Returns the i th eigenvalue.
◆ eigenValues()
Returns a vector of all computed eigenvalues.
◆ eigenVector()
Returns the i th eigenvector.
◆ eigenVectors()
Returns a matrix whose columns are the eigenvectors.
◆ factor() [1/2]
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.
◆ factor() [2/2]
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.
◆ fail()
Returns true
if an eigenvalue or eigenvector that is supposed to be computed fails to be computed.
◆ good()
Returns true
if all desired eigenvalues and eigenvectors are successfully computed to full desired accuracy.
◆ inaccurate()
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.
◆ numEigenValues()
Returns the number of eigenvalues in this object.
◆ numEigenVectors()
Returns the number of eigenvectors in this object.
◆ operator=()
Assigns this decomposition the passed value. The current contents of the decomposition are lost.
◆ rows()
Returns the number of rows in the decomposed matrix.