SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWHermEigServer< TypeT > Class Template Referenceabstract

Abstract base class for the Hermitian eigenvalue server. More...

#include <rw/lapack/heigsrv.h>

Inheritance diagram for RWHermEigServer< TypeT >:
RWHermPDQREigServer< TypeT > RWHermQREigServer< TypeT > RWHermRFQREigServer< TypeT > RWHermRangeEigServer< TypeT > RWHermSomeEigServer< TypeT >

Public Member Functions

virtual bool computeEigenVectors () const =0
 
virtual RWSymEigDecomp< double > decompose (const RWTriDiagDecomp< TypeT > &A)=0
 
virtual RWHermEigDecomp< TypeT > operator() (const RWHermBandMat< TypeT > &A)
 
virtual RWHermEigDecomp< TypeT > operator() (const RWHermMat< TypeT > &A)
 

Detailed Description

template<class TypeT>
class RWHermEigServer< TypeT >

The class RWHermEigServer is an abstract base class for the Hermitian eigenvalue server. For each precision, the Linear Algebra Module provides several derived types:

  • The class RWHermQREigServer uses the implicitly shifted QR method, switching between QR and QL variants in order to handle graded matrices effectively. This is the default server.
  • The class RWHermPDQREigServer uses a combination of Cholesky factorization and bidiagonal QR iteration. It applies to positive definite matrices only. The resulting eigenvalue decomposition may be significantly more accurate than those of the other servers.
  • The class RWHermRFQREigServer uses a version of the QR algorithm without square roots. It can only compute all the eigenvalues, and no eigenvectors.
  • The class RWHermSomeEigServer uses the bisection method to compute some of the eigenvalues and (optionally) eigenvectors. You can use this server to compute the first k largest eigenvalues, the first k smallest eigenvalues, or thei i th through j th largest eigenvalues.
  • The class RWHermRangeEigServer uses bisection to compute all the eigenvalues and (optionally) eigenvectors in a real range.

This base class serves 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 RWHermEigDecomp 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.

Synopsis
#include <rw/lapack/heigsrv.h>
RWHermEigDecomp<DComplex> eig = server(A); // A is a RWHermMat<DComplex>
Encapsulates the eigenvalues and eigenvectors of a Hermitian matrix.
Definition hermeig.h:80
Abstract base class for the Hermitian eigenvalue server.
Definition heigsrv.h:84
Example
See the specific server subclasses for examples.

Member Function Documentation

◆ computeEigenVectors()

template<class TypeT >
virtual bool RWHermEigServer< TypeT >::computeEigenVectors ( ) const
pure virtual

Returns true if this server is configured to compute eigenvectors as well as eigenvalues.

Implemented in RWHermPDQREigServer< TypeT >, RWHermQREigServer< TypeT >, RWHermRangeEigServer< TypeT >, RWHermRFQREigServer< TypeT >, and RWHermSomeEigServer< TypeT >.

◆ decompose()

template<class TypeT >
virtual RWSymEigDecomp< double > RWHermEigServer< TypeT >::decompose ( const RWTriDiagDecomp< TypeT > & A)
pure virtual

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.

Implemented in RWHermPDQREigServer< TypeT >, RWHermQREigServer< TypeT >, RWHermRangeEigServer< TypeT >, RWHermRFQREigServer< TypeT >, and RWHermSomeEigServer< TypeT >.

◆ operator()() [1/2]

template<class TypeT >
virtual RWHermEigDecomp< TypeT > RWHermEigServer< TypeT >::operator() ( const RWHermBandMat< TypeT > & A)
virtual

Computes a Hermitian 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.

If self is an instance of RWHermPDQREigServer, the matrix you pass in must be positive definite.

◆ operator()() [2/2]

template<class TypeT >
virtual RWHermEigDecomp< TypeT > RWHermEigServer< TypeT >::operator() ( const RWHermMat< TypeT > & A)
virtual

Computes a Hermitian 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.

If self is an instance of RWHermPDQREigServer, the matrix you pass in must be positive definite.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.