>
>#include <rw/deigsrv.h> // DoubleHessEigServer #include <rw/ceigsrv.h> // DComplexHessEigServer DoubleHessEigServer server; DoubleHessEigDecomp deig = server(A); // A is an
// RWGenMat<double>
The classes {TYPE}HessEigServer encapsulate Hessenberg decomposition eigenvalue servers. These servers are used to construct eigenvalue decomposition objects of type {TYPE}EigDecomp from Hessenberg decompositions. The server can be configured to control which eigenvectors are computed, and other details of the computation. The eigenvectors are computed using inverse iteration. This is a good method to use when you need only a small number of the eigenvectors, perhaps less than 20%.
>#include <rw/deigsrv.h> main() { RWGenMat<double> A; // input a matrix cin >> A; DoubleHessEigServer server; // configure a server server.balance(FALSE); // turn off balancing option server.selectEigenVectors(RWMathVec<int>("[1 2 3 8 9]")); DoubleEigDecomp eig = server(A); }>
DoubleHessEigServer(RWBoolean computeLeftVecs=TRUE, RWBoolean computeRightVecs=TRUE, RWBoolean scale=TRUE, RWBoolean permute=TRUE); DComplexHessEigServer(RWBoolean computeLeftVecs=TRUE, RWBoolean computeRightVecs=TRUE, RWBoolean scale=TRUE, RWBoolean permute=TRUE);
Constructs a server. You can adjust some basic options at construction time, or adjust them later using member functions.
void DoubleHessEigServer::balance(RWBoolean); void DComplexHessEigServer::balance(RWBoolean);
Controls whether to do permutation and scaling transformations (balancing) before computing the eigenvalue decomposition.
RWBoolean DoubleHessEigServer::computeAllEigenVectors() const; RWBoolean DComplexHessEigServer::computeAllEigenVectors() const;
Returns TRUE if this server is configured to compute all the eigenvectors.
RWBoolean DoubleHessEigServer::computeLeftEigenVectors() const; RWBoolean DComplexHessEigServer::computeLeftEigenVectors() const;
Returns whether or not this server is configured to compute the left eigenvectors.
RWBoolean DoubleHessEigServer::computeLeftEigenVectors(RWBoolean); RWBoolean DComplexHessEigServer::computeLeftEigenVectors(RWBoolean);
Configures whether or not left eigenvectors are to be computed.
RWBoolean DoubleHessEigServer::computeRightEigenVectors() const; RWBoolean DComplexHessEigServer::computeRightEigenVectors() const;
Returns whether or not this server is configured to compute the right eigenvectors.
RWBoolean DoubleHessEigServer::computeRightEigenVectors(RWBoolean); RWBoolean DComplexHessEigServer::computeRightEigenVectors(RWBoolean);
Configures whether or not right eigenvectors are to be computed.
RWBoolean DoubleHessEigServer::scale() const; RWBoolean DComplexHessEigServer::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.
void DoubleHessEigServer::scale(RWBoolean) const; void DComplexHessEigServer::scale(RWBoolean) const;
Configures whether or not to do a scaling transformation before computing the eigenvalues. Sometimes this transformation can result in more accurate eigenvalues.
void DoubleHessEigServer::selectEigenVectors(const RWMathVec<int>&); void DoubleHessEigServer::selectEigenVectors(const RWSlice&); void DComplexHessEigServer::selectEigenVectors(const RWMathVec<int>&); void DComplexHessEigServer::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.
RWBoolean DoubleHessEigServer::permute() const; RWBoolean DComplexHessEigServer::permute() const;
Returns TRUE if the server is configured to attempt a permutation before computing the eigenvalues. Sometimes this can result in less computation.
void DoubleHessEigServer::permute(RWBoolean) const; void DComplexHessEigServer::permute(RWBoolean) const;
Configures whether or not to do a permutation transformation before computing the eigenvalues. Sometimes this can result in less computation.
DoubleEigDecomp operator()(const RWGenMat<double>&); DoubleEigDecomp operator()(const DoubleBalanceDecomp&); DoubleEigDecomp operator()(const DoubleHessenbergDecomp&); DComplexEigDecomp operator()(const DcomplexGenMat&); DcomplexEigDecomp operator()(const DcomplexBalanceDecomp&); DcomplexEigDecomp operator()(const DcomplexHessenbergDecomp&);
Computes an eigenvalue decomposition. The matrix to be decomposed can be represented as any of the above argument types.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.