org.apache.commons.math.linear
Class QRDecompositionImpl

java.lang.Object
  extended by org.apache.commons.math.linear.QRDecompositionImpl
All Implemented Interfaces:
QRDecomposition

public class QRDecompositionImpl
extends java.lang.Object
implements QRDecomposition

Calculates the QR-decomposition of a matrix. In 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.

Implemented using Householder reflectors.

Since:
1.2
Version:
$Revision: 620312 $ $Date: 2008-02-10 12:28:59 -0700 (Sun, 10 Feb 2008) $
See Also:
MathWorld, Wikipedia

Constructor Summary
QRDecompositionImpl(RealMatrix matrix)
          Calculates the QR decomposition of the given matrix.
 
Method Summary
 RealMatrix getQ()
          Returns the matrix Q of the QR-decomposition.
 RealMatrix getR()
          Returns the matrix R of the QR-decomposition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QRDecompositionImpl

public QRDecompositionImpl(RealMatrix matrix)
Calculates the QR decomposition of the given matrix.

Parameters:
matrix - The matrix to decompose.
Method Detail

getR

public RealMatrix getR()
Returns the matrix R of the QR-decomposition.

Specified by:
getR in interface QRDecomposition
Returns:
the R matrix

getQ

public RealMatrix getQ()
Returns the matrix Q of the QR-decomposition.

Specified by:
getQ in interface QRDecomposition
Returns:
the Q matrix


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.