SourcePro® API Reference Guide

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

Server for the positive definite QR method of computing eigenvalues. More...

#include <rw/lapack/seigsrv.h>

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

Public Member Functions

 RWSymPDQREigServer (bool computeVecs=true)
 
virtual bool computeEigenVectors () const
 
void computeEigenVectors (bool computeVecs)
 
virtual RWSymEigDecomp< TypeT > decompose (const RWTriDiagDecomp< TypeT > &A)
 
- 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 RWSymPDQREigServer< TypeT >

The class RWSymPDQREigServer is the server for the positive definite QR method of computing eigenvalues. This server applies only to matrices that you know are positive definite. Trying to use it on nonpositive definite matrices results in a decomposition with the incomplete flag set; you can test for this in the class RWSymEigDecomp. Use of this server with positive definite matrices can result in much more accurate eigenvalues and eigenvectors.

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;
RWSymPDQREigServer<double> server; // configure a server
server.computeEigenVectors(false); // turn off eigenvectors
RWSymEigDecomp<double> eig = server(A);
return 0;
}

Constructor & Destructor Documentation

template<class TypeT>
RWSymPDQREigServer< TypeT >::RWSymPDQREigServer ( 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 RWSymPDQREigServer< 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 RWSymPDQREigServer< TypeT >::computeEigenVectors ( bool  computeVecs)

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

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

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

Implements RWSymEigServer< TypeT >.

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