public class QRDecompositionImpl extends java.lang.Object implements QRDecomposition
The QR-decomposition of a matrix A consists of two matrices Q and R that satisfy: A = QR, Q is orthogonal (QTQ = I), and R is upper triangular. If A is m×n, Q is m×m and R m×n.
This class compute the decomposition using Householder reflectors.
For efficiency purposes, the decomposition in packed form is transposed. This allows inner loop to iterate inside rows, which is much more cache-efficient in Java.
Constructor and Description |
---|
QRDecompositionImpl(RealMatrix matrix)
Calculates the QR-decomposition of the given matrix.
|
Modifier and Type | Method and Description |
---|---|
RealMatrix |
getH()
Returns the Householder reflector vectors.
|
RealMatrix |
getQ()
Returns the matrix Q of the decomposition.
|
RealMatrix |
getQT()
Returns the transpose of the matrix Q of the decomposition.
|
RealMatrix |
getR()
Returns the matrix R of the decomposition.
|
DecompositionSolver |
getSolver()
Get a solver for finding the A × X = B solution in least square sense.
|
public QRDecompositionImpl(RealMatrix matrix)
matrix
- The matrix to decompose.public RealMatrix getR()
R is an upper-triangular matrix
getR
in interface QRDecomposition
public RealMatrix getQ()
Q is an orthogonal matrix
getQ
in interface QRDecomposition
public RealMatrix getQT()
Q is an orthogonal matrix
getQT
in interface QRDecomposition
public RealMatrix getH()
H is a lower trapezoidal matrix whose columns represent each successive Householder reflector vector. This matrix is used to compute Q.
getH
in interface QRDecomposition
public DecompositionSolver getSolver()
getSolver
in interface QRDecomposition
Copyright © 2010 - 2020 Adobe. All Rights Reserved