Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TMatrix Class Reference

#include <TMatrix.h>

Inheritance diagram for TMatrix:

Inheritance graph
[legend]
Collaboration diagram for TMatrix:

Collaboration graph
[legend]
List of all members.

Public Types

enum  EMatrixCreatorsOp1 {
  kZero, kUnit, kTransposed, kInverted,
  kInvertedPosDef
}
enum  EMatrixCreatorsOp2 {
  kMult, kTransposeMult, kInvMult, kInvPosDefMult,
  kAtBA
}

Public Methods

 TMatrix ()
 TMatrix (Int_t nrows, Int_t ncols)
 TMatrix (Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb)
 TMatrix (Int_t nrows, Int_t ncols, const Real_t *elements, Option_t *option="")
 TMatrix (Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, const Real_t *elements, Option_t *option="")
 TMatrix (const TMatrix &another)
 TMatrix (EMatrixCreatorsOp1 op, const TMatrix &prototype)
 TMatrix (const TMatrix &a, EMatrixCreatorsOp2 op, const TMatrix &b)
 TMatrix (const TLazyMatrix &lazy_constructor)
virtual ~TMatrix ()
void Draw (Option_t *option="")
void ResizeTo (Int_t nrows, Int_t ncols)
void ResizeTo (Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb)
void ResizeTo (const TMatrix &m)
Bool_t IsValid () const
Bool_t IsSymmetric () const
Int_t GetRowLwb () const
Int_t GetRowUpb () const
Int_t GetNrows () const
Int_t GetColLwb () const
Int_t GetColUpb () const
Int_t GetNcols () const
Int_t GetNoElements () const
const Real_t * GetElements () const
Real_t * GetElements ()
void GetElements (Real_t *elements, Option_t *option="") const
void SetElements (const Real_t *elements, Option_t *option="")
const Real_t & operator() (Int_t rown, Int_t coln) const
Real_t & operator() (Int_t rown, Int_t coln)
const TMatrixRow operator[] (Int_t rown) const
TMatrixRow operator[] (Int_t rown)
TMatrix & operator= (const TMatrix &source)
TMatrix & operator= (const TLazyMatrix &source)
TMatrix & operator= (Real_t val)
TMatrix & operator-= (Double_t val)
TMatrix & operator+= (Double_t val)
TMatrix & operator *= (Double_t val)
Bool_t operator== (Real_t val) const
Bool_t operator!= (Real_t val) const
Bool_t operator< (Real_t val) const
Bool_t operator<= (Real_t val) const
Bool_t operator> (Real_t val) const
Bool_t operator>= (Real_t val) const
TMatrix & Zero ()
TMatrix & Abs ()
TMatrix & Sqr ()
TMatrix & Sqrt ()
TMatrix & Apply (const TElementAction &action)
TMatrix & Apply (const TElementPosAction &action)
TMatrix & Invert (Double_t *determ_ptr=0)
TMatrix & InvertPosDef ()
const TMatrix EigenVectors (TVector &eigenValues) const
TMatrix & MakeSymmetric ()
TMatrix & UnitMatrix ()
TMatrix & operator *= (const TMatrix &source)
TMatrix & operator *= (const TMatrixDiag &diag)
TMatrix & operator/= (const TMatrixDiag &diag)
TMatrix & operator *= (const TMatrixRow &row)
TMatrix & operator/= (const TMatrixRow &row)
TMatrix & operator *= (const TMatrixColumn &col)
TMatrix & operator/= (const TMatrixColumn &col)
void Mult (const TMatrix &a, const TMatrix &b)
Double_t RowNorm () const
Double_t NormInf () const
Double_t ColNorm () const
Double_t Norm1 () const
Double_t E2Norm () const
TMatrix & NormByDiag (const TVector &v, Option_t *option="D")
TMatrix & NormByColumn (const TVector &v, Option_t *option="D")
TMatrix & NormByRow (const TVector &v, Option_t *option="D")
Double_t Determinant () const
void Print (Option_t *option="") const

Protected Methods

void Allocate (Int_t nrows, Int_t ncols, Int_t row_lwb=0, Int_t col_lwb=0)
 index[i] = &matrix(0,i) (col index)

void Invalidate ()
void Transpose (const TMatrix &m)
void Invert (const TMatrix &m)
void InvertPosDef (const TMatrix &m)
void AMultB (const TMatrix &a, const TMatrix &b)
void AtMultB (const TMatrix &a, const TMatrix &b)

Static Protected Methods

Int_t Pdcholesky (const Real_t *a, Real_t *u, const Int_t n)
void MakeTridiagonal (TMatrix &a, TVector &d, TVector &e)
void MakeEigenVectors (TVector &d, TVector &e, TMatrix &z)
void EigenSort (TMatrix &eigenVectors, TVector &eigenValues)

Protected Attributes

Int_t fNrows
Int_t fNcols
Int_t fNelems
Int_t fRowLwb
Int_t fColLwb
Real_t * fElements
Real_t ** fIndex

Friends

class TVector
class TMatrixRow
class TMatrixColumn
class TMatrixDiag
class TMatrixFlat
class TMatrixPivoting
void MakeHaarMatrix (TMatrix &m)
void MakeHilbertMatrix (TMatrix &m)
TMatrix & operator+= (TMatrix &target, const TMatrix &source)
TMatrix & operator-= (TMatrix &target, const TMatrix &source)
TMatrix & Add (TMatrix &target, Double_t scalar, const TMatrix &source)
TMatrix & ElementMult (TMatrix &target, const TMatrix &source)
TMatrix & ElementDiv (TMatrix &target, const TMatrix &source)
TMatrix operator+ (const TMatrix &source1, const TMatrix &source2)
TMatrix operator- (const TMatrix &source1, const TMatrix &source2)
TMatrix operator * (const TMatrix &source1, const TMatrix &source2)
Bool_t operator== (const TMatrix &im1, const TMatrix &im2)
void Compare (const TMatrix &im1, const TMatrix &im2)
Bool_t AreCompatible (const TMatrix &im1, const TMatrix &im2)
Double_t E2Norm (const TMatrix &m1, const TMatrix &m2)

Member Enumeration Documentation

enum TMatrix::EMatrixCreatorsOp1
 

Enumeration values:
kZero 
kUnit 
kTransposed 
kInverted 
kInvertedPosDef 

Definition at line 111 of file TMatrix.h.

enum TMatrix::EMatrixCreatorsOp2
 

Enumeration values:
kMult 
kTransposeMult 
kInvMult 
kInvPosDefMult 
kAtBA 

Definition at line 112 of file TMatrix.h.


Constructor & Destructor Documentation

TMatrix::TMatrix  
 

Definition at line 114 of file TMatrix.h.

References Invalidate().

TMatrix::TMatrix Int_t    nrows,
Int_t    ncols
 

Definition at line 243 of file TMatrix.h.

References Allocate().

TMatrix::TMatrix Int_t    row_lwb,
Int_t    row_upb,
Int_t    col_lwb,
Int_t    col_upb
 

Definition at line 248 of file TMatrix.h.

References Allocate().

TMatrix::TMatrix Int_t    nrows,
Int_t    ncols,
const Real_t *    elements,
Option_t *    option = ""
 

Definition at line 275 of file TMatrix.h.

References Allocate(), and SetElements().

TMatrix::TMatrix Int_t    row_lwb,
Int_t    row_upb,
Int_t    col_lwb,
Int_t    col_upb,
const Real_t *    elements,
Option_t *    option = ""
 

Definition at line 287 of file TMatrix.h.

References Allocate(), and SetElements().

TMatrix::TMatrix const TMatrix &    another
 

Definition at line 372 of file TMatrix.h.

References Allocate(), and TObject::Error().

TMatrix::TMatrix EMatrixCreatorsOp1    op,
const TMatrix &    prototype
 

TMatrix::TMatrix const TMatrix &    a,
EMatrixCreatorsOp2    op,
const TMatrix &    b
 

TMatrix::TMatrix const TLazyMatrix   lazy_constructor
 

Definition at line 316 of file TMatrix.h.

References Allocate(), TLazyMatrix::fColLwb, TLazyMatrix::fColUpb, TLazyMatrix::FillIn(), TLazyMatrix::fRowLwb, and TLazyMatrix::fRowUpb.

