org.apache.mahout.math
Class OldQRDecomposition

java.lang.Object
  extended by org.apache.mahout.math.OldQRDecomposition
All Implemented Interfaces:
QR

public class OldQRDecomposition
extends Object
implements QR

partially deprecated until unit tests are in place. Until this time, this class/interface is unsupported.


Constructor Summary
OldQRDecomposition(Matrix a)
          Constructs and returns a new QR decomposition object; computed by Householder reflections; The decomposed matrices can be retrieved via instance methods of the returned decomposition object.
 
Method Summary
 Matrix getQ()
          Generates and returns the (economy-sized) orthogonal factor Q.
 Matrix getR()
          Returns the upper triangular factor, R.
 boolean hasFullRank()
          Returns whether the matrix A has full rank.
 Matrix solve(Matrix B)
          Least squares solution of A*X = B; returns X.
 String toString()
          Returns a rough string rendition of a QR.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OldQRDecomposition

public OldQRDecomposition(Matrix a)
Constructs and returns a new QR decomposition object; computed by Householder reflections; The decomposed matrices can be retrieved via instance methods of the returned decomposition object.

Parameters:
a - A rectangular matrix.
Throws:
IllegalArgumentException - if A.rows() < A.columns().
Method Detail

getQ

public Matrix getQ()
Generates and returns the (economy-sized) orthogonal factor Q.

Specified by:
getQ in interface QR
Returns:
Q

getR

public Matrix getR()
Returns the upper triangular factor, R.

Specified by:
getR in interface QR
Returns:
R

hasFullRank

public boolean hasFullRank()
Returns whether the matrix A has full rank.

Specified by:
hasFullRank in interface QR
Returns:
true if R, and hence A, has full rank.

solve

public Matrix solve(Matrix B)
Least squares solution of A*X = B; returns X.

Specified by:
solve in interface QR
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 - if B.rows() != A.rows().

toString

public String toString()
Returns a rough string rendition of a QR.

Overrides:
toString in class Object


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.