org.ujmp.core.doublematrix.calculation.general.decomposition
Class QR.QRMatrix

java.lang.Object
  extended by org.ujmp.core.doublematrix.calculation.general.decomposition.QR.QRMatrix
Enclosing interface:
QR<T>

public static class QR.QRMatrix
extends Object


Constructor Summary
QR.QRMatrix(Matrix A)
          QR Decomposition, computed by Householder reflections.
 
Method Summary
 Matrix getH()
          Return the Householder vectors
 Matrix getQ()
          Generate and return the (economy-sized) orthogonal factor
 Matrix getR()
          Return the upper triangular factor
 boolean isFullRank()
          Is the matrix full rank?
 Matrix solve(Matrix B)
          Least squares solution of A*X = B
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QR.QRMatrix

public QR.QRMatrix(Matrix A)
QR Decomposition, computed by Householder reflections.

Parameters:
A - Rectangular matrix
Method Detail

isFullRank

public final boolean isFullRank()
Is the matrix full rank?

Returns:
true if R, and hence A, has full rank.

getH

public final Matrix getH()
Return the Householder vectors

Returns:
Lower trapezoidal matrix whose columns define the reflections

getR

public final Matrix getR()
Return the upper triangular factor

Returns:
R

getQ

public final Matrix getQ()
Generate and return the (economy-sized) orthogonal factor

Returns:
Q

solve

public final Matrix solve(Matrix B)
Least squares solution of A*X = B

Parameters:
B - A Matrix with as many rows as A and any number of columns.
Returns:
X that minimizes the two norm of Q*R*X-B.
Throws:
IllegalArgumentException - Matrix row dimensions must agree.
RuntimeException - Matrix is rank deficient.


Copyright © 2010. All Rights Reserved.