SourcePro® API Reference Guide

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

Server for symmetric eigenvalues that allows the computation of only the eigenvalues in a given range and (optionally) their corresponding eigenvectors. More...

#include <rw/lapack/seigsrv.h>

Inheritance diagram for RWSymRangeEigServer< TypeT >:
RWSymEigServer< TypeT >

Public Member Functions

 RWSymRangeEigServer (bool computeVecs=true)
 
virtual bool computeEigenVectors () const
 
void computeEigenVectors (bool computeVecs)
 
virtual RWSymEigDecomp< TypeT > decompose (const RWTriDiagDecomp< TypeT > &A)
 
TypeT setLarge (TypeT large)
 
void setRange (TypeT from, TypeT to)
 
TypeT setSmall (TypeT small)
 
TypeT setTolerance (TypeT tolerance)
 
- Public Member Functions inherited from RWSymEigServer< TypeT >
virtual RWSymEigDecomp< TypeT > operator() (const RWSymBandMat< TypeT > &A)
 
virtual RWSymEigDecomp< TypeT > operator() (const RWSymMat< TypeT > &A)
 

Detailed Description

template<class TypeT>
class RWSymRangeEigServer< TypeT >

The symmetric eigenvalue server class, RWSymRangeEigServer, allows the computation of only the eigenvalues in a given range and (optionally) their corresponding eigenvectors. The computation uses the bisection method to find the eigenvalues, followed by inverse iteration to find the eigenvectors.

Synopsis
#include <rw/lapack/seigsrv.h>
RWSymEigDecomp<double> eig = server(A); // A is a RWSymBandMat<double>
Encapsulates the eigenvalues and eigenvectors of a symmetric matrix.
Definition symeig.h:86
Server for symmetric eigenvalues that allows the computation of only the eigenvalues in a given range...
Definition seigsrv.h:459
Example
#include <rw/lapack/seigsrv.h>
#include <iostream>
int main() {
RWSymMat<double> A; // input a matrix
std::cin >> A;
RWSymRangeEigServer<double> server; // configure a server
server.setRange(0.0, 0.5); // Set the range from 0.0 to 0.5
RWSymEigDecomp<double> eig = server(A);
return 0;
}
Represents a symmetric matrix.
Definition symmat.h:112
void setRange(TypeT from, TypeT to)

Constructor & Destructor Documentation

◆ RWSymRangeEigServer()

template<class TypeT >
RWSymRangeEigServer< TypeT >::RWSymRangeEigServer ( bool computeVecs = true)

Constructs a server. The parameter indicates whether this server should be configured to compute eigenvectors as well as eigenvalues. The new server is configured to compute all eigenvalues.

Member Function Documentation

◆ computeEigenVectors() [1/2]

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

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

Implements RWSymEigServer< TypeT >.

◆ computeEigenVectors() [2/2]

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

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

◆ decompose()

template<class TypeT >
virtual RWSymEigDecomp< TypeT > RWSymRangeEigServer< TypeT >::decompose ( const RWTriDiagDecomp< TypeT > & A)
virtual

Computes the eigenvalue decomposition of the tridiagonal matrix inside the tridiagonal decomposition.

Implements RWSymEigServer< TypeT >.

◆ setLarge()

template<class TypeT >
TypeT RWSymRangeEigServer< TypeT >::setLarge ( TypeT large)

Sets the upper boundary on the range of eigenvalues to be computed. Returns the previous upper boundary.

◆ setRange()

template<class TypeT >
void RWSymRangeEigServer< TypeT >::setRange ( TypeT from,
TypeT to )

Sets the range of eigenvalues to be computed. To set up a range which is open on one side (extends to infinity), you can use the setSmall() or setLarge() functions.

◆ setSmall()

template<class TypeT >
TypeT RWSymRangeEigServer< TypeT >::setSmall ( TypeT small)

Sets the lower boundary on the range of eigenvalues to be computed. Returns the previous lower boundary.

◆ setTolerance()

template<class TypeT >
TypeT RWSymRangeEigServer< TypeT >::setTolerance ( TypeT tolerance)

Sets the tolerance to which you must compute the eigenvalues. Returns the previous tolerance.

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