SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWSymSomeEigServer< TypeT > Class Template Reference

Server for symmetric eigenvalues that allows the computation of a subset of the eigenvalues and (optionally) their corresponding eigenvectors. More...

#include <rw/lapack/seigsrv.h>

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

Public Member Functions

 RWSymSomeEigServer (bool computeVecs=true)
 
virtual bool computeEigenVectors () const
 
void computeEigenVectors (bool computeVecs)
 
virtual RWSymEigDecomp< TypeT > decompose (const RWTriDiagDecomp< TypeT > &A)
 
RWSlice setRange (const RWSlice &range)
 
TypeT setTolerance (TypeT tolerance)
 
- Public Member Functions inherited from RWSymEigServer< TypeT >
virtual RWSymEigDecomp< TypeT > operator() (const RWSymMat< TypeT > &A)
 
virtual RWSymEigDecomp< TypeT > operator() (const RWSymBandMat< TypeT > &A)
 

Detailed Description

template<class TypeT>
class RWSymSomeEigServer< TypeT >

The symmetric eigenvalue server class, RWSymSomeEigServer, 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/seigsrv.h>
RWSymEigDecomp<double> eig = server(A); // A is a RWSymBandMat<double>
Example
#include <iostream>
#include <rw/lapack/seigsrv.h>
int main()
{
RWSymMat<double> A; // input a matrix
std::cin >> A;
RWSymSomeEigServer<double> server; // configure a server
server.setRange(RWSlice(0,5)); // the 5 smallest eigenvalues
RWSymEigDecomp<double> eig = server(A);
return 0;
}

Constructor & Destructor Documentation

template<class TypeT>
RWSymSomeEigServer< TypeT >::RWSymSomeEigServer ( 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

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

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

Implements RWSymEigServer< TypeT >.

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

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

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

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

Implements RWSymEigServer< TypeT >.

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

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

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

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

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