library: libMatrix
#include "TDecompQRH.h"

TDecompQRH


class description - source file - inheritance tree (.pdf)

class TDecompQRH : public TDecompBase

Inheritance Chart:
TObject
<-
TDecompBase
<-
TDecompQRH

    protected:
virtual const TMatrixTBase& GetDecompMatrix() const static Bool_t QRH(TMatrixT& q, TVectorT& diagR, TVectorT& up, TVectorT& w, Double_t tol) public:
TDecompQRH() TDecompQRH(Int_t nrows, Int_t ncols) TDecompQRH(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb) TDecompQRH(const TMatrixT& m, Double_t tol = 0.0) TDecompQRH(const TDecompQRH& another) virtual ~TDecompQRH() static TClass* Class() virtual Bool_t Decompose() virtual void Det(Double_t& d1, Double_t& d2) virtual Int_t GetNcols() const virtual Int_t GetNrows() const virtual const TMatrixT& GetQ() const virtual const TMatrixT& GetR() const virtual const TVectorT& GetUp() const virtual const TVectorT& GetW() const void Invert(TMatrixT& inv) TMatrixT Invert() virtual TClass* IsA() const TDecompQRH& operator=(const TDecompQRH& source) virtual void Print(Option_t* opt = "") const virtual void SetMatrix(const TMatrixT& a) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Bool_t Solve(TVectorT& b) virtual TVectorT Solve(const TVectorT& b, Bool_t& ok) virtual Bool_t Solve(TMatrixTColumn& b) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual Bool_t TransSolve(TVectorT& b) virtual TVectorT TransSolve(const TVectorT& b, Bool_t& ok) virtual Bool_t TransSolve(TMatrixTColumn& b)

Data Members


    protected:
TMatrixT fQ (m x n) - orthogonal matrix TMatrixT fR (n x n) - upper triangular matrix TVectorT fUp (n) - vector with Householder up's TVectorT fW (n) - vector with Householder beta's public:
static const enum TDecompQRH:: kWorkMax

Class Description

                                                                       
 QR Decomposition class                                                
                                                                       
 Decompose  a general (m x n) matrix A into A = fQ fR H   where        
                                                                       
  fQ : (m x n) - orthogonal matrix                                     
  fR : (n x n) - upper triangular matrix                               
  H  : HouseHolder matrix which is stored through                      
  fUp: (n) - vector with Householder up's                              
  fW : (n) - vector with Householder beta's                            
                                                                       
  If row/column index of A starts at (rowLwb,colLwb) then              
  the decomposed matrices start from :                                 
  fQ  : (rowLwb,0)                                                     
  fR  : (0,colLwb)                                                     
  and the decomposed vectors start from :                              
  fUp : (0)                                                            
  fW  : (0)                                                            
                                                                       
 Errors arise from formation of reflectors i.e. singularity .          
 Note it attempts to handle the cases where the nRow <= nCol .         
                                                                       


TDecompQRH(Int_t nrows,Int_t ncols)

TDecompQRH(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb)

TDecompQRH(const TMatrixT &a,Double_t tol)

TDecompQRH(const TDecompQRH &another) : TDecompBase(another)

Bool_t Decompose()
 QR decomposition of matrix a by Householder transformations,
  see Golub & Loan first edition p41 & Sec 6.2.
 First fR is returned in upper triang of fQ and diagR. fQ returned in
 'u-form' in lower triang of fQ and fW, the latter containing the
  "Householder betas".

Bool_t QRH(TMatrixT &q,TVectorT &diagR,TVectorT &up,TVectorT &w,Double_t tol)

void SetMatrix(const TMatrixT &a)

Bool_t Solve(TVectorT &b)
 Solve Ax=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
 has *not* been transformed.  Solution returned in b.

Bool_t Solve(TMatrixTColumn &cb)

Bool_t TransSolve(TVectorT &b)
 Solve A^T x=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
 has *not* been transformed.  Solution returned in b.

Bool_t TransSolve(TMatrixTColumn &cb)

void Det(Double_t &d1,Double_t &d2)
 This routine calculates the absolute (!) value of the determinant

void Invert(TMatrixT &inv)
 For a matrix A(m,n), its inverse A_inv is defined as A * A_inv = A_inv * A = unit
 The user should always supply a matrix of size (m x m) !
 If m > n , only the (n x m) part of the returned (pseudo inverse) matrix
 should be used .

TMatrixT Invert()
 For a matrix A(m,n), its inverse A_inv is defined as A * A_inv = A_inv * A = unit
 (n x m) Ainv is returned .

void Print(Option_t *opt) const



Inline Functions


                       void ~TDecompQRH()
        const TMatrixTBase& GetDecompMatrix() const
                 TDecompQRH TDecompQRH(const TDecompQRH& another)
                      Int_t GetNrows() const
                      Int_t GetNcols() const
            const TMatrixT& GetQ() const
            const TMatrixT& GetR() const
            const TVectorT& GetUp() const
            const TVectorT& GetW() const
                     Bool_t Solve(TMatrixTColumn& b)
                     Bool_t TransSolve(TMatrixTColumn& b)
                TDecompQRH& operator=(const TDecompQRH& source)
                    TClass* Class()
                    TClass* IsA() const
                       void ShowMembers(TMemberInspector& insp, char* parent)
                       void Streamer(TBuffer& b)
                       void StreamerNVirtual(TBuffer& b)


Last update: root/matrix:$Name: $:$Id: TDecompQRH.cxx,v 1.17 2005/02/15 16:17:09 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.