A symmetrical m × m matrix A can be written as the product of three matrices: A = Q × T × QT with Q an orthogonal matrix and T a symmetrical tridiagonal matrix. Both Q and T are m × m matrices.
This implementation only uses the upper part of the matrix, the part below the diagonal is not accessed at all.
Transformation to tridiagonal shape 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.
| Modifier and Type | Field and Description |
|---|---|
| private RealMatrix | cachedQ
Cached value of Q. |
| private RealMatrix | cachedQt
Cached value of Qt. |
| private RealMatrix | cachedT
Cached value of T. |
| private final double[][] | householderVectors
Householder vectors. |
| private final double[] | main
Main diagonal. |
| private final double[] | secondary
Secondary diagonal. |
| Access | Constructor and Description |
|---|---|
| pack-priv | TriDiagonalTransformer(RealMatrix
Symmetrical matrix to transform. matrix)Build the transformation to tridiagonal shape of a symmetrical matrix. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv double[][] | Returns: the main diagonal elements of the B matrixGet the Householder vectors of the transform. |
| pack-priv double[] | Returns: the main diagonal elements of the T matrixGet the main diagonal elements of the matrix T of the transform. |
| public RealMatrix | |
| public RealMatrix | |
| pack-priv double[] | Returns: the secondary diagonal elements of the T matrixGet the secondary diagonal elements of the matrix T of the transform. |
| public RealMatrix | |
| private void |
| cachedQ | back to summary |
|---|---|
| private RealMatrix cachedQ Cached value of Q. | |
| cachedQt | back to summary |
|---|---|
| private RealMatrix cachedQt Cached value of Qt. | |
| cachedT | back to summary |
|---|---|
| private RealMatrix cachedT Cached value of T. | |
| householderVectors | back to summary |
|---|---|
| private final double[][] householderVectors Householder vectors. | |
| main | back to summary |
|---|---|
| private final double[] main Main diagonal. | |
| secondary | back to summary |
|---|---|
| private final double[] secondary Secondary diagonal. | |
| TriDiagonalTransformer | back to summary |
|---|---|
| pack-priv TriDiagonalTransformer(RealMatrix matrix) Build the transformation to tridiagonal shape of a symmetrical matrix. The specified matrix is assumed to be symmetrical without any check. Only the upper triangular part of the matrix is used.
| |
| getHouseholderVectorsRef | back to summary |
|---|---|
| pack-priv double[][] getHouseholderVectorsRef() Get the Householder vectors of the transform. Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
| |
| getMainDiagonalRef | back to summary |
|---|---|
| pack-priv double[] getMainDiagonalRef() Get the main diagonal elements of the matrix T of the transform. Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
| |
| getQ | back to summary |
|---|---|
| public RealMatrix getQ() Returns the matrix Q of the transform. Q is an orthogonal matrix, i.e. its transpose is also its inverse.
| |
| getQT | back to summary |
|---|---|
| public RealMatrix getQT() Returns the transpose of the matrix Q of the transform. Q is an orthogonal matrix, i.e. its transpose is also its inverse.
| |
| getSecondaryDiagonalRef | back to summary |
|---|---|
| pack-priv double[] getSecondaryDiagonalRef() Get the secondary diagonal elements of the matrix T of the transform. Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
| |
| getT | back to summary |
|---|---|
| public RealMatrix getT() Returns the tridiagonal matrix T of the transform.
| |
| transform | back to summary |
|---|---|
| private void transform() Transform original matrix to tridiagonal form. Transformation is done using Householder transforms. | |