public class BidiagonalDecompositionTall extends Object implements BidiagonalDecomposition<DenseMatrix64F>
BidiagonalDecomposition specifically designed for tall matrices.
First step is to perform QR decomposition on the input matrix. Then R is decomposed using
a bidiagonal decomposition. By performing the bidiagonal decomposition on the smaller matrix
computations can be saved if m/n > 5/3 and if U is NOT needed.
A = [Q1 Q2][U1 0; 0 I] [B1;0] VT
U=[Q1*U1 Q2]
B=[B1;0]
A = U*B*VT
A QRP decomposition is used internally. That decomposition relies an a fixed threshold for selecting singular values and is known to be less stable than SVD. There is the potential for a degregation of stability by using BidiagonalDecompositionTall instead of BidiagonalDecomposition. A few simple tests have shown that loss in stability to be insignificant.
See page 404 in "Fundamentals of Matrix Computations", 2nd by David S. Watkins.
| Constructor and Description |
|---|
BidiagonalDecompositionTall() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
decompose(DenseMatrix64F orig)
Computes the decomposition of the input matrix.
|
DenseMatrix64F |
getB(DenseMatrix64F B,
boolean compact)
Returns the bidiagonal matrix.
|
void |
getDiagonal(double[] diag,
double[] off)
Extracts the diagonal and off diagonal elements from the decomposition.
|
DenseMatrix64F |
getU(DenseMatrix64F U,
boolean transpose,
boolean compact)
Returns the orthogonal U matrix.
|
DenseMatrix64F |
getV(DenseMatrix64F V,
boolean transpose,
boolean compact)
Returns the orthogonal V matrix.
|
boolean |
inputModified()
Is the input matrix to
DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process. |
public void getDiagonal(double[] diag,
double[] off)
BidiagonalDecompositiongetDiagonal in interface BidiagonalDecomposition<DenseMatrix64F>diag - diagonal elements from B.off - off diagonal elements form B.public DenseMatrix64F getB(DenseMatrix64F B, boolean compact)
BidiagonalDecompositiongetB in interface BidiagonalDecomposition<DenseMatrix64F>B - If not null the results are stored here, if null a new matrix is created.public DenseMatrix64F getU(DenseMatrix64F U, boolean transpose, boolean compact)
BidiagonalDecompositiongetU in interface BidiagonalDecomposition<DenseMatrix64F>U - If not null then the results will be stored here. Otherwise a new matrix will be created.public DenseMatrix64F getV(DenseMatrix64F V, boolean transpose, boolean compact)
BidiagonalDecompositiongetV in interface BidiagonalDecomposition<DenseMatrix64F>V - If not null then the results will be stored here. Otherwise a new matrix will be created.public boolean decompose(DenseMatrix64F orig)
DecompositionInterfaceDecompositionInterface.inputModified() will return true and the matrix should not be
modified until the decomposition is no longer needed.decompose in interface DecompositionInterface<DenseMatrix64F>orig - The matrix which is being decomposed. Modification is implementation dependent.public boolean inputModified()
DecompositionInterfaceDecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process.inputModified in interface DecompositionInterface<DenseMatrix64F>Copyright © 2013. All Rights Reserved.