A m × m matrix A can be written as the product of three matrices: A = P × T × PT with P an orthogonal matrix and T an quasi-triangular matrix. Both P and T are m × m matrices.
Transformation to Schur form is often not a goal by itself, but it is an
intermediate step in more general decomposition algorithms like
eigen decomposition. This class is therefore
intended for internal use by the library and is not public. As a consequence
of this explicitly limited scope, many methods directly returns references to
internal arrays, not copies.
This class is based on the method hqr2 in class EigenvalueDecomposition from the JAMA library.
| Modifier and Type | Class and Description |
|---|---|
| private static class | SchurTransformer.
Internal data structure holding the current shift information. |
| Modifier and Type | Field and Description |
|---|---|
| private RealMatrix | cachedP
Cached value of P. |
| private RealMatrix | cachedPt
Cached value of PT. |
| private RealMatrix | cachedT
Cached value of T. |
| private final double | epsilon
Epsilon criteria taken from JAMA code (originally was 2^-52). |
| private final double[][] | matrixP
P matrix. |
| private final double[][] | matrixT
T matrix. |
| private static final int | MAX_ITERATIONS
Maximum allowed iterations for convergence of the transformation. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SchurTransformer(final RealMatrix
matrix to transform matrix)Build the transformation to Schur form of a general real matrix. |
| Modifier and Type | Method and Description |
|---|---|
| private void | computeShift(final int
the index of the small sub-diagonal element l, final int the current eigenvalue index idx, final int the current iteration iteration, final SchurTransformer.holder for shift information shiftCompute the shift for the current iteration. |
| private int | Returns: the index of the first small sub-diagonal elementthe starting index for the search startIdx, final double the L1 norm of the matrix norm)Find the first small sub-diagonal element and returns its index. |
| private double | |
| public RealMatrix | |
| public RealMatrix | Returns: the transpose of the P matrixReturns the transpose of the matrix P of the transform. |
| public RealMatrix | |
| private int | Returns: the start index for the QR stepthe index of the small sub-diagonal element il, final int the current eigenvalue index iu, final SchurTransformer.shift information holder shift,the initial houseHolder vector hVec)Initialize the householder vectors for the QR step. |
| private void | performDoubleQRStep(final int
the index of the small sub-diagonal element il, final int the start index for the QR step im, final int the current eigenvalue index iu, final SchurTransformer.shift information holder shift,the initial houseHolder vector hVec)Perform a double QR step involving rows l:idx and columns m:n |
| private void |
| cachedP | back to summary |
|---|---|
| private RealMatrix cachedP Cached value of P. | |
| cachedPt | back to summary |
|---|---|
| private RealMatrix cachedPt Cached value of PT. | |
| cachedT | back to summary |
|---|---|
| private RealMatrix cachedT Cached value of T. | |
| epsilon | back to summary |
|---|---|
| private final double epsilon Epsilon criteria taken from JAMA code (originally was 2^-52). | |
| matrixP | back to summary |
|---|---|
| private final double[][] matrixP P matrix. | |
| matrixT | back to summary |
|---|---|
| private final double[][] matrixT T matrix. | |
| MAX_ITERATIONS | back to summary |
|---|---|
| private static final int MAX_ITERATIONS Maximum allowed iterations for convergence of the transformation. | |
| SchurTransformer | back to summary |
|---|---|
| pack-priv SchurTransformer(final RealMatrix matrix) Build the transformation to Schur form of a general real matrix.
| |
| computeShift | back to summary |
|---|---|
| private void computeShift(final int l, final int idx, final int iteration, final SchurTransformer. Compute the shift for the current iteration.
| |
| findSmallSubDiagonalElement | back to summary |
|---|---|
| private int findSmallSubDiagonalElement(final int startIdx, final double norm) Find the first small sub-diagonal element and returns its index.
| |
| getNorm | back to summary |
|---|---|
| private double getNorm() Computes the L1 norm of the (quasi-)triangular matrix T.
| |
| getP | back to summary |
|---|---|
| public RealMatrix getP() Returns the matrix P of the transform. P is an orthogonal matrix, i.e. its inverse is also its transpose.
| |
| getPT | back to summary |
|---|---|
| public RealMatrix getPT() Returns the transpose of the matrix P of the transform. P is an orthogonal matrix, i.e. its inverse is also its transpose.
| |
| getT | back to summary |
|---|---|
| public RealMatrix getT() Returns the quasi-triangular Schur matrix T of the transform.
| |
| initQRStep | back to summary |
|---|---|
| private int initQRStep(int il, final int iu, final SchurTransformer. Initialize the householder vectors for the QR step.
| |
| performDoubleQRStep | back to summary |
|---|---|
| private void performDoubleQRStep(final int il, final int im, final int iu, final SchurTransformer. Perform a double QR step involving rows l:idx and columns m:n
| |
| transform | back to summary |
|---|---|
| private void transform() Transform original matrix to Schur form.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv double | exShift
Indicates an exceptional shift. |
| pack-priv double | w
w shift info |
| pack-priv double | x
x shift info |
| pack-priv double | y
y shift info |
| Access | Constructor and Description |
|---|---|
| private |
| exShift | back to summary |
|---|---|
| pack-priv double exShift Indicates an exceptional shift. | |
| w | back to summary |
|---|---|
| pack-priv double w w shift info | |
| x | back to summary |
|---|---|
| pack-priv double x x shift info | |
| y | back to summary |
|---|---|
| pack-priv double y y shift info | |
| ShiftInfo | back to summary |
|---|---|
| private ShiftInfo() | |