library: libMatrix #include "TDecompChol.h"

# TDecompChol

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

## class TDecompChol : public TDecompBase

| Inheritance Chart:

`TObject`

<-

`TDecompBase`

<-

`TDecompChol`

        protected:

          virtual const TMatrixDBase& GetDecompMatrix() const

        public:

                           TDecompChol()
                           TDecompChol(Int_t nrows)
                           TDecompChol(Int_t row_lwb, Int_t row_upb)
                           TDecompChol(const TMatrixDSym& a, Double_t tol = 0.0)
                           TDecompChol(const TMatrixD& a, Double_t tol = 0.0)
                           TDecompChol(const TDecompChol& another)
                   virtual ~TDecompChol()
            static TClass* Class()
          virtual Double_t Condition()
            virtual Bool_t Decompose()
              virtual void Det(Double_t& d1, Double_t& d2)
            const TMatrixD GetMatrix() const
             virtual Int_t GetNcols() const
             virtual Int_t GetNrows() const
           const TMatrixD& GetU() const
           virtual TClass* IsA() const
              TDecompChol& operator=(const TDecompChol& source)
              virtual void Print(Option_t* opt) const
              virtual void SetMatrix(const TMatrixDSym& a)
              virtual void ShowMembers(TMemberInspector& insp, char* parent)
            virtual Bool_t Solve(TVectorD& b)
          virtual TVectorD Solve(const TVectorD& b, Bool_t& ok)
            virtual Bool_t Solve(TMatrixDColumn& b)
              virtual void Streamer(TBuffer& b)
                      void StreamerNVirtual(TBuffer& b)
            virtual Bool_t TransSolve(TVectorD& b)
          virtual TVectorD TransSolve(const TVectorD& b, Bool_t& ok)
            virtual Bool_t TransSolve(TMatrixDColumn& b)

### Data Members

        protected:

          TMatrixD fA  storage for the matrix to be decomposed
          TMatrixD fU  decomposed matrix fU so that a = fU^T fU

## Class Description

     Cholesky Decomposition class

     Decompose a symmetric, positive definite matrix A = U^T * U

     where U is a upper triangular matrix

     The decomposition fails if a diagonal element of fU is <= 0, the
     matrix is not positive negative . The matrix fU is made invalid

TDecompChol(Int_t nrows)

TDecompChol(Int_t row_lwb,Int_t row_upb)

TDecompChol(const TMatrixDSym &a,Double_t tol)

TDecompChol(const TMatrixD &a,Double_t tol)

TDecompChol(const TDecompChol &another) : TDecompBase(another)

Bool_t Decompose()

const TMatrixD GetMatrix()

     Reconstruct the original matrix using the decomposition parts

void SetMatrix(const TMatrixDSym &a)

Bool_t Solve(TVectorD &b)

     Solve equations Ax=b assuming A has been factored by Cholesky. The factor U is
     assumed to be in upper triang of fU. fTol is used to determine if diagonal
     element is zero. The solution is returned in b.

TVectorD Solve(const TVectorD &b,Bool_t &ok)

     Solve equations Ax=b assuming A has been factored by Cholesky. The factor U is
     assumed to be in upper triang of fU. fTol is used to determine if diagonal
     element is zero.

Bool_t Solve(TMatrixDColumn &cb)

Double_t Condition()

void Det(Double_t &d1,Double_t &d2)

     determinant is square of diagProd of cholesky factor

void Print(Option_t *opt) const

### Inline Functions

                           void ~TDecompChol()
            const TMatrixDBase& GetDecompMatrix() const
                    TDecompChol TDecompChol(const TDecompChol& another)
                          Int_t GetNrows() const
                          Int_t GetNcols() const
                const TMatrixD& GetU() const
                         Bool_t TransSolve(TVectorD& b)
                       TVectorD TransSolve(const TVectorD& b, Bool_t& ok)
                         Bool_t TransSolve(TMatrixDColumn& b)
                   TDecompChol& operator=(const TDecompChol& 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: TDecompChol.cxx,v 1.11 2004/06/13 14:53:15 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *