MyraMath
Classes
geqrf.h File Reference

Routines to compute a Householder QR decomposition. More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
#include <myramath/dense/Vector.h>
Include dependency graph for geqrf.h:

Go to the source code of this file.

Classes

class  myra::CMatrixRange< Number >
 Represents a const MatrixRange. More...
 
class  myra::MatrixRange< Number >
 Represents a mutable MatrixRange. More...
 

Functions

Vector< NumberS > myra::geqrf_inplace (const MatrixRange< NumberS > &A)
 Factors A=QR, overwriting triu(A) with R and tril(A) with Householder reflectors. Returns tau[].
 
Vector< NumberD > myra::geqrf_inplace (const MatrixRange< NumberD > &A)
 Factors A=QR, overwriting triu(A) with R and tril(A) with Householder reflectors. Returns tau[].
 
Vector< NumberC > myra::geqrf_inplace (const MatrixRange< NumberC > &A)
 Factors A=QR, overwriting triu(A) with R and tril(A) with Householder reflectors. Returns tau[].
 
Vector< NumberZ > myra::geqrf_inplace (const MatrixRange< NumberZ > &A)
 Factors A=QR, overwriting triu(A) with R and tril(A) with Householder reflectors. Returns tau[].
 

Detailed Description

Routines to compute a Householder QR decomposition.

The orthogonal matrix Q is not tabulated explicitly, rather it 
is stored in factored form (a rank-K perturbation of the identity,
a product of rank-1 Householder reflectors). This factored form 
overwrites the strictly lower triangle portion of the input A. 
The triangular (or trapezoidal) matrix R is tabulated explicity 
and overwrites the upper triangle of A. There are three shapes 
to consider:

Case 1 (A tall/skinny), I > J:
    
                       [\ R ]
    A   =   Q  *   R   [ \  ]
   IxJ     IxI    IxJ  [  \ ]
         (rank J)      [   \]
                       [ H  ]
                       [    ]
                       [    ]

Case 2 (A short/fat), I < J:
   
   A    =   Q  *   R   [\          ]
  IxJ      IxI    IxJ  [ \   R     ]
         (rank I)      [H \        ]

Case 3 (A square), I = J = K:

                       [\  R]
    A   =   Q  *   R   [ \  ]
   KxK     KxK    KxK  [  \ ]
         (rank K)      [H  \]

In all cases, if K = min(I,J), then Q is a rank-K pertubation of the IxI identity, and R is IxJ.