package JAMA 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.
author Paul Meagher
license PHP v3.0
version 1.1

 Methods

QR Decomposition computed by Householder reflections.

__construct(\matrix $A) : \Structure

Parameters

$A

\matrix

Rectangular matrix

Returns

\Structureto access R and the Householder vectors and compute Q.

Return the Householder vectors

getH() : \Matrix

Returns

\MatrixLower trapezoidal matrix whose columns define the reflections

Generate and return the (economy-sized) orthogonal factor

getQ() : \Matrix

Returns

\Matrixorthogonal factor

Return the upper triangular factor

getR() : \Matrix

Returns

\Matrixupper triangular factor

Is the matrix full rank?

isFullRank() : boolean

Returns

booleantrue if R, and hence A, has full rank, else false.

Least squares solution of A*X = B

solve(\Matrix $B) : \Matrix

Parameters

$B

\Matrix

A Matrix with as many rows as A and any number of columns.

Returns

\MatrixMatrix that minimizes the two norm of Q*R*X-B.

 Properties

 

$QR : array
 

$Rdiag : array
 

$m : integer
 

$n : integer

 Constants

 

MatrixRankException

MatrixRankException