Logo ROOT  
Reference Guide
TMatrixTSym.h
Go to the documentation of this file.
1 // @(#)root/matrix:$Id$
2 // Authors: Fons Rademakers, Eddy Offermann Nov 2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TMatrixTSym
13 #define ROOT_TMatrixTSym
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TMatrixTSym //
18 // //
19 // Implementation of a symmetric matrix in the linear algebra package //
20 // //
21 // Note that in this implementation both matrix element m[i][j] and //
22 // m[j][i] are updated and stored in memory . However, when making the //
23 // object persistent only the upper right triangle is stored . //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #include "TMatrixTBase.h"
28 #include "TMatrixTUtils.h"
29 
30 template<class Element>class TMatrixT;
31 template<class Element>class TMatrixTSymLazy;
32 template<class Element>class TVectorT;
33 
34 template<class Element> class TMatrixTSym : public TMatrixTBase<Element> {
35 
36 protected:
37 
38  Element fDataStack[TMatrixTBase<Element>::kSizeMax]; //! data container
39  Element *fElements; //[fNelems] elements themselves
40 
41  Element *New_m (Int_t size);
42  void Delete_m(Int_t size,Element*&);
43  Int_t Memcpy_m(Element *newp,const Element *oldp,Int_t copySize,
44  Int_t newSize,Int_t oldSize);
45  void Allocate(Int_t nrows,Int_t ncols,Int_t row_lwb = 0,Int_t col_lwb = 0,Int_t init = 0,
46  Int_t /*nr_nonzeros*/ = -1);
47 
48 public:
49 
50  enum {kWorkMax = 100}; // size of work array
53 
55  explicit TMatrixTSym(Int_t nrows);
56  TMatrixTSym(Int_t row_lwb,Int_t row_upb);
57  TMatrixTSym(Int_t nrows,const Element *data,Option_t *option="");
58  TMatrixTSym(Int_t row_lwb,Int_t row_upb,const Element *data,Option_t *option="");
59  TMatrixTSym(const TMatrixTSym<Element> &another);
60  template <class Element2> TMatrixTSym(const TMatrixTSym<Element2> &another)
61  {
62  R__ASSERT(another.IsValid());
63  Allocate(another.GetNrows(),another.GetNcols(),another.GetRowLwb(),another.GetColLwb());
64  *this = another;
65  }
66 
70  TMatrixTSym(const TMatrixTSymLazy<Element> &lazy_constructor);
71 
73 
74  // Elementary constructors
75  void TMult(const TMatrixT <Element> &a);
76  void TMult(const TMatrixTSym<Element> &a);
77  void Mult (const TMatrixTSym<Element> &a) { TMult(a); }
78 
79  void Plus (const TMatrixTSym<Element> &a,const TMatrixTSym<Element> &b);
81 
82  virtual const Element *GetMatrixArray () const;
83  virtual Element *GetMatrixArray ();
84  virtual const Int_t *GetRowIndexArray() const { return 0; }
85  virtual Int_t *GetRowIndexArray() { return 0; }
86  virtual const Int_t *GetColIndexArray() const { return 0; }
87  virtual Int_t *GetColIndexArray() { return 0; }
88 
89  virtual TMatrixTBase<Element> &SetRowIndexArray(Int_t * /*data*/) { MayNotUse("SetRowIndexArray(Int_t *)"); return *this; }
90  virtual TMatrixTBase<Element> &SetColIndexArray(Int_t * /*data*/) { MayNotUse("SetColIndexArray(Int_t *)"); return *this; }
91 
92  virtual void Clear (Option_t * /*option*/ ="") { if (this->fIsOwner) Delete_m(this->fNelems,fElements);
93  else fElements = 0;
94  this->fNelems = 0; }
95  virtual Bool_t IsSymmetric() const { return kTRUE; }
96 
97  TMatrixTSym <Element> &Use (Int_t row_lwb,Int_t row_upb,Element *data);
98  const TMatrixTSym <Element> &Use (Int_t row_lwb,Int_t row_upb,const Element *data) const
99  { return (const TMatrixTSym<Element>&)
100  ((const_cast<TMatrixTSym<Element> *>(this))->Use(row_lwb,row_upb,const_cast<Element *>(data))); }
101  TMatrixTSym <Element> &Use (Int_t nrows,Element *data);
102  const TMatrixTSym <Element> &Use (Int_t nrows,const Element *data) const;
104  const TMatrixTSym <Element> &Use (const TMatrixTSym<Element> &a) const;
105 
106  TMatrixTSym <Element> &GetSub (Int_t row_lwb,Int_t row_upb,TMatrixTSym<Element> &target,Option_t *option="S") const;
107  virtual TMatrixTBase<Element> &GetSub (Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,
108  TMatrixTBase<Element> &target,Option_t *option="S") const;
109  TMatrixTSym <Element> GetSub (Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,Option_t *option="S") const;
110  TMatrixTSym <Element> &SetSub (Int_t row_lwb,const TMatrixTBase<Element> &source);
111  virtual TMatrixTBase<Element> &SetSub (Int_t row_lwb,Int_t col_lwb,const TMatrixTBase<Element> &source);
112 
113  virtual TMatrixTBase<Element> &SetMatrixArray(const Element *data, Option_t *option="");
114 
115  virtual TMatrixTBase<Element> &Shift (Int_t row_shift,Int_t col_shift);
116  virtual TMatrixTBase<Element> &ResizeTo (Int_t nrows,Int_t ncols,Int_t /*nr_nonzeros*/ =-1);
117  virtual TMatrixTBase<Element> &ResizeTo (Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,Int_t /*nr_nonzeros*/ =-1);
119  return ResizeTo(m.GetRowLwb(),m.GetRowUpb(),m.GetColLwb(),m.GetColUpb()); }
120 
121  virtual Double_t Determinant () const;
122  virtual void Determinant (Double_t &d1,Double_t &d2) const;
123 
127  inline TMatrixTSym<Element> &T () { return this->Transpose(*this); }
128  TMatrixTSym<Element> &Rank1Update (const TVectorT <Element> &v,Element alpha=1.0);
131  Element Similarity (const TVectorT <Element> &v) const;
133 
134  // Either access a_ij as a(i,j)
135  inline Element operator()(Int_t rown,Int_t coln) const;
136  inline Element &operator()(Int_t rown,Int_t coln);
137 
138  // or as a[i][j]
139  inline const TMatrixTRow_const<Element> operator[](Int_t rown) const { return TMatrixTRow_const<Element>(*this,rown); }
140  inline TMatrixTRow <Element> operator[](Int_t rown) { return TMatrixTRow <Element>(*this,rown); }
141 
144  template <class Element2> TMatrixTSym<Element> &operator= (const TMatrixTSym<Element2> &source)
145  {
146  if (!AreCompatible(*this,source)) {
147  Error("operator=(const TMatrixTSym2 &)","matrices not compatible");
148  return *this;
149  }
150 
151  TObject::operator=(source);
152  const Element2 * const ps = source.GetMatrixArray();
153  Element * const pt = this->GetMatrixArray();
154  for (Int_t i = 0; i < this->fNelems; i++)
155  pt[i] = ps[i];
156  this->fTol = source.GetTol();
157  return *this;
158  }
159 
160  TMatrixTSym<Element> &operator= (Element val);
161  TMatrixTSym<Element> &operator-=(Element val);
162  TMatrixTSym<Element> &operator+=(Element val);
163  TMatrixTSym<Element> &operator*=(Element val);
164 
165  TMatrixTSym &operator+=(const TMatrixTSym &source);
166  TMatrixTSym &operator-=(const TMatrixTSym &source);
167 
170 
171  virtual TMatrixTBase<Element> &Randomize (Element alpha,Element beta,Double_t &seed);
172  virtual TMatrixTSym <Element> &RandomizePD(Element alpha,Element beta,Double_t &seed);
173 
174  const TMatrixT<Element> EigenVectors(TVectorT<Element> &eigenValues) const;
175 
176  ClassDef(TMatrixTSym,2) // Template of Symmetric Matrix class
177 };
178 #ifndef __CINT__
179 // When building with -fmodules, it instantiates all pending instantiations,
180 // instead of delaying them until the end of the translation unit.
181 // We 'got away with' probably because the use and the definition of the
182 // explicit specialization do not occur in the same TU.
183 //
184 // In case we are building with -fmodules, we need to forward declare the
185 // specialization in order to compile the dictionary G__Matrix.cxx.
186 template <> TClass *TMatrixTSym<double>::Class();
187 #endif // __CINT__
188 
189 template <class Element> inline const Element *TMatrixTSym<Element>::GetMatrixArray() const { return fElements; }
190 template <class Element> inline Element *TMatrixTSym<Element>::GetMatrixArray() { return fElements; }
191 
192 template <class Element> inline TMatrixTSym<Element> &TMatrixTSym<Element>::Use (Int_t nrows,Element *data) { return Use(0,nrows-1,data); }
193 template <class Element> inline const TMatrixTSym<Element> &TMatrixTSym<Element>::Use (Int_t nrows,const Element *data) const
194  { return Use(0,nrows-1,data); }
196  { return Use(a.GetRowLwb(),a.GetRowUpb(),a.GetMatrixArray()); }
197 template <class Element> inline const TMatrixTSym<Element> &TMatrixTSym<Element>::Use (const TMatrixTSym<Element> &a) const
198  { return Use(a.GetRowLwb(),a.GetRowUpb(),a.GetMatrixArray()); }
199 
200 template <class Element> inline TMatrixTSym<Element> TMatrixTSym<Element>::GetSub (Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,
201  Option_t *option) const
202  {
204  this->GetSub(row_lwb,row_upb,col_lwb,col_upb,tmp,option);
205  return tmp;
206  }
207 
208 template <class Element> inline Element TMatrixTSym<Element>::operator()(Int_t rown,Int_t coln) const
209 {
210  R__ASSERT(this->IsValid());
211  const Int_t arown = rown-this->fRowLwb;
212  const Int_t acoln = coln-this->fColLwb;
213  if (arown >= this->fNrows || arown < 0) {
214  Error("operator()","Request row(%d) outside matrix range of %d - %d",rown,this->fRowLwb,this->fRowLwb+this->fNrows);
216  }
217  if (acoln >= this->fNcols || acoln < 0) {
218  Error("operator()","Request column(%d) outside matrix range of %d - %d",coln,this->fColLwb,this->fColLwb+this->fNcols);
220  }
221  return (fElements[arown*this->fNcols+acoln]);
222 }
223 
224 template <class Element> inline Element &TMatrixTSym<Element>::operator()(Int_t rown,Int_t coln)
225 {
226  R__ASSERT(this->IsValid());
227  const Int_t arown = rown-this->fRowLwb;
228  const Int_t acoln = coln-this->fColLwb;
229  if (arown >= this->fNrows || arown < 0) {
230  Error("operator()","Request row(%d) outside matrix range of %d - %d",rown,this->fRowLwb,this->fRowLwb+this->fNrows);
232  }
233  if (acoln >= this->fNcols || acoln < 0) {
234  Error("operator()","Request column(%d) outside matrix range of %d - %d",coln,this->fColLwb,this->fColLwb+this->fNcols);
236  }
237  return (fElements[arown*this->fNcols+acoln]);
238 }
239 
240 template <class Element> Bool_t operator== (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
241 template <class Element> TMatrixTSym<Element> operator+ (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
242 template <class Element> TMatrixTSym<Element> operator+ (const TMatrixTSym<Element> &source1, Element val);
243 template <class Element> TMatrixTSym<Element> operator+ ( Element val ,const TMatrixTSym<Element> &source2);
244 template <class Element> TMatrixTSym<Element> operator- (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
245 template <class Element> TMatrixTSym<Element> operator- (const TMatrixTSym<Element> &source1, Element val);
246 template <class Element> TMatrixTSym<Element> operator- ( Element val ,const TMatrixTSym<Element> &source2);
247 template <class Element> TMatrixTSym<Element> operator* (const TMatrixTSym<Element> &source, Element val );
248 template <class Element> TMatrixTSym<Element> operator* ( Element val, const TMatrixTSym<Element> &source );
249 // Preventing warnings with -Weffc++ in GCC since overloading the || and && operators was a design choice.
250 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
251 #pragma GCC diagnostic push
252 #pragma GCC diagnostic ignored "-Weffc++"
253 #endif
254 template <class Element> TMatrixTSym<Element> operator&& (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
255 template <class Element> TMatrixTSym<Element> operator|| (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
256 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
257 #pragma GCC diagnostic pop
258 #endif
259 template <class Element> TMatrixTSym<Element> operator> (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
260 template <class Element> TMatrixTSym<Element> operator>= (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
261 template <class Element> TMatrixTSym<Element> operator<= (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
262 template <class Element> TMatrixTSym<Element> operator< (const TMatrixTSym<Element> &source1,const TMatrixTSym<Element> &source2);
263 
264 template <class Element> TMatrixTSym<Element> &Add (TMatrixTSym<Element> &target, Element scalar,const TMatrixTSym<Element> &source);
265 template <class Element> TMatrixTSym<Element> &ElementMult(TMatrixTSym<Element> &target,const TMatrixTSym<Element> &source);
266 template <class Element> TMatrixTSym<Element> &ElementDiv (TMatrixTSym<Element> &target,const TMatrixTSym<Element> &source);
267 
268 #endif
TMatrixTSym::GetRowIndexArray
virtual Int_t * GetRowIndexArray()
Definition: TMatrixTSym.h:85
MayNotUse
void MayNotUse(const char *method)
This function can be used in classes that should override a certain function, but in the inherited cl...
Definition: TError.cxx:182
m
auto * m
Definition: textangle.C:8
n
const Int_t n
Definition: legend1.C:16
TMatrixTSym::ResizeTo
virtual TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1)
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TMatrixTSym::EigenVectors
const TMatrixT< Element > EigenVectors(TVectorT< Element > &eigenValues) const
Return a matrix containing the eigen-vectors ordered by descending eigen-values.
Definition: TMatrixTSym.cxx:1681
TMatrixTSym::Clear
virtual void Clear(Option_t *="")
Definition: TMatrixTSym.h:92
ElementMult
TMatrixTSym< Element > & ElementMult(TMatrixTSym< Element > &target, const TMatrixTSym< Element > &source)
Multiply target by the source, element-by-element.
Definition: TMatrixTSym.cxx:1966
TMatrixTSym::GetSub
TMatrixTSym< Element > & GetSub(Int_t row_lwb, Int_t row_upb, TMatrixTSym< Element > &target, Option_t *option="S") const
TMatrixTSym::TMatrixTSym
TMatrixTSym()
Definition: TMatrixTSym.h:54
operator<=
TMatrixTSym< Element > operator<=(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
source1 <= source2
Definition: TMatrixTSym.cxx:1881
ElementDiv
TMatrixTSym< Element > & ElementDiv(TMatrixTSym< Element > &target, const TMatrixTSym< Element > &source)
Multiply target by the source, element-by-element.
Definition: TMatrixTSym.cxx:1998
TMatrixTSym::Delete_m
void Delete_m(Int_t size, Element *&)
delete data pointer m, if it was assigned on the heap
Definition: TMatrixTSym.cxx:215
TMatrixTUtils.h
TMatrixTBase::NaNValue
static Element & NaNValue()
TMatrixTSym::TMult
void TMult(const TMatrixT< Element > &a)
Create a matrix C such that C = A' * A.
Definition: TMatrixTSym.cxx:381
TMatrixTSym::SetRowIndexArray
virtual TMatrixTBase< Element > & SetRowIndexArray(Int_t *)
Definition: TMatrixTSym.h:89
BatchHelpers::init
EvaluateInfo init(std::vector< RooRealProxy > parameters, std::vector< ArrayWrapper * > wrappers, std::vector< double * > arrays, size_t begin, size_t batchSize)
Int_t
int Int_t
Definition: RtypesCore.h:45
TGeant4Unit::ps
static constexpr double ps
Definition: TGeant4SystemOfUnits.h:171
TMatrixTSym::Minus
void Minus(const TMatrixTSym< Element > &a, const TMatrixTSym< Element > &b)
Symmetric matrix summation. Create a matrix C such that C = A + B.
Definition: TMatrixTSym.cxx:346
TMatrixTSym
Definition: TMatrixDSymfwd.h:22
TMatrixTSym::Shift
virtual TMatrixTBase< Element > & Shift(Int_t row_shift, Int_t col_shift)
Definition: TMatrixTSym.cxx:756
TMatrixTSym::operator()
Element operator()(Int_t rown, Int_t coln) const
Definition: TMatrixTSym.h:208
TMatrixTSym::kPlus
@ kPlus
Definition: TMatrixTSym.h:52
TMatrixTSym< Double_t >::EMatrixCreatorsOp2
EMatrixCreatorsOp2
Definition: TMatrixTSym.h:52
TMatrixTSym::operator-=
TMatrixTSym< Element > & operator-=(Element val)
Subtract val from every element of the matrix.
Definition: TMatrixTSym.cxx:1482
TMatrixT
Definition: TMatrixDfwd.h:22
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
operator+
TMatrixTSym< Element > operator+(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
Definition: TMatrixTSym.cxx:1704
operator>=
TMatrixTSym< Element > operator>=(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
source1 >= source2
Definition: TMatrixTSym.cxx:1855
ROOT::Math::beta
double beta(double x, double y)
Calculates the beta function.
Definition: SpecFuncMathCore.cxx:111
v
@ v
Definition: rootcling_impl.cxx:3635
TMatrixTSym::Rank1Update
TMatrixTSym< Element > & Rank1Update(const TVectorT< Element > &v, Element alpha=1.0)
Perform a rank 1 operation on the matrix: A += alpha * v * v^T.
Definition: TMatrixTSym.cxx:1063
b
#define b(i)
Definition: RSha256.hxx:118
TMatrixTSym::RandomizePD
virtual TMatrixTSym< Element > & RandomizePD(Element alpha, Element beta, Double_t &seed)
randomize matrix element values but keep matrix symmetric positive definite
Definition: TMatrixTSym.cxx:1639
TMatrixTSym::IsSymmetric
virtual Bool_t IsSymmetric() const
Definition: TMatrixTSym.h:95
bool
TMatrixTSym::fDataStack
Element fDataStack[TMatrixTBase< Element >::kSizeMax]
Definition: TMatrixTSym.h:38
TMatrixTSym::Use
TMatrixTSym< Element > & Use(Int_t row_lwb, Int_t row_upb, Element *data)
Definition: TMatrixTSym.cxx:475
TMatrixTSym::operator=
TMatrixTSym< Element > & operator=(const TMatrixTSym< Element > &source)
TMatrixTSym::SetSub
TMatrixTSym< Element > & SetSub(Int_t row_lwb, const TMatrixTBase< Element > &source)
Insert matrix source starting at [row_lwb][row_lwb], thereby overwriting the part [row_lwb....
Definition: TMatrixTSym.cxx:636
TMatrixTSym::operator+=
TMatrixTSym< Element > & operator+=(Element val)
Add val to every element of the matrix.
Definition: TMatrixTSym.cxx:1466
TMatrixTSym::Apply
TMatrixTBase< Element > & Apply(const TElementActionT< Element > &action)
Definition: TMatrixTSym.cxx:1553
TMatrixTSym::T
TMatrixTSym< Element > & T()
Definition: TMatrixTSym.h:127
TMatrixTSym::kTransposed
@ kTransposed
Definition: TMatrixTSym.h:51
operator==
Bool_t operator==(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
Check to see if two matrices are identical.
Definition: TMatrixTSym.cxx:1694
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
operator>
TMatrixTSym< Element > operator>(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
source1 > source2
Definition: TMatrixTSym.cxx:1829
TMatrixTSym::kZero
@ kZero
Definition: TMatrixTSym.h:51
TMatrixTSym::Class
TClass * Class()
TMatrixTSym::Mult
void Mult(const TMatrixTSym< Element > &a)
Definition: TMatrixTSym.h:77
TMatrixTSym::GetRowIndexArray
virtual const Int_t * GetRowIndexArray() const
Definition: TMatrixTSym.h:84
TMatrixTSym::kWorkMax
@ kWorkMax
Definition: TMatrixTSym.h:50
operator<
TMatrixTSym< Element > operator<(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
source1 < source2
Definition: TMatrixTSym.cxx:1907
TMatrixTSym::Randomize
virtual TMatrixTBase< Element > & Randomize(Element alpha, Element beta, Double_t &seed)
randomize matrix element values but keep matrix symmetric
Definition: TMatrixTSym.cxx:1608
TMatrixTSym::GetMatrixArray
virtual const Element * GetMatrixArray() const
Definition: TMatrixTSym.h:189
a
auto * a
Definition: textangle.C:12
operator-
TMatrixTSym< Element > operator-(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
Definition: TMatrixTSym.cxx:1732
TMatrixTBase
Definition: TMatrixDBasefwd.h:25
operator||
TMatrixTSym< Element > operator||(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
Logical Or.
Definition: TMatrixTSym.cxx:1804
TMatrixTSym::New_m
Element * New_m(Int_t size)
return data pointer .
Definition: TMatrixTSym.cxx:229
TMatrixTSym< Double_t >::EMatrixCreatorsOp1
EMatrixCreatorsOp1
Definition: TMatrixTSym.h:51
operator&&
TMatrixTSym< Element > operator&&(const TMatrixTSym< Element > &source1, const TMatrixTSym< Element > &source2)
Logical AND.
Definition: TMatrixTSym.cxx:1779
TMatrixTSym::SimilarityT
TMatrixTSym< Element > & SimilarityT(const TMatrixT< Element > &n)
Calculate B^T * (*this) * B , final matrix will be (ncolsb x ncolsb) It is more efficient than applyi...
Definition: TMatrixTSym.cxx:1327
TMatrixTSym::operator[]
TMatrixTRow< Element > operator[](Int_t rown)
Definition: TMatrixTSym.h:140
TMatrixTSym::kMinus
@ kMinus
Definition: TMatrixTSym.h:52
TMatrixTSym::kAtA
@ kAtA
Definition: TMatrixTSym.h:51
TMatrixTSym::Plus
void Plus(const TMatrixTSym< Element > &a, const TMatrixTSym< Element > &b)
Symmetric matrix summation. Create a matrix C such that C = A + B.
Definition: TMatrixTSym.cxx:312
TElementActionT
Definition: TMatrixDUtilsfwd.h:51
TMatrixTSym::GetColIndexArray
virtual Int_t * GetColIndexArray()
Definition: TMatrixTSym.h:87
TVectorT
Definition: TMatrixTBase.h:78
TMatrixTRow_const
Definition: TMatrixDUtilsfwd.h:35
TMatrixTSym::~TMatrixTSym
virtual ~TMatrixTSym()
Definition: TMatrixTSym.h:72
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject::operator=
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.h:268
R__ASSERT
#define R__ASSERT(e)
Definition: TError.h:122
TMatrixTSym::kUnit
@ kUnit
Definition: TMatrixTSym.h:51
TMatrixTSym::Invert
TMatrixTSym< Element > & Invert(Double_t *det=0)
Invert the matrix and calculate its determinant Notice that the LU decomposition is used instead of B...
Definition: TMatrixTSym.cxx:961
TClass
Definition: TClass.h:80
TMatrixTSym::SetColIndexArray
virtual TMatrixTBase< Element > & SetColIndexArray(Int_t *)
Definition: TMatrixTSym.h:90
TElementPosActionT
Definition: TMatrixDUtilsfwd.h:52
TMatrixTSym::InvertFast
TMatrixTSym< Element > & InvertFast(Double_t *det=0)
Invert the matrix and calculate its determinant.
Definition: TMatrixTSym.cxx:979
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMatrixTSym::Allocate
void Allocate(Int_t nrows, Int_t ncols, Int_t row_lwb=0, Int_t col_lwb=0, Int_t init=0, Int_t=-1)
Allocate new matrix.
Definition: TMatrixTSym.cxx:274
TMatrixTSym::GetColIndexArray
virtual const Int_t * GetColIndexArray() const
Definition: TMatrixTSym.h:86
TMatrixTSym::SetMatrixArray
virtual TMatrixTBase< Element > & SetMatrixArray(const Element *data, Option_t *option="")
Definition: TMatrixTSym.cxx:743
TMatrixTSymLazy
Definition: TMatrixTLazy.h:86
TMatrixTSym::operator[]
const TMatrixTRow_const< Element > operator[](Int_t rown) const
Definition: TMatrixTSym.h:139
TMatrixTSym::operator*=
TMatrixTSym< Element > & operator*=(Element val)
Multiply every element of the matrix with val.
Definition: TMatrixTSym.cxx:1498
TMatrixTSym::Similarity
TMatrixTSym< Element > & Similarity(const TMatrixT< Element > &n)
TMatrixTSym::Determinant
virtual Double_t Determinant() const
Definition: TMatrixTSym.cxx:935
TMatrixTRow
Definition: TMatrixDUtilsfwd.h:43
TMatrixTSym::fElements
Element * fElements
data container
Definition: TMatrixTSym.h:39
TMatrixTSym::Use
const TMatrixTSym< Element > & Use(Int_t row_lwb, Int_t row_upb, const Element *data) const
Definition: TMatrixTSym.h:98
TMatrixTSym::TMatrixTSym
TMatrixTSym(const TMatrixTSym< Element2 > &another)
Definition: TMatrixTSym.h:60
Add
TMatrixTSym< Element > & Add(TMatrixTSym< Element > &target, Element scalar, const TMatrixTSym< Element > &source)
Modify addition: target += scalar * source.
Definition: TMatrixTSym.cxx:1933
TMatrixTSym::Memcpy_m
Int_t Memcpy_m(Element *newp, const Element *oldp, Int_t copySize, Int_t newSize, Int_t oldSize)
copy copySize doubles from *oldp to *newp .
Definition: TMatrixTSym.cxx:247
pt
TPaveText * pt
Definition: entrylist_figure1.C:7
TMatrixTBase.h
TMatrixTSym::kInverted
@ kInverted
Definition: TMatrixTSym.h:51
operator*
TMatrixTSym< Element > operator*(const TMatrixTSym< Element > &source, Element val)
Definition: TMatrixTSym.cxx:1760
TMatrixTSym::ResizeTo
TMatrixTBase< Element > & ResizeTo(const TMatrixTSym< Element > &m)
Definition: TMatrixTSym.h:118
TMatrixTSym::Transpose
TMatrixTSym< Element > & Transpose(const TMatrixTSym< Element > &source)
Transpose a matrix.
Definition: TMatrixTSym.cxx:1041
AreCompatible
Bool_t AreCompatible(const TMatrixTBase< Element1 > &m1, const TMatrixTBase< Element2 > &m2, Int_t verbose=0)
Check that matrice sm1 and m2 areboth valid and have identical shapes .
Definition: TMatrixTBase.cxx:888
int
Error
void Error(const char *location, const char *msgfmt,...)