- All Implemented Interfaces:
public class QRDecompositionextends Objectimplements SerializableQR Decomposition.
For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n orthogonal matrix Q and an n-by-n upper triangular matrix R so that A = Q*R.
The QR decompostion always exists, even if the matrix does not have full rank, so the constructor will never fail. The primary use of the QR decomposition is in the least squares solution of nonsquare systems of simultaneous linear equations. This will fail if isFullRank() returns false.
- See Also:
- Serialized Form
Constructors Constructor and Description
QRDecomposition(Matrix A)QR Decomposition, computed by Householder reflections.
Methods Modifier and Type Method and Description
getH()Return the Householder vectors
getQ()Generate and return the (economy-sized) orthogonal factor
getR()Return the upper triangular factor
isFullRank()Is the matrix full rank?
solve(Matrix B)Least squares solution of A*X = B
public QRDecomposition(Matrix A)QR Decomposition, computed by Householder reflections. Structure to access R and the Householder vectors and compute Q.
A- Rectangular matrix
public boolean isFullRank()Is the matrix full rank?
- true if R, and hence A, has full rank.
public Matrix getH()Return the Householder vectors
- Lower trapezoidal matrix whose columns define the reflections
public Matrix getR()Return the upper triangular factor
public Matrix getQ()Generate and return the (economy-sized) orthogonal factor
solveLeast squares solution of A*X = B
SCaVis 1.7 © jWork.org