public class DMatrixQrd
extends java.lang.Object
The QR decomposition is constructed even if the matrix A is rank deficient. However, the primary use of the QR decomposition is for least-squares solutions of non-square systems of linear equations, and such solutions are feasible only if the matrix A is of full rank.
Constructor and Description |
---|
DMatrixQrd(DMatrix a)
Constructs a QR decomposition for the specified matrix A.
|
Modifier and Type | Method and Description |
---|---|
DMatrix |
getQ()
Gets the m-by-n matrix factor Q.
|
DMatrix |
getR()
Gets the upper triangular n-by-n matrix factor R.
|
boolean |
isFullRank()
Determines whether the matrix A = Q*R is of full rank.
|
DMatrix |
solve(DMatrix b)
Returns the least-squares solution X of the system A*X = B.
|
public DMatrixQrd(DMatrix a)
a
- the m-by-n matrix A with m>=n.public boolean isFullRank()
public DMatrix getQ()
public DMatrix getR()
public DMatrix solve(DMatrix b)
b
- a matrix of right-hand-side vectors. This matrix must
have the same number (m) of rows as the matrix A, but may have
any number of columns.java.lang.IllegalStateException
- if A is rank-deficient.