|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface QRDecomposition
All QR algorithms implement this interface.
QR decomposition decomposes a m x n matrix A so that
A = Q %*% R
where
Q is an m x n orthogonal matrix,R is a n x n upper triangular matrix
Alternatively, we can have
A = sqQ %*% tallR
where
sqQ is a square m x m orthogonal matrix,
tallR is a m x n matrix
| Method Summary | |
|---|---|
PermutationMatrix |
P()
Get a copy of P, the pivoting matrix in the QR decomposition. |
Matrix |
Q()
Get a copy of the orthogonal Q matrix in the QR decomposition. |
UpperTriangularMatrix |
R()
Get a copy of the upper triangular matrix R in the QR decomposition. |
int |
rank()
Get the numerical rank of the matrix A as computed by the QR decomposition. |
Matrix |
squareQ()
Get a copy of the square Q matrix. |
Matrix |
tallR()
Get a copy of the tall R matrix. |
| Method Detail |
|---|
PermutationMatrix P()
P, the pivoting matrix in the QR decomposition.
P pivoting matrix in the QR decompositionMatrix Q()
Q matrix in the QR decomposition.
A = QR
Dimension of Q is nrows x ncols, same as A, the matrix to orthogonalize.
Q matrix in the QR decompositionUpperTriangularMatrix R()
R in the QR decomposition.
A = QR
Dimension of R is ncols x ncols, a square matrix.
R in the QR decompositionint rank()
Get the numerical rank of the matrix A as computed by the QR decomposition.
Numerical determination of rank requires a criterion to decide when a value should be treated as zero.
This is a practical choice which depends on both the matrix and the application. For instance, for a matrix with a big first eigenvector, we should accordingly decrease the precision to compute the rank.
You may need to change the precision parameter to accurately compute the rank. See the test cases for example.
AMatrix squareQ()
Q matrix.
This is an arbitrary orthogonal completion of the Q matrix in the QR decomposition.
Dimension is nrows x nrows (square).
A = square_Q %*% tall_R
Q matrixMatrix tallR()
R matrix.
This is completed by binding zero rows beneath the square upper triangular matrix R in the QR decomposition.
Dimension is nrows x ncols. Note that this may no longer be square.
A = square_Q %*% tall_R
R matrix
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||