virtual TMatrix::~TMatrix   [virtual]
 


Member Function Documentation

void TMatrix::Allocate Int_t    nrows,
Int_t    ncols,
Int_t    row_lwb = 0,
Int_t    col_lwb = 0
[protected]
 

index[i] = &matrix(0,i) (col index)

Referenced by TMatrix().

void TMatrix::Invalidate   [protected]
 

Definition at line 93 of file TMatrix.h.

References fElements, fIndex, fNcols, fNelems, and fNrows.

Referenced by TMatrix().

Int_t TMatrix::Pdcholesky const Real_t *    a,
Real_t *    u,
const Int_t    n
[static, protected]
 

void TMatrix::MakeTridiagonal TMatrix &    a,
TVector   d,
TVector   e
[static, protected]
 

void TMatrix::MakeEigenVectors TVector   d,
TVector   e,
TMatrix &    z
[static, protected]
 

void TMatrix::EigenSort TMatrix &    eigenVectors,
TVector   eigenValues
[static, protected]
 

void TMatrix::Transpose const TMatrix &    m [protected]
 

void TMatrix::Invert const TMatrix &    m [protected]
 

void TMatrix::InvertPosDef const TMatrix &    m [protected]
 

void TMatrix::AMultB const TMatrix &    a,
const TMatrix &    b
[protected]
 

void TMatrix::AtMultB const TMatrix &    a,
const TMatrix &    b
[protected]
 

void TMatrix::Draw Option_t *    option = "" [virtual]
 

Reimplemented from TObject.

void TMatrix::ResizeTo Int_t    nrows,
Int_t    ncols
 

Referenced by ResizeTo().

void TMatrix::ResizeTo Int_t    row_lwb,
Int_t    row_upb,
Int_t    col_lwb,
Int_t    col_upb
 

void TMatrix::ResizeTo const TMatrix &    m
 

Definition at line 381 of file TMatrix.h.

References GetColLwb(), GetColUpb(), GetRowLwb(), GetRowUpb(), and ResizeTo().

Bool_t TMatrix::IsValid   const
 

Definition at line 230 of file TMatrix.h.

References fNrows.

Referenced by Apply(), AreCompatible(), GetElements(), operator=(), SetElements(), TMatrixColumn::TMatrixColumn(), TMatrixRow::TMatrixRow(), and Zero().

Bool_t TMatrix::IsSymmetric   const
 

Int_t TMatrix::GetRowLwb   const
 

Definition at line 135 of file TMatrix.h.

References fRowLwb.

Referenced by operator=(), and ResizeTo().

Int_t TMatrix::GetRowUpb   const
 

Definition at line 136 of file TMatrix.h.

References fNrows, and fRowLwb.

Referenced by operator=(), and ResizeTo().

Int_t TMatrix::GetNrows   const
 

Definition at line 137 of file TMatrix.h.

References fNrows.

Int_t TMatrix::GetColLwb   const
 

Definition at line 138 of file TMatrix.h.

References fColLwb.

Referenced by operator=(), and ResizeTo().

Int_t TMatrix::GetColUpb   const
 

Definition at line 139 of file TMatrix.h.

References fColLwb, and fNcols.

Referenced by operator=(), and ResizeTo().

Int_t TMatrix::GetNcols   const
 

Definition at line 140 of file TMatrix.h.

References fNcols.

Int_t TMatrix::GetNoElements   const
 

Definition at line 141 of file TMatrix.h.

References fNelems.

const Real_t* TMatrix::GetElements   const
 

Definition at line 142 of file TMatrix.h.

References fElements.

Real_t* TMatrix::GetElements  
 

Definition at line 143 of file TMatrix.h.

References fElements.

void TMatrix::GetElements Real_t *    elements,
Option_t *    option = ""
const
 

Definition at line 294 of file TMatrix.h.

References TString::Contains(), TObject::Error(), fElements, fNcols, fNelems, fNrows, IsValid(), and TString::ToUpper().

void TMatrix::SetElements const Real_t *    elements,
Option_t *    option = ""
 

Definition at line 253 of file TMatrix.h.

