>
>#include <rw/fseigsrv.h> // FloatSymEigServer #include <rw/dseigsrv.h> // DoubleSymEigServer #include <rw/cheigsrv.h> // DComplexHermEigServer DoubleSymEigServer server; DoubleSymEigDecomp eig = server(A); // A is a DoubleSymMat
The classes {TYPE}SymEigServer and DComplexHermEigServer are abstract base classes for the symmetric and Hermitian eigenvalue servers, respectively. For each precision, LAPACK.h++ provides several derived types:
The classes {TYPE}SymQREigServer and DComplexHermQREigServer use the implicitly shifted QR method, switching between QR and QL variants in order to handle graded matrices effectively. These are the default servers.
The classes {TYPE}SymPDQREigServer and DComplexHermPDQREigServer use a combination of Cholesky factorization and bidiagonal QR iteration. They apply to positive definite matrices only. The resulting eigenvalue decompositions may be significantly more accurate than those of the other servers.
The classes {TYPE}SymRFQREigServer and DComplexHermRFQREigServer use a version of the QR algorithm without square roots. They can only compute all the eigenvalues, and no eigenvectors.
The classes {TYPE}SymSomeEigServer and DComplexHermSomeEigServer use the bisection method to compute some of the eigenvalues and (optionally) eigenvectors. You can use these servers to compute the first k largest eigenvalues, the first k smallest eigenvalues, or the ith through jth largest eigenvalues.
The classes {TYPE}SymRangeEigServer and DComplexHermRangeEigServer use bisection to compute all the eigenvalues and (optionally) eigenvectors in a real range.
These base classes serve two purposes:
to provide a specification of the commonality between servers, and
to house implementation code common to several different servers.
The common implementation includes a set of protected routines to modify a given {TYPE}SymEigDecomp or DComplexHermEigDecomp object. This way, all server classes, including any that you write, can access the internals of the decomposition object without being explicitly listed as friend classes.
>See the specific server subclasses for examples.
>virtual RWBoolean FloatSymEigServer::computeEigenVectors() const; virtual RWBoolean DoubleSymEigServer::computeEigenVectors() const; virtual RWBoolean DComplexSymEigServer::computeEigenVectors() const;
Returns TRUE if this server is configured to compute eigenvectors as well as eigenvalues.
virtual FloatSymEigDecomp FloatSymEigServer::decompose
(const FloatSymTriDiagDecomp& A) const =0; virtual DoubleSymEigDecomp DoubleSymEigServer::decompose
(const DoubleSymTriDiagDecomp& A) const =0; virtual DoubleSymEigDecomp DComplexSymEigServer::decompose
(const DoubleSymTriDiagDecomp& A) const =0;
Computes the eigenvalue decomposition of the tridiagonal matrix inside the tridiagonal decomposition. This pure virtual function is implemented in the specific server classes. It is used to implement the default
operator()() functions.
virtual FloatSymEigDecomp FloatSymEigDecomp::operator()
(const FloatSymMat& A) const; virtual FloatSymEigDecomp FloatSymEigDecomp::operator()
(const FloatSymBandMat& A) const; virtual DoubleSymEigDecomp DoubleSymEigDecomp::operator()
(const DoubleSymMat& A) const; virtual DoubleSymEigDecomp DoubleSymEigDecomp::operator()
(const DoubleSymBandMat& A) const; virtual DComplexSymEigDecomp DComplexSymEigDecomp::operator()
(const DComplexSymMat& A) const; virtual DComplexHermEigDecomp DComplexHermEigDecomp::operator()
(const DComplexHermBandMat& A) const;
Computes a symmetric eigenvalue decomposition. The default method implemented in this class first constructs a tridiagonal decomposition from the given matrix, next computes the eigenvalue decomposition for that decomposition, and finally transforms the eigenvectors as required.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.