SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates the eigenvalues and eigenvectors of a nonsymmetric matrix. More...
#include <rw/lapack/eig.h>
Public Member Functions | |
RWEigDecomp () | |
RWEigDecomp (const RWEigDecomp< double > &A) | |
RWEigDecomp (const RWGenMat< TypeT > &A, bool computeVecs=true) | |
void | factor (const RWGenMat< TypeT > &A, bool computeVecs=true) |
void | operator= (const RWEigDecomp< TypeT > &) |
unsigned | cols () const |
DComplex | eigenValue (int i) const |
const RWMathVec< DComplex > | eigenValues () const |
const RWMathVec< DComplex > | leftEigenVector (int i) const |
const RWGenMat< DComplex > | leftEigenVectors () const |
const RWMathVec< DComplex > | rightEigenVector (int i) const |
const RWGenMat< DComplex > | rightEigenVectors () const |
bool | good () const |
bool | inaccurate () const |
bool | fail () const |
unsigned | numEigenValues () const |
unsigned | numLeftEigenVectors () const |
unsigned | numRightEigenVectors () const |
unsigned | rows () const |
The class RWEigDecomp<T> encapsulates the eigenvalues and eigenvectors of a nonsymmetric matrix. You can construct an eigenvalue decomposition object in two ways:
#include <rw/lapack/eig.h> RWEigDecomp<double> eig(A); // A is an // RWGenMat<double>
#include <iostream> #include <rw/lapack/eig.h> int main() { RWGenMat<double> A; std::cin >> A; RWEigDecomp<double> eig(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; }
RWEigDecomp< TypeT >::RWEigDecomp | ( | ) |
Default constructor. Builds a decomposition of a 0 x 0 matrix.
RWEigDecomp< TypeT >::RWEigDecomp | ( | const RWEigDecomp< double > & | A | ) |
Copy and precision conversion constructors. Where possible, data is referenced for efficiency.
RWEigDecomp< TypeT >::RWEigDecomp | ( | const RWGenMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter computeVecs controls whether eigenvectors are computed.
unsigned RWEigDecomp< TypeT >::cols | ( | ) | const [inline] |
Returns the number of columns in the decomposed matrix.
DComplex RWEigDecomp< TypeT >::eigenValue | ( | int | i | ) | const |
Returns the ith eigenvalue.
const RWMathVec<DComplex> RWEigDecomp< TypeT >::eigenValues | ( | ) | const [inline] |
Returns a vector of all computed eigenvalues.
void RWEigDecomp< TypeT >::factor | ( | const RWGenMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
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.
bool RWEigDecomp< TypeT >::fail | ( | ) | const |
Returns true
if an eigenvalue or eigenvector that is supposed to be computed fails to be computed.
bool RWEigDecomp< TypeT >::good | ( | ) | const |
Returns true
if all desired eigenvalues and eigenvectors are successfully computed to full desired accuracy.
bool RWEigDecomp< TypeT >::inaccurate | ( | ) | const |
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.
const RWMathVec<DComplex> RWEigDecomp< TypeT >::leftEigenVector | ( | int | i | ) | const |
Returns the ith left eigenvector.
const RWGenMat<DComplex> RWEigDecomp< TypeT >::leftEigenVectors | ( | ) | const |
Returns a vector of all computed left eigenvectors.
unsigned RWEigDecomp< TypeT >::numEigenValues | ( | ) | const [inline] |
Returns the number of eigenvalues or eigenvectors represented in this object.
unsigned RWEigDecomp< TypeT >::numLeftEigenVectors | ( | ) | const [inline] |
Returns the number of eigenvalues or eigenvectors represented in this object.
unsigned RWEigDecomp< TypeT >::numRightEigenVectors | ( | ) | const [inline] |
Returns the number of eigenvalues or eigenvectors represented in this object.
void RWEigDecomp< TypeT >::operator= | ( | const RWEigDecomp< TypeT > & | ) |
Assigns the passed value to this decomposition. The current contents of the decomposition are lost.
const RWMathVec<DComplex> RWEigDecomp< TypeT >::rightEigenVector | ( | int | i | ) | const |
Returns the ith right eigenvector.
const RWGenMat<DComplex> RWEigDecomp< TypeT >::rightEigenVectors | ( | ) | const |
Returns a matrix of all computed right eigenvectors.
unsigned RWEigDecomp< TypeT >::rows | ( | ) | const [inline] |
Returns the number of rows in the decomposed matrix.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.