SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Encapsulates a Schur decomposition as well as an optional balance transformation. More...
#include <rw/lapack/schur.h>
Public Member Functions | |
RWSchurDecomp () | |
RWSchurDecomp (const RWBalanceDecomp< TypeT > &) | |
RWSchurDecomp (const RWGenMat< TypeT > &A, bool permute=true, bool scale=true) | |
RWSchurDecomp (const RWHessenbergDecomp< TypeT > &) | |
RWGenMat< TypeT > | B () const |
RWGenMat< TypeT > | BInvTX (const RWGenMat< TypeT > &X) const |
RWMathVec< TypeT > | BInvTx (const RWMathVec< TypeT > &x) const |
RWGenMat< TypeT > | BX (const RWGenMat< TypeT > &X) const |
RWMathVec< TypeT > | Bx (const RWMathVec< TypeT > &x) const |
unsigned | cols () const |
DComplex | eigenvalue (int) const |
RWMathVec< DComplex > | eigenvalues () const |
void | factor (const RWBalanceDecomp< TypeT > &) |
void | factor (const RWGenMat< TypeT > &A, bool permute=true, bool scale=true) |
void | factor (const RWHessenbergDecomp< TypeT > &) |
bool | good () const |
int | move (int i, int j) |
bool | moveToFront (const RWMathVec< int > &) |
unsigned | rows () const |
RWGenMat< TypeT > | T () const |
RWGenMat< TypeT > | Z () const |
RWGenMat< TypeT > | ZTX (const RWGenMat< TypeT > &X) const |
RWMathVec< TypeT > | ZTx (const RWMathVec< TypeT > &x) const |
RWGenMat< TypeT > | ZX (const RWGenMat< TypeT > &X) const |
RWMathVec< TypeT > | Zx (const RWMathVec< TypeT > &x) const |
A Schur decomposition uses orthogonal transformations to reduce a matrix A to a matrix T that is upper quasitriangular. For a complex matrix, T is actually triangular. For a real matrix, T is triangular, except the diagonal can contain 2 x 2 blocks, allowing nonzero entries on the subdiagonal. The columns of the orthogonal transformation matrix, Z, are called Schur vectors.
The class RWSchurDecomp encapsulates a Schur decomposition as well as an optional balance transformation. The decomposition of a matrix A is:
\[ A = BZTZ'B^{-1} \]
where Z is orthogonal, T is quasi-upper triangular, and B is a balance transformation (see RWBalanceTransform ). The Schur decomposition yields eigenvalues immediately. Since the eigenvalues of A and T are the same, and since T is quasi-upper triangular, the eigenvalues are simply either the diagonal elements of T, or the complex conjugate pair corresponding to the eigenvalues of a 2 x 2 block on the diagonal. The invariant subspace corresponding to the first k eigenvalues of A is spanned by the first k Schur vectors; since the matrix of Schur vectors, Z, is orthogonal, this basis is orthonormal. Often, the Schur vectors are preferable to the eigenvectors themselves because of this orthogonality.
RWSchurDecomp< TypeT >::RWSchurDecomp | ( | ) |
Default constructor. Builds a decomposition of size 0 x 0.
RWSchurDecomp< TypeT >::RWSchurDecomp | ( | const RWGenMat< TypeT > & | A, |
bool | permute = true, | ||
bool | scale = true ) |
Constructs the Schur decomposition of the matrix A. The boolean parameters determine whether or not the permutation or scaling parts of the balance transformation are applied prior to forming the Schur decomposition.
RWSchurDecomp< TypeT >::RWSchurDecomp | ( | const RWBalanceDecomp< TypeT > & | ) |
Builds a Schur decomposition of the matrix represented by the balance decomposition.
RWSchurDecomp< TypeT >::RWSchurDecomp | ( | const RWHessenbergDecomp< TypeT > & | ) |
Builds a Schur decomposition of the matrix represented by the Hessenberg decomposition.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::B | ( | ) | const |
Computes an explicit representation of the balance transformation.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::BInvTX | ( | const RWGenMat< TypeT > & | X | ) | const |
Computes the inner product of the balance transformation B
, or its (conjugate) transpose inverse, and the matrix X.
RWMathVec< TypeT > RWSchurDecomp< TypeT >::BInvTx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the balance transformation B
, or its (conjugate) transpose inverse, and the vector x.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::BX | ( | const RWGenMat< TypeT > & | X | ) | const |
Computes the inner product of the balance transformation B
, or its (conjugate) transpose inverse, and the matrix X.
RWMathVec< TypeT > RWSchurDecomp< TypeT >::Bx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the balance transformation B
, or its (conjugate) transpose inverse, and the vector x.
|
inline |
Returns the number of columns in the matrix that the decomposition represents.
DComplex RWSchurDecomp< TypeT >::eigenvalue | ( | int | ) | const |
Returns the i th eigenvalue.
|
inline |
Returns a vector of all computed eigenvalues.
void RWSchurDecomp< TypeT >::factor | ( | const RWBalanceDecomp< TypeT > & | ) |
Replaces the current decomposition with the Schur decomposition of the matrix represented by the balance decomposition.
void RWSchurDecomp< TypeT >::factor | ( | const RWGenMat< TypeT > & | A, |
bool | permute = true, | ||
bool | scale = true ) |
Replaces the current decomposition with the Schur decomposition of the matrix A. The boolean parameters determine whether or not the permutation or scaling parts of the balance transformation are applied prior to forming the Schur decomposition.
void RWSchurDecomp< TypeT >::factor | ( | const RWHessenbergDecomp< TypeT > & | ) |
Replaces the current decomposition with the Schur decomposition of the matrix represented by the Hessenberg decomposition.
bool RWSchurDecomp< TypeT >::good | ( | ) | const |
Returns true
if the decomposition was successfully computed, false
if not.
int RWSchurDecomp< TypeT >::move | ( | int | i, |
int | j ) |
Reorders the decomposition so that the i theigenvalue is moved to the j th position. In the real case, if i corresponds to a 2 x 2 block (a complex eigenvalue), the entire block is moved. The function returns where the eigenvalue was actually moved to; this may differ from j for two reasons: it may have been impossible to move the eigenvalue to position j due to the presence of 2 x 2 blocks, or the matrix may be extremely ill-conditioned.
bool RWSchurDecomp< TypeT >::moveToFront | ( | const RWMathVec< int > & | ) |
Reorders the decomposition so that the eigenvalues whose indices are passed in the vector are moved to the front. In the real case, if an index corresponds to a 2 x 2 block (a complex eigenvalue), the entire block is moved. The function returns true
if the reordering is successful.
|
inline |
Returns the number of rows in the matrix that the decomposition represents.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::T | ( | ) | const |
Computes an explicit representation of the quasi-upper triangular matrix T
.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::Z | ( | ) | const |
Computes an explicit representation of the orthogonal matrix Z
.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::ZTX | ( | const RWGenMat< TypeT > & | X | ) | const |
Computes the inner product of the orthogonal matrix Z
, or its (conjugate) transpose, and the matrix X.
RWMathVec< TypeT > RWSchurDecomp< TypeT >::ZTx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the orthogonal matrix Z
, or its (conjugate) transpose, and the vector x.
RWGenMat< TypeT > RWSchurDecomp< TypeT >::ZX | ( | const RWGenMat< TypeT > & | X | ) | const |
Computes the inner product of the orthogonal matrix Z
, or its (conjugate) transpose, and the matrix X.
RWMathVec< TypeT > RWSchurDecomp< TypeT >::Zx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the orthogonal matrix Z
, or its (conjugate) transpose, and the vector x.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |