SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
The Hermitian eigenvalue server class, allowing the computation of a subset of the eigenvalues and (optionally) their corresponding eigenvectors. More...
#include <rw/lapack/heigsrv.h>
Public Member Functions | |
RWHermSomeEigServer (bool computeVecs=true) | |
virtual RWSymEigDecomp< double > | decompose (const RWTriDiagDecomp< TypeT > &A) |
double | setTolerance (double tolerance) |
RWSlice | setRange (const RWSlice &range) |
virtual bool | computeEigenVectors () const |
void | computeEigenVectors (bool computeVecs) |
The Hermitian eigenvalue server class, RWHermSomeEigServer<T> allows the computation of a subset of the eigenvalues and (optionally) their corresponding eigenvectors. The computation uses the bisection method to find the eigenvalues, followed by inverse iteration to find the eigenvectors. The subset of eigenvalues to be computed is specified using the RWSlice class, or one of its subclasses, RWRange or RWToEnd. This provides the flexibility to specify either the smallest eigenvalues, the largest, or a selection in between. The eigenvalue ordering is smallest to largest.
#include <rw/lapack/heigsrv.h> RWHermSomeEigServer<DComplex> server; RWHermEigDecomp<DComplex> eig = server(A); // A is a // RWHermBandMat<DComplex>
#include <iostream> #include <rw/lapack/heigsrv.h> int main() { RWHermMat<DComplex> A; // input a matrix std::cin >> A; RWHermSomeEigServer<DComplex> server; // configure a server server.setRange(RWSlice(0,5)); // the 5 smallest eigenvalues RWHermEigDecomp<DComplex> eig = server(A); return 0; }
RWHermSomeEigServer< TypeT >::RWHermSomeEigServer | ( | bool | computeVecs = true |
) |
Constructs a server. The parameter indicates whether this server should be configured to compute eigenvectors as well as eigenvalues.
void RWHermSomeEigServer< TypeT >::computeEigenVectors | ( | bool | computeVecs | ) |
Sets whether or not the server should compute eigenvectors as well as eigenvalues.
virtual bool RWHermSomeEigServer< TypeT >::computeEigenVectors | ( | ) | const [virtual] |
Returns true
if this server is configured to compute eigenvectors as well as eigenvalues.
Implements RWHermEigServer< TypeT >.
virtual RWSymEigDecomp<double> RWHermSomeEigServer< TypeT >::decompose | ( | const RWTriDiagDecomp< TypeT > & | A | ) | [virtual] |
Computes the eigenvalue decomposition of the tridiagonal matrix inside the tridiagonal decomposition.
Implements RWHermEigServer< TypeT >.
RWSlice RWHermSomeEigServer< TypeT >::setRange | ( | const RWSlice & | range | ) |
Sets the range of eigenvalues to be computed. Returns the previous range.
double RWHermSomeEigServer< TypeT >::setTolerance | ( | double | tolerance | ) |
Sets the tolerance to which we have to compute the eigenvalues. Returns the previous tolerance.
© 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.