public class QRDecomposition extends Object implements Destroyable
m x n matrix A with m >= n, the QR decomposition
is an m x n orthogonal matrix Q and an n x n upper
triangular matrix R so that A = Q*R.| Constructor and Description |
|---|
QRDecomposition(Matrix mtx)
Constructs a new QR decomposition object computed by Householder reflections.
|
QRDecomposition(Matrix mtx,
double threshold)
Constructs a new QR decomposition object computed by Householder reflections.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys object if managed outside of JVM.
|
Matrix |
getQ()
Gets orthogonal factor
Q. |
Matrix |
getR()
Gets triangular factor
R. |
boolean |
hasFullRank()
Returns whether the matrix
A has full rank. |
Matrix |
solve(Matrix mtx)
Least squares solution of
A*X = B; returns X. |
Vector |
solve(Vector vec)
Least squares solution of
A*X = B; returns X. |
String |
toString()
Returns a rough string rendition of a QR.
|
public QRDecomposition(Matrix mtx)
mtx - A rectangular matrix.public QRDecomposition(Matrix mtx, double threshold)
mtx - A rectangular matrix.threshold - Value used for detecting singularity of R matrix in decomposition.public void destroy()
destroy in interface Destroyablepublic Matrix getQ()
Q.public Matrix getR()
R.public boolean hasFullRank()
A has full rank.R, and hence A , has full rank.public Matrix solve(Matrix mtx)
A*X = B; returns X.mtx - A matrix with as many rows as A and any number of cols.X< that minimizes the two norm of Q*R*X - B.IllegalArgumentException - if B.rows() != A.rows().public Vector solve(Vector vec)
A*X = B; returns X.vec - A vector with as many rows as A.X< that minimizes the two norm of Q*R*X - B.IllegalArgumentException - if B.rows() != A.rows().
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018