Any m × n matrix A can be written as the product of three matrices: A = U × B × VT with U an m × m orthogonal matrix, B an m × n bi-diagonal matrix (lower diagonal if m < n, upper diagonal otherwise), and V an n × n orthogonal matrix.
Transformation to bi-diagonal shape is often not a goal by itself, but it is
an intermediate step in more general decomposition algorithms like Singular Value 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 | cachedB
Cached value of B. |
| private RealMatrix | cachedU
Cached value of U. |
| private RealMatrix | cachedV
Cached value of V. |
| private final double[][] | householderVectors
Householder vectors. |
| private final double[] | main
Main diagonal. |
| private final double[] | secondary
Secondary diagonal. |
| Access | Constructor and Description |
|---|---|
| pack-priv | BiDiagonalTransformer(RealMatrix
the matrix to transform. matrix)Build the transformation to bi-diagonal shape of a matrix. |
| Modifier and Type | Method and Description |
|---|---|
| public RealMatrix | |
| 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 B matrixGet the main diagonal elements of the matrix B of the transform. |
| pack-priv double[] | Returns: the secondary diagonal elements of the B matrixGet the secondary diagonal elements of the matrix B of the transform. |
| public RealMatrix | |
| public RealMatrix | |
| pack-priv boolean | Returns: true if the matrix is transformed to upper bi-diagonalCheck if the matrix is transformed to upper bi-diagonal. |
| private void | |
| private void |
| cachedB | back to summary |
|---|---|
| private RealMatrix cachedB Cached value of B. | |
| cachedU | back to summary |
|---|---|
| private RealMatrix cachedU Cached value of U. | |
| cachedV | back to summary |
|---|---|
| private RealMatrix cachedV Cached value of V. | |
| 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. | |
| BiDiagonalTransformer | back to summary |
|---|---|
| pack-priv BiDiagonalTransformer(RealMatrix matrix) Build the transformation to bi-diagonal shape of a matrix.
| |
| getB | back to summary |
|---|---|
| public RealMatrix getB() Returns the bi-diagonal matrix B of the transform.
| |
| 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 B 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.
| |
| getSecondaryDiagonalRef | back to summary |
|---|---|
| pack-priv double[] getSecondaryDiagonalRef() Get the secondary diagonal elements of the matrix B 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.
| |
| getU | back to summary |
|---|---|
| public RealMatrix getU() Returns the matrix U of the transform. U is an orthogonal matrix, i.e. its transpose is also its inverse.
| |
| getV | back to summary |
|---|---|
| public RealMatrix getV() Returns the matrix V of the transform. V is an orthogonal matrix, i.e. its transpose is also its inverse.
| |
| isUpperBiDiagonal | back to summary |
|---|---|
| pack-priv boolean isUpperBiDiagonal() Check if the matrix is transformed to upper bi-diagonal.
| |
| transformToLowerBiDiagonal | back to summary |
|---|---|
| private void transformToLowerBiDiagonal() Transform original matrix to lower bi-diagonal form. Transformation is done using alternate Householder transforms on rows and columns. | |
| transformToUpperBiDiagonal | back to summary |
|---|---|
| private void transformToUpperBiDiagonal() Transform original matrix to upper bi-diagonal form. Transformation is done using alternate Householder transforms on columns and rows. | |