Module: Linear Algebra Group: Nonsymmetric Eigenvalue Decomposition classes
Does not inherit
balance() computeAllEigenVectors() computeLeftEigenVectors() |
computeRightEigenVectors() operator()() permute() |
RWSchurEigServer() scale() selectEigenVectors() |
#include <rw/lapack/eigsrv.h> RWSchurEigServer<double> server; RWSchurEigDecomp<double> deig = server(A); // A is an
// RWGenMat<double>
The class RWSchurEigServer<T> encapsulates Schur decomposition eigenvalue servers. These servers are used to construct eigenvalue decomposition objects of type RWEigDecomp<T> from Schur decompositions. A server can be configured to control which eigenvectors are computed, and other details of the computation.
#include <iostream> #include <rw/lapack/eigsrv.h> 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); }
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.
void balance(bool);
Controls whether to do permutation and scaling transformations (balancing) before computing the eigenvalue decomposition.
bool computeAllEigenVectors() const;
Returns true if this server is configured to compute all the eigenvectors.
bool computeLeftEigenVectors() const;
Returns whether or not this server is configured to compute the left eigenvectors.
bool computeLeftEigenVectors(bool);
Configures whether or not left eigenvectors are to be computed.
bool computeRightEigenVectors() const;
Returns whether or not this server is configured to compute the right eigenvectors.
bool computeRightEigenVectors(bool);
Configures whether or not right eigenvectors are to be computed.
bool 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 scale(bool) const;
Configures whether or not to do a scaling transformation before computing the eigenvalues. Sometimes this transformation can result in more accurate eigenvalues.
void selectEigenVectors(const RWMathVec<int>&); void 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.
bool 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 permute(bool) const;
Configures whether or not to do a permutation transformation before computing the eigenvalues. Sometimes this can result in less computation.
RWEigDecomp<T> operator()(const RWGenMat<T>&); RWEigDecomp<T> operator()(const RWBalanceDecomp<T>&); RWEigDecomp<T> operator()(const RWHessenbergDecomp<T>&); RWEigDecomp<T> operator()(const RWSchurDecomp<T>&);
Computes an eigenvalue decomposition. The matrix to be decomposed can be represented as any of the above argument types.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.