SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWHermSomeEigServer< TypeT > Class Template Reference

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>

Inheritance diagram for RWHermSomeEigServer< TypeT >:
RWHermEigServer< TypeT >

Public Member Functions

 RWHermSomeEigServer (bool computeVecs=true)
 
virtual bool computeEigenVectors () const
 
void computeEigenVectors (bool computeVecs)
 
virtual RWSymEigDecomp< double > decompose (const RWTriDiagDecomp< TypeT > &A)
 
RWSlice setRange (const RWSlice &range)
 
double setTolerance (double tolerance)
 
- Public Member Functions inherited from RWHermEigServer< TypeT >
virtual RWHermEigDecomp< TypeT > operator() (const RWHermBandMat< TypeT > &A)
 
virtual RWHermEigDecomp< TypeT > operator() (const RWHermMat< TypeT > &A)
 

Detailed Description

template<class TypeT>
class RWHermSomeEigServer< TypeT >

The Hermitian eigenvalue server class, RWHermSomeEigServer 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.

Synopsis
#include <rw/lapack/heigsrv.h>
RWHermEigDecomp<DComplex> eig = server(A); // A is a
// RWHermBandMat<DComplex>
Encapsulates the eigenvalues and eigenvectors of a Hermitian matrix.
Definition hermeig.h:80
The Hermitian eigenvalue server class, allowing the computation of a subset of the eigenvalues and (o...
Definition heigsrv.h:389
Example
#include <rw/lapack/heigsrv.h>
#include <iostream>
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;
}
Encapsulates a Hermitian matrix.
Definition hermmat.h:118
RWSlice setRange(const RWSlice &range)
Represents an index that can be used for subscripting vectors, matrices, and arrays.
Definition rwslice.h:105

Constructor & Destructor Documentation

◆ RWHermSomeEigServer()

template<class TypeT >
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.

Member Function Documentation

◆ computeEigenVectors() [1/2]

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

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

Implements RWHermEigServer< TypeT >.

◆ computeEigenVectors() [2/2]

template<class TypeT >
void RWHermSomeEigServer< TypeT >::computeEigenVectors ( bool computeVecs)

Sets whether or not the server should compute eigenvectors as well as eigenvalues.

◆ decompose()

template<class 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 >.

◆ setRange()

template<class TypeT >
RWSlice RWHermSomeEigServer< TypeT >::setRange ( const RWSlice & range)

Sets the range of eigenvalues to be computed. Returns the previous range.

◆ setTolerance()

template<class TypeT >
double RWHermSomeEigServer< TypeT >::setTolerance ( double tolerance)

Sets the tolerance to which we have to compute the eigenvalues. Returns the previous tolerance.

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