public class QRP
extends java.lang.Object
A*P = Q*R
where
A(m,n)
, Q(m,m)
, and R(m,n)
, more generally:
A*P = [Q1 Q2] * [R11, R12; 0 R22]
and R22
elements are
negligible.Constructor and Description |
---|
QRP(int m,
int n)
Constructs an empty QR decomposition
|
Modifier and Type | Method and Description |
---|---|
QRP |
factor(Matrix A)
Executes a QR factorization for the given matrix.
|
static QRP |
factorize(Matrix A)
Convenience method to compute a QR decomposition
|
Matrix |
getP()
Returns the column pivoting matrix.
|
int[] |
getPVector()
Returns the column pivoting vector.
|
DenseMatrix |
getQ()
Returns the orthogonal matrix
|
DenseMatrix |
getR()
Returns the upper triangular factor
|
int |
getRank()
Returns the rank of the factored matrix
|
public QRP(int m, int n)
m
- the number of rows.n
- the number of columns.public static QRP factorize(Matrix A)
A
- the matrix to decompose (not modified)public QRP factor(Matrix A)
A
- the matrix to be factored (not modified)public DenseMatrix getR()
public DenseMatrix getQ()
public int[] getPVector()
getP()
.public Matrix getP()
getPVector()
.public int getRank()