References TString::Contains(), TObject::Error(), fElements, fNcols, fNelems, fNrows, IsValid(), and TString::ToUpper().

Referenced by TMatrix().

const Real_t& TMatrix::operator() Int_t    rown,
Int_t    coln
const
 

Real_t & TMatrix::operator() Int_t    rown,
Int_t    coln
 

Definition at line 386 of file TMatrix.h.

const TMatrixRow TMatrix::operator[] Int_t    rown const
 

TMatrixRow TMatrix::operator[] Int_t    rown
 

TMatrix & TMatrix::operator= const TMatrix &    source
 

Definition at line 363 of file TMatrix.h.

References AreCompatible, fElements, fNelems, and TObject::operator=().

TMatrix & TMatrix::operator= const TLazyMatrix   source
 

Definition at line 324 of file TMatrix.h.

References TObject::Error(), TLazyMatrix::fColLwb, TLazyMatrix::fColUpb, TLazyMatrix::FillIn(), TLazyMatrix::fRowLwb, TLazyMatrix::fRowUpb, GetColLwb(), GetColUpb(), GetRowLwb(), GetRowUpb(), and IsValid().

TMatrix& TMatrix::operator= Real_t    val
 

TMatrix& TMatrix::operator-= Double_t    val
 

TMatrix& TMatrix::operator+= Double_t    val
 

TMatrix& TMatrix::operator *= Double_t    val
 

Bool_t TMatrix::operator== Real_t    val const
 

Bool_t TMatrix::operator!= Real_t    val const
 

Bool_t TMatrix::operator< Real_t    val const
 

Bool_t TMatrix::operator<= Real_t    val const
 

Bool_t TMatrix::operator> Real_t    val const
 

Bool_t TMatrix::operator>= Real_t    val const
 

TMatrix & TMatrix::Zero  
 

Definition at line 401 of file TMatrix.h.

References TObject::Error(), fElements, fNelems, and IsValid().

TMatrix& TMatrix::Abs  
 

TMatrix& TMatrix::Sqr  
 

TMatrix& TMatrix::Sqrt  
 

TMatrix & TMatrix::Apply const TElementAction   action
 

Definition at line 410 of file TMatrix.h.

References TObject::Error(), fElements, fNelems, IsValid(), and TElementAction::Operation().

TMatrix & TMatrix::Apply const TElementPosAction   action
 

Definition at line 420 of file TMatrix.h.

References Assert, TObject::Error(), fColLwb, fElements, TElementPosAction::fI, TElementPosAction::fJ, fNcols, fNelems, fNrows, fRowLwb, IsValid(), and TElementPosAction::Operation().

TMatrix& TMatrix::Invert Double_t *    determ_ptr = 0
 

TMatrix& TMatrix::InvertPosDef  
 

const TMatrix TMatrix::EigenVectors TVector   eigenValues const
 

TMatrix& TMatrix::MakeSymmetric  
 

TMatrix& TMatrix::UnitMatrix  
 

TMatrix& TMatrix::operator *= const TMatrix &    source
 

TMatrix& TMatrix::operator *= const TMatrixDiag   diag
 

TMatrix& TMatrix::operator/= const TMatrixDiag   diag
 

TMatrix& TMatrix::operator *= const TMatrixRow   row
 

TMatrix& TMatrix::operator/= const TMatrixRow   row
 

TMatrix& TMatrix::operator *= const TMatrixColumn   col
 

TMatrix& TMatrix::operator/= const TMatrixColumn   col
 

void TMatrix::Mult const TMatrix &    a,
const TMatrix &    b
 

Double_t TMatrix::RowNorm   const
 

Referenced by NormInf().

Double_t TMatrix::NormInf   const
 

Definition at line 193 of file TMatrix.h.

References RowNorm().

Double_t TMatrix::ColNorm   const
 

Referenced by Norm1().

Double_t TMatrix::Norm1   const
 

Definition at line 195 of file TMatrix.h.

References ColNorm().

Double_t TMatrix::E2Norm   const
 

TMatrix& TMatrix::NormByDiag const TVector   v,
Option_t *    option = "D"
 

TMatrix& TMatrix::NormByColumn const TVector   v,
Option_t *    option = "D"
 

