|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.linear.BiDiagonalTransformer
class BiDiagonalTransformer
Class transforming any matrix to bi-diagonal shape.
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.
Field Summary | |
---|---|
private RealMatrix |
cachedB
Cached value of B. |
private RealMatrix |
cachedU
Cached value of U. |
private RealMatrix |
cachedV
Cached value of V. |
private double[][] |
householderVectors
Householder vectors. |
private double[] |
main
Main diagonal. |
private double[] |
secondary
Secondary diagonal. |
Constructor Summary | |
---|---|
BiDiagonalTransformer(RealMatrix matrix)
Build the transformation to bi-diagonal shape of a matrix. |
Method Summary | |
---|---|
RealMatrix |
getB()
Returns the bi-diagonal matrix B of the transform. |
(package private) double[][] |
getHouseholderVectorsRef()
Get the Householder vectors of the transform. |
(package private) double[] |
getMainDiagonalRef()
Get the main diagonal elements of the matrix B of the transform. |
(package private) double[] |
getSecondaryDiagonalRef()
Get the secondary diagonal elements of the matrix B of the transform. |
RealMatrix |
getU()
Returns the matrix U of the transform. |
RealMatrix |
getV()
Returns the matrix V of the transform. |
(package private) boolean |
isUpperBiDiagonal()
Check if the matrix is transformed to upper bi-diagonal. |
private void |
transformToLowerBiDiagonal()
Transform original matrix to lower bi-diagonal form. |
private void |
transformToUpperBiDiagonal()
Transform original matrix to upper bi-diagonal form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final double[][] householderVectors
private final double[] main
private final double[] secondary
private RealMatrix cachedU
private RealMatrix cachedB
private RealMatrix cachedV
Constructor Detail |
---|
public BiDiagonalTransformer(RealMatrix matrix)
matrix
- the matrix to transform.Method Detail |
---|
public RealMatrix getU()
U is an orthogonal matrix, i.e. its transpose is also its inverse.
public RealMatrix getB()
public RealMatrix getV()
V is an orthogonal matrix, i.e. its transpose is also its inverse.
double[][] getHouseholderVectorsRef()
Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
double[] getMainDiagonalRef()
Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
double[] getSecondaryDiagonalRef()
Note that since this class is only intended for internal use, it returns directly a reference to its internal arrays, not a copy.
boolean isUpperBiDiagonal()
private void transformToUpperBiDiagonal()
Transformation is done using alternate Householder transforms on columns and rows.
private void transformToLowerBiDiagonal()
Transformation is done using alternate Householder transforms on rows and columns.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |