Maven module :un.api : api-math :
Class : un.impl.math.malgebra.QRDecomposition
Extends/Implements : -
Subclasses : -

QR 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.

Origin : JAMA http://math.nist.gov/javanumerics/jama/ placed in public domain.



Variables : -
Functions : QRDecomposition, isFullRank, getH, getR, getQ, solve




QR Decomposition, computed by Householder reflections.
param  A Rectangular matrix
Structure to access R and the Householder vectors and compute Q.
public void QRDecomposition (Matrix A)


Is the matrix full rank?
return  true if R, and hence A, has full rank.
public boolean isFullRank ()


Return the Householder vectors
return  Lower trapezoidal matrix whose columns define the reflections
public DefaultMatrix getH ()


Return the upper triangular factor
return  R
public DefaultMatrix getR ()


Generate and return the (economy-sized) orthogonal factor
return  Q
public DefaultMatrix getQ ()


Least squares solution of A*X = B
param  B A Matrix with as many rows as A and any number of columns.
return  X that minimizes the two norm of Q*R*X-B.
exception  IllegalArgumentException Matrix row dimensions must agree.
exception  RuntimeException Matrix is rank deficient.
public MatrixRW solve (Matrix B)