TMatrix& TMatrix::NormByRow const TVector   v,
Option_t *    option = "D"
 

Double_t TMatrix::Determinant   const
 

void TMatrix::Print Option_t *    option = "" const [virtual]
 

Reimplemented from TObject.


Friends And Related Function Documentation

friend class TVector [friend]
 

Definition at line 76 of file TMatrix.h.

friend class TMatrixRow [friend]
 

Definition at line 77 of file TMatrix.h.

friend class TMatrixColumn [friend]
 

Definition at line 78 of file TMatrix.h.

friend class TMatrixDiag [friend]
 

Definition at line 79 of file TMatrix.h.

friend class TMatrixFlat [friend]
 

Definition at line 80 of file TMatrix.h.

friend class TMatrixPivoting [friend]
 

Definition at line 81 of file TMatrix.h.

void MakeHaarMatrix TMatrix &    m [friend]
 

void MakeHilbertMatrix TMatrix &    m [friend]
 

TMatrix& operator+= TMatrix &    target,
const TMatrix &    source
[friend]
 

TMatrix& operator-= TMatrix &    target,
const TMatrix &    source
[friend]
 

TMatrix& Add TMatrix &    target,
Double_t    scalar,
const TMatrix &    source
[friend]
 

TMatrix& ElementMult TMatrix &    target,
const TMatrix &    source
[friend]
 

TMatrix& ElementDiv TMatrix &    target,
const TMatrix &    source
[friend]
 

TMatrix operator+ const TMatrix &    source1,
const TMatrix &    source2
[friend]
 

TMatrix operator- const TMatrix &    source1,
const TMatrix &    source2
[friend]
 

TMatrix operator * const TMatrix &    source1,
const TMatrix &    source2
[friend]
 

Bool_t operator== const TMatrix &    im1,
const TMatrix &    im2
[friend]
 

void Compare const TMatrix &    im1,
const TMatrix &    im2
[friend]
 

Bool_t AreCompatible const TMatrix &    im1,
const TMatrix &    im2
[friend]
 

Definition at line 343 of file TMatrix.h.

Referenced by operator=().

Double_t E2Norm const TMatrix &    m1,
const TMatrix &    m2
[friend]
 


Member Data Documentation

Int_t TMatrix::fNrows [protected]
 

Definition at line 84 of file TMatrix.h.

Referenced by Apply(), AreCompatible(), GetElements(), GetNrows(), GetRowUpb(), Invalidate(), IsValid(), TMatrixColumn::operator=(), SetElements(), and TMatrixRow::TMatrixRow().

Int_t TMatrix::fNcols [protected]
 

Definition at line 85 of file TMatrix.h.

Referenced by Apply(), AreCompatible(), GetColUpb(), GetElements(), GetNcols(), Invalidate(), SetElements(), and TMatrixColumn::TMatrixColumn().

Int_t TMatrix::fNelems [protected]
 

Definition at line 86 of file TMatrix.h.

Referenced by Apply(), GetElements(), GetNoElements(), Invalidate(), TMatrixFlat::operator=(), TMatrixRow::operator=(), operator=(), SetElements(), and Zero().

Int_t TMatrix::fRowLwb [protected]
 

Definition at line 87 of file TMatrix.h.

Referenced by Apply(), AreCompatible(), GetRowLwb(), GetRowUpb(), and TMatrixRow::TMatrixRow().

Int_t TMatrix::fColLwb [protected]
 

Definition at line 88 of file TMatrix.h.

Referenced by Apply(), AreCompatible(), GetColLwb(), GetColUpb(), and TMatrixColumn::TMatrixColumn().

Real_t* TMatrix::fElements [protected]
 

Definition at line 89 of file TMatrix.h.

Referenced by Apply(), GetElements(), Invalidate(), operator=(), SetElements(), and Zero().

Real_t** TMatrix::fIndex [protected]
 

Definition at line 90 of file TMatrix.h.

Referenced by Invalidate(), TMatrixColumn::TMatrixColumn(), and TMatrixRow::TMatrixRow().


The documentation for this class was generated from the following file:
Generated on Thu Dec 18 15:04:26 2003 for ROOT by doxygen1.2.16