library: libMatrix #include "TMatrixFSym.h" |
TMatrixFSym
class description - source file - inheritance tree (.ps)
protected:
virtual void Allocate(Int_t nrows, Int_t ncols, Int_t row_lwb = 0, Int_t col_lwb = 0, Int_t init = 0, Int_t nr_nonzeros = -1)
void AMultA(const TMatrixFSym& a, Int_t constr = 1)
void AtMultA(const TMatrixF& a, Int_t constr = 1)
void AtMultA(const TMatrixFSym& a, Int_t constr = 1)
public:
TMatrixFSym()
TMatrixFSym(Int_t nrows)
TMatrixFSym(Int_t row_lwb, Int_t row_upb)
TMatrixFSym(Int_t nrows, const Float_t* data, Option_t* option)
TMatrixFSym(Int_t row_lwb, Int_t row_upb, const Float_t* data, Option_t* option)
TMatrixFSym(const TMatrixFSym& another)
TMatrixFSym(TMatrixFBase::EMatrixCreatorsOp1 op, const TMatrixFSym& prototype)
TMatrixFSym(TMatrixFBase::EMatrixCreatorsOp1 op, const TMatrixF& prototype)
TMatrixFSym(const TMatrixFSymLazy& lazy_constructor)
TMatrixFSym GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Option_t* option = "S") const
virtual ~TMatrixFSym()
virtual TMatrixFBase& Apply(const TElementActionF& action)
virtual TMatrixFBase& Apply(const TElementPosActionF& action)
static TClass* Class()
virtual void Clear(Option_t*)
virtual Double_t Determinant() const
virtual void Determinant(Double_t& d1, Double_t& d2) const
const TMatrixF EigenVectors(TVectorF& eigenValues) const
virtual const Int_t* GetColIndexArray() const
virtual Int_t* GetColIndexArray()
virtual const Float_t* GetMatrixArray() const
virtual Float_t* GetMatrixArray()
virtual const Int_t* GetRowIndexArray() const
virtual Int_t* GetRowIndexArray()
TMatrixFSym& GetSub(Int_t row_lwb, Int_t row_upb, TMatrixFSym& target, Option_t* option = "S") const
virtual TMatrixFBase& GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, TMatrixFBase& target, Option_t* option = "S") const
virtual TClass* IsA() const
virtual Bool_t IsSymmetric() const
virtual Float_t operator()(Int_t rown, Int_t coln) const
virtual Float_t& operator()(Int_t rown, Int_t coln)
TMatrixFSym& operator*=(Float_t val)
TMatrixFSym& operator+=(Float_t val)
TMatrixFSym& operator+=(const TMatrixFSym& source)
TMatrixFSym& operator-=(Float_t val)
TMatrixFSym& operator-=(const TMatrixFSym& source)
TMatrixFSym& operator=(const TMatrixFSym& source)
TMatrixFSym& operator=(const TMatrixFSymLazy& source)
TMatrixFSym& operator=(Float_t val)
const TMatrixFRow_const operator[](Int_t rown) const
TMatrixFRow operator[](Int_t rown)
virtual TMatrixFBase& Randomize(Float_t alpha, Float_t beta, Double_t& seed)
virtual TMatrixFSym& RandomizePD(Float_t alpha, Float_t beta, Double_t& seed)
virtual TMatrixFBase& ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros = -1)
virtual TMatrixFBase& ResizeTo(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros = -1)
TMatrixFBase& ResizeTo(const TMatrixFSym& m)
virtual TMatrixFBase& SetColIndexArray(Int_t*)
virtual TMatrixFBase& SetMatrixArray(const Float_t* data, Option_t* option)
virtual TMatrixFBase& SetRowIndexArray(Int_t*)
TMatrixFSym& SetSub(Int_t row_lwb, const TMatrixFBase& source)
virtual TMatrixFBase& SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixFBase& source)
virtual TMatrixFBase& Shift(Int_t row_shift, Int_t col_shift)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TMatrixFSym& T()
TMatrixFSym& Transpose(const TMatrixFSym& source)
TMatrixFSym& Use(Int_t nrows, Float_t* data)
TMatrixFSym& Use(Int_t row_lwb, Int_t row_upb, Float_t* data)
TMatrixFSym& Use(TMatrixFSym& a)
protected:
Float_t* fElements ![fNelems] elements themselves
TMatrixFSym
Implementation of a symmetric matrix in the linear algebra package
Note that in this implementation both matrix element m[i][j] and
m[j][i] are updated and stored in memory . However, when making the
object persistent only the upper right triangle is stored .
TMatrixFSym(Int_t no_rows)
TMatrixFSym(Int_t row_lwb,Int_t row_upb)
TMatrixFSym(Int_t no_rows,const Float_t *elements,Option_t *option)
option="F": array elements contains the matrix stored column-wise
like in Fortran, so a[i,j] = elements[i+no_rows*j],
else it is supposed that array elements are stored row-wise
a[i,j] = elements[i*no_cols+j]
array elements are copied
TMatrixFSym(Int_t row_lwb,Int_t row_upb,const Float_t *elements,Option_t *option)
array elements are copied
TMatrixFSym(const TMatrixFSym &another) : TMatrixFBase(another)
TMatrixFSym(EMatrixCreatorsOp1 op,const TMatrixFSym &prototype)
Create a matrix applying a specific operation to the prototype.
Example: TMatrixFSym a(10,12); ...; TMatrixFSym b(TMatrixFBase::kTransposed, a);
Supported operations are: kZero, kUnit, and kTransposed .
TMatrixFSym(EMatrixCreatorsOp1 op,const TMatrixF &prototype)
TMatrixFSym(const TMatrixFSymLazy &lazy_constructor)
void Allocate(Int_t no_rows,Int_t no_cols,Int_t row_lwb,Int_t col_lwb,
Int_t init,Int_t /*nr_nonzeros*/)
Allocate new matrix. Arguments are number of rows, columns, row
lowerbound (0 default) and column lowerbound (0 default).
void AtMultA(const TMatrixF &a,Int_t constr)
Create a matrix C such that C = A' * A. In other words,
c[i,j] = SUM{ a[k,i] * a[k,j] }. Note, matrix C is allocated for constr=1.
void AtMultA(const TMatrixFSym &a,Int_t constr)
Matrix multiplication, with A symmetric
Create a matrix C such that C = A' * A = A * A = A * A'
Note, matrix C is allocated for constr=1.
TMatrixFSym& Use(Int_t row_lwb,Int_t row_upb,Float_t *data)
TMatrixFSym& GetSub(Int_t row_lwb,Int_t row_upb,TMatrixFSym &target,Option_t *option) const
Get submatrix [row_lwb..row_upb][row_lwb..row_upb]; The indexing range of the
returned matrix depends on the argument option:
option == "S" : return [0..row_upb-row_lwb+1][0..row_upb-row_lwb+1] (default)
else : return [row_lwb..row_upb][row_lwb..row_upb]
TMatrixFBase& GetSub(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,
TMatrixFBase &target,Option_t *option) const
Get submatrix [row_lwb..row_upb][col_lwb..col_upb]; The indexing range of the
returned matrix depends on the argument option:
option == "S" : return [0..row_upb-row_lwb+1][0..col_upb-col_lwb+1] (default)
else : return [row_lwb..row_upb][col_lwb..col_upb]
TMatrixFSym& SetSub(Int_t row_lwb,const TMatrixFBase &source)
Insert matrix source starting at [row_lwb][row_lwb], thereby overwriting the part
[row_lwb..row_lwb+nrows_source][row_lwb..row_lwb+nrows_source];
TMatrixFBase& SetSub(Int_t row_lwb,Int_t col_lwb,const TMatrixFBase &source)
Insert matrix source starting at [row_lwb][col_lwb] in a symmetric fashion, thereby overwriting the part
[row_lwb..row_lwb+nrows_source][row_lwb..row_lwb+nrows_source];
TMatrixFBase& SetMatrixArray(const Float_t *data,Option_t *option)
TMatrixFBase& Shift(Int_t row_shift,Int_t col_shift)
TMatrixFBase& ResizeTo(Int_t nrows,Int_t ncols,Int_t /*nr_nonzeros*/)
TMatrixFBase& ResizeTo(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,
Int_t /*nr_nonzeros*/)
Double_t Determinant() const
void Determinant(Double_t &d1,Double_t &d2) const
TMatrixFSym& Transpose(const TMatrixFSym &source)
Transpose a matrix.
TMatrixFBase& Apply(const TElementActionF &action)
TMatrixFBase& Apply(const TElementPosActionF &action)
Apply action to each element of the matrix. To action the location
of the current element is passed.
TMatrixFBase& Randomize(Float_t alpha,Float_t beta,Double_t &seed)
randomize matrix element values but keep matrix symmetric
TMatrixFSym& RandomizePD(Float_t alpha,Float_t beta,Double_t &seed)
randomize matrix element values but keep matrix symmetric positive definite
const TMatrixF EigenVectors(TVectorF &eigenValues) const
Return a matrix containing the eigen-vectors ordered by descending eigen-values.
For full functionality use TMatrixDSymEigen .
void Streamer(TBuffer &R__b)
Stream an object of class TMatrixFSym.
Inline Functions
void ~TMatrixFSym()
void AMultA(const TMatrixFSym& a, Int_t constr = 1)
TMatrixFSym TMatrixFSym(const TMatrixFSymLazy& lazy_constructor)
const Float_t* GetMatrixArray() const
Float_t* GetMatrixArray()
const Int_t* GetRowIndexArray() const
Int_t* GetRowIndexArray()
const Int_t* GetColIndexArray() const
Int_t* GetColIndexArray()
TMatrixFBase& SetRowIndexArray(Int_t*)
TMatrixFBase& SetColIndexArray(Int_t*)
void Clear(Option_t*)
Bool_t IsSymmetric() const
TMatrixFSym& Use(Int_t row_lwb, Int_t row_upb, Float_t* data)
TMatrixFSym& Use(TMatrixFSym& a)
TMatrixFSym GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Option_t* option = "S") const
TMatrixFBase& ResizeTo(const TMatrixFSym& m)
TMatrixFSym& T()
Float_t operator()(Int_t rown, Int_t coln) const
Float_t& operator()(Int_t rown, Int_t coln)
const TMatrixFRow_const operator[](Int_t rown) const
TMatrixFRow operator[](Int_t rown)
TMatrixFSym& operator=(const TMatrixFSym& source)
TMatrixFSym& operator=(const TMatrixFSymLazy& source)
TMatrixFSym& operator=(Float_t val)
TMatrixFSym& operator-=(Float_t val)
TMatrixFSym& operator+=(Float_t val)
TMatrixFSym& operator*=(Float_t val)
TMatrixFSym& operator+=(const TMatrixFSym& source)
TMatrixFSym& operator-=(const TMatrixFSym& source)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
Last update: root/matrix:$Name: $:$Id: TMatrixFSym.cxx,v 1.14 2004/06/22 19:57:01 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.