SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates the eigenvalues and eigenvectors of a symmetric matrix. More...
#include <rw/lapack/symeig.h>
Public Member Functions | |
RWSymEigDecomp () | |
RWSymEigDecomp (const RWSymEigDecomp< TypeT > &A) | |
RWSymEigDecomp (const RWSymMat< TypeT > &A, bool computeVecs=true) | |
RWSymEigDecomp (const RWSymBandMat< TypeT > &A, bool computeVecs=true) | |
void | factor (const RWSymMat< TypeT > &A, bool computeVecs=true) |
void | factor (const RWSymBandMat< TypeT > &A, bool computeVecs=true) |
void | operator= (const RWSymEigDecomp< TypeT > &A) |
unsigned | cols () const |
TypeT | eigenValue (int i) const |
const RWMathVec< TypeT > | eigenValues () const |
const RWMathVec< TypeT > | eigenVector (int i) const |
const RWGenMat< TypeT > | eigenVectors () const |
bool | good () const |
bool | inaccurate () const |
bool | fail () const |
unsigned | numEigenValues () const |
unsigned | numEigenVectors () const |
unsigned | rows () const |
The class RWSymEigDecomp<T> encapsulates the eigenvalues and eigenvectors of a symmetric matrix. You can construct an eigenvalue decomposition object in two ways:
#include <rw/lapack/symeig.h> // RWSymEigDecomp<T> RWSymEigDecomp<double> eig(A); // A is an RWSymMat<double>
#include <iostream> #include <rw/lapack/symeig.h> int main() { RWSymMat<double> A; std::cin >> A; RWSymEigDecomp<double> eig(A); std::cout << "eigenvalues: " << eig.eigenValues() << std::endl; std::cout << "eigenvectors: " << eig.eigenVectors() << std::endl; return 0; }
RWSymEigDecomp< TypeT >::RWSymEigDecomp | ( | ) |
Default constructor. Builds a decomposition of a 0
x 0
matrix.
RWSymEigDecomp< TypeT >::RWSymEigDecomp | ( | const RWSymEigDecomp< TypeT > & | A | ) |
Copy and precision conversion constructor. Where possible, data is referenced for efficiency.
RWSymEigDecomp< TypeT >::RWSymEigDecomp | ( | const RWSymMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
RWSymEigDecomp< TypeT >::RWSymEigDecomp | ( | const RWSymBandMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
Constructs a representation of the eigenvalues and eigenvectors of the matrix A. The boolean parameter controls whether eigenvectors are computed.
unsigned RWSymEigDecomp< TypeT >::cols | ( | ) | const [inline] |
Returns the number of columns in the decomposed matrix.
TypeT RWSymEigDecomp< TypeT >::eigenValue | ( | int | i | ) | const |
Returns the i th eigenvalue.
const RWMathVec<TypeT> RWSymEigDecomp< TypeT >::eigenValues | ( | ) | const [inline] |
Returns a vector of all computed eigenvalues.
const RWMathVec<TypeT> RWSymEigDecomp< TypeT >::eigenVector | ( | int | i | ) | const |
Returns the i th eigenvector.
const RWGenMat<TypeT> RWSymEigDecomp< TypeT >::eigenVectors | ( | ) | const [inline] |
Returns a matrix whose columns are the eigenvectors.
void RWSymEigDecomp< TypeT >::factor | ( | const RWSymBandMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
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.
void RWSymEigDecomp< TypeT >::factor | ( | const RWSymMat< TypeT > & | A, | |
bool | computeVecs = true | |||
) |
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.
bool RWSymEigDecomp< TypeT >::fail | ( | ) | const |
Returns true
if an eigenvalue or eigenvector that is supposed to be computed fails to be computed.
bool RWSymEigDecomp< TypeT >::good | ( | ) | const |
Returns true
if all desired eigenvalues and eigenvectors are successfully computed to full desired accuracy.
bool RWSymEigDecomp< 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.
unsigned RWSymEigDecomp< TypeT >::numEigenValues | ( | ) | const [inline] |
Returns the number of eigenvalues in this object.
unsigned RWSymEigDecomp< TypeT >::numEigenVectors | ( | ) | const [inline] |
Returns the number of eigenvectors in this object.
void RWSymEigDecomp< TypeT >::operator= | ( | const RWSymEigDecomp< TypeT > & | A | ) |
Assigns this decomposition the passed value. The current contents of the decomposition are lost.
unsigned RWSymEigDecomp< 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.