SourcePro® API Reference Guide

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

Encapsulates Schur decomposition eigenvalue servers used to construct eigenvalue decomposition objects of type RWEigDecomp from Schur decompositions. More...

#include <rw/lapack/eigsrv.h>

Inheritance diagram for RWSchurEigServer< TypeT >:
RWEigServer< TypeT >

Public Member Functions

 RWSchurEigServer (bool computeLeftVecs=true, bool computeRightVecs=true, bool scale=true, bool permute=true)
 
void balance (bool)
 
bool computeAllEigenVectors () const
 
bool computeLeftEigenVectors () const
 
void computeLeftEigenVectors (bool)
 
bool computeRightEigenVectors () const
 
void computeRightEigenVectors (bool)
 
virtual RWEigDecomp< TypeT > operator() (const RWBalanceDecomp< TypeT > &A)
 
virtual RWEigDecomp< TypeT > operator() (const RWGenMat< TypeT > &A)
 
virtual RWEigDecomp< TypeT > operator() (const RWHessenbergDecomp< TypeT > &A)
 
virtual RWEigDecomp< TypeT > operator() (const RWSchurDecomp< TypeT > &A)
 
bool permute () const
 
void permute (bool)
 
bool scale () const
 
void scale (bool)
 
void selectEigenVectors (const RWMathVec< int > &)
 
void selectEigenVectors (const RWSlice &)
 

Detailed Description

template<class TypeT>
class RWSchurEigServer< TypeT >

The class RWSchurEigServer encapsulates Schur decomposition eigenvalue servers. These servers are used to construct eigenvalue decomposition objects of type RWEigDecomp from Schur decompositions. A server can be configured to control which eigenvectors are computed, and other details of the computation.

Synopsis
#include <rw/lapack/eigsrv.h>
RWSchurEigDecomp<double> deig = server(A); // A is an RWGenMat<double>
Encapsulates Schur decomposition eigenvalue servers used to construct eigenvalue decomposition object...
Definition eigsrv.h:177
Example
#include <rw/lapack/eigsrv.h>
#include <iostream>
int main() {
RWGenMat<double> A; // input a matrix
std::cin >> A;
RWSchurEigServer<double> server; // configure a server
server.balance(false); // turn off balancing option
server.selectEigenVectors(RWMathVec<int>("[1 2 3 8 9]"));
RWSchurEigDecomp<double> deig = server(A);
}
A templatized general matrix class.
Definition genmat.h:741
A templatized vector class.
Definition mathvec.h:667
void selectEigenVectors(const RWMathVec< int > &)
void balance(bool)

Constructor & Destructor Documentation

◆ RWSchurEigServer()

template<class TypeT >
RWSchurEigServer< TypeT >::RWSchurEigServer ( bool computeLeftVecs = true,
bool computeRightVecs = true,
bool scale = true,
bool permute = true )

Constructs a server. You can adjust some basic options at construction time, or adjust them later using member functions.

Member Function Documentation

◆ balance()

template<class TypeT >
void RWSchurEigServer< TypeT >::balance ( bool )

Controls whether to do permutation and scaling transformations (balancing) before computing the eigenvalue decomposition.

◆ computeAllEigenVectors()

template<class TypeT >
bool RWSchurEigServer< TypeT >::computeAllEigenVectors ( ) const

Returns true if this server is configured to compute all the eigenvectors.

◆ computeLeftEigenVectors() [1/2]

template<class TypeT >
bool RWSchurEigServer< TypeT >::computeLeftEigenVectors ( ) const

Returns whether or not this server is configured to compute the left eigenvectors.

◆ computeLeftEigenVectors() [2/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::computeLeftEigenVectors ( bool )

Configures whether or not left eigenvectors are to be computed.

◆ computeRightEigenVectors() [1/2]

template<class TypeT >
bool RWSchurEigServer< TypeT >::computeRightEigenVectors ( ) const

Returns whether or not this server is configured to compute the right eigenvectors.

◆ computeRightEigenVectors() [2/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::computeRightEigenVectors ( bool )

Configures whether or not right eigenvectors are to be computed.

◆ operator()() [1/4]

template<class TypeT >
virtual RWEigDecomp< TypeT > RWSchurEigServer< TypeT >::operator() ( const RWBalanceDecomp< TypeT > & A)
virtual

Computes an eigenvalue decomposition.

◆ operator()() [2/4]

template<class TypeT >
virtual RWEigDecomp< TypeT > RWSchurEigServer< TypeT >::operator() ( const RWGenMat< TypeT > & A)
virtual

Computes an eigenvalue decomposition.

Implements RWEigServer< TypeT >.

◆ operator()() [3/4]

template<class TypeT >
virtual RWEigDecomp< TypeT > RWSchurEigServer< TypeT >::operator() ( const RWHessenbergDecomp< TypeT > & A)
virtual

Computes an eigenvalue decomposition.

◆ operator()() [4/4]

template<class TypeT >
virtual RWEigDecomp< TypeT > RWSchurEigServer< TypeT >::operator() ( const RWSchurDecomp< TypeT > & A)
virtual

Computes an eigenvalue decomposition.

◆ permute() [1/2]

template<class TypeT >
bool RWSchurEigServer< TypeT >::permute ( ) const

Returns true if the server is configured to attempt a permutation before computing the eigenvalues. Sometimes this can result in less computation.

◆ permute() [2/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::permute ( bool )

Configures whether or not to do a permutation transformation before computing the eigenvalues. Sometimes this can result in less computation.

◆ scale() [1/2]

template<class TypeT >
bool RWSchurEigServer< TypeT >::scale ( ) const

Returns true if the server is configured to do a scaling transformation before computing the eigenvalues. Sometimes this transformation can result in more accurate eigenvalues.

◆ scale() [2/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::scale ( bool )

Configures whether or not to do a scaling transformation before computing the eigenvalues. Sometimes this transformation can result in more accurate eigenvalues.

◆ selectEigenVectors() [1/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::selectEigenVectors ( const RWMathVec< int > & )

Selects which eigenvectors are to be computed. This call causes the server to forget which eigenvectors were previously selected. With a real (as opposed to complex) eigenserver object, selecting either of a complex conjugate pair of eigenvalues causes both to be selected.

◆ selectEigenVectors() [2/2]

template<class TypeT >
void RWSchurEigServer< TypeT >::selectEigenVectors ( const RWSlice & )

Selects which eigenvectors are to be computed. This call causes the server to forget which eigenvectors were previously selected. With a real (as opposed to complex) eigenserver object, selecting either of a complex conjugate pair of eigenvalues causes both to be selected.

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