Logo ROOT   6.08/07
Reference Guide
TVectorT.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_TVectorT
13 #define ROOT_TVectorT
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TVectorT //
18 // //
19 // Template class of Vectors in the linear algebra package //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TMatrixT
24 #include "TMatrixT.h"
25 #endif
26 #ifndef ROOT_TMatrixTSym
27 #include "TMatrixTSym.h"
28 #endif
29 #ifndef ROOT_TMatrixTSparse
30 #include "TMatrixTSparse.h"
31 #endif
32 
33 template<class Element> class TVectorT : public TObject {
34 
35 protected:
36  Int_t fNrows; // number of rows
37  Int_t fRowLwb; // lower bound of the row index
38  Element *fElements; //[fNrows] elements themselves
39 
40  enum {kSizeMax = 5}; // size data container on stack, see New_m(),Delete_m()
41  enum {kWorkMax = 100}; // size of work array's in several routines
42 
43  Element fDataStack[kSizeMax]; //! data container
44  Bool_t fIsOwner; //!default kTRUE, when Use array kFALSE
45 
46  Element* New_m (Int_t size);
47  void Delete_m(Int_t size,Element*&);
48  Int_t Memcpy_m(Element *newp,const Element *oldp,Int_t copySize,
49  Int_t newSize,Int_t oldSize);
50 
51  void Allocate(Int_t nrows,Int_t row_lwb = 0,Int_t init = 0);
52 
54  kStatus = BIT(14) // set if vector object is valid
55  };
56 
57 public:
58 
59  TVectorT() : fNrows(0), fRowLwb(0), fElements(0), fDataStack (), fIsOwner(kTRUE) { }
60  explicit TVectorT(Int_t n);
61  TVectorT(Int_t lwb,Int_t upb);
62  TVectorT(Int_t n,const Element *elements);
63  TVectorT(Int_t lwb,Int_t upb,const Element *elements);
64  TVectorT(const TVectorT <Element> &another);
68  template <class Element2> TVectorT(const TVectorT<Element2> &another)
69  {
70  R__ASSERT(another.IsValid());
71  Allocate(another.GetUpb()-another.GetLwb()+1,another.GetLwb());
72  *this = another;
73  }
74 #ifndef __CINT__
75  TVectorT(Int_t lwb,Int_t upb,Double_t iv1, ...);
76 #endif
77  virtual ~TVectorT() { Clear(); }
78 
79  inline Int_t GetLwb () const { return fRowLwb; }
80  inline Int_t GetUpb () const { return fNrows+fRowLwb-1; }
81  inline Int_t GetNrows () const { return fNrows; }
82  inline Int_t GetNoElements() const { return fNrows; }
83 
84  inline Element *GetMatrixArray () { return fElements; }
85  inline const Element *GetMatrixArray () const { return fElements; }
86 
87  inline void Invalidate () { SetBit(kStatus); }
88  inline void MakeValid () { ResetBit(kStatus); }
89  inline Bool_t IsValid () const { return !TestBit(kStatus); }
90  inline Bool_t IsOwner () const { return fIsOwner; }
91  inline void SetElements(const Element *elements) { R__ASSERT(IsValid());
92  memcpy(fElements,elements,fNrows*sizeof(Element)); }
93  inline TVectorT<Element> &Shift (Int_t row_shift) { fRowLwb += row_shift; return *this; }
95  inline TVectorT<Element> &ResizeTo (Int_t n) { return ResizeTo(0,n-1); }
96  inline TVectorT<Element> &ResizeTo (const TVectorT<Element> &v) { return ResizeTo(v.GetLwb(),v.GetUpb()); }
97 
98  TVectorT<Element> &Use (Int_t lwb,Int_t upb,Element *data);
99  const TVectorT<Element> &Use (Int_t lwb,Int_t upb,const Element *data) const
100  { return (const TVectorT<Element>&)(const_cast<TVectorT<Element> *>(this))->Use(lwb,upb,const_cast<Element *>(data)); }
101  TVectorT<Element> &Use (Int_t n,Element *data);
102  const TVectorT<Element> &Use (Int_t n,const Element *data) const ;
104  const TVectorT<Element> &Use (const TVectorT<Element> &v) const ;
105 
106  TVectorT<Element> &GetSub (Int_t row_lwb,Int_t row_upb,TVectorT<Element> &target,Option_t *option="S") const;
107  TVectorT<Element> GetSub (Int_t row_lwb,Int_t row_upb,Option_t *option="S") const;
108  TVectorT<Element> &SetSub (Int_t row_lwb,const TVectorT<Element> &source);
109 
116 
117  Element Norm1 () const;
118  Element Norm2Sqr() const;
119  Element NormInf () const;
120  Int_t NonZeros() const;
121  Element Sum () const;
122  Element Min () const;
123  Element Max () const;
124 
125  inline const Element &operator()(Int_t index) const;
126  inline Element &operator()(Int_t index);
127  inline const Element &operator[](Int_t index) const { return (*this)(index); }
128  inline Element &operator[](Int_t index) { return (*this)(index); }
129 
136  template <class Element2> TVectorT<Element> &operator= (const TVectorT<Element2> &source)
137  {
138  if (!AreCompatible(*this,source)) {
139  Error("operator=(const TVectorT2 &)","vectors not compatible");
140  return *this;
141  }
142 
143  TObject::operator=(source);
144  const Element2 * const ps = source.GetMatrixArray();
145  Element * const pt = GetMatrixArray();
146  for (Int_t i = 0; i < this->fNrows; i++)
147  pt[i] = ps[i];
148  return *this;
149  }
150 
151  TVectorT<Element> &operator= (Element val);
152  TVectorT<Element> &operator+=(Element val);
153  TVectorT<Element> &operator-=(Element val);
154  TVectorT<Element> &operator*=(Element val);
155 
161 
162  Bool_t operator==(Element val) const;
163  Bool_t operator!=(Element val) const;
164  Bool_t operator< (Element val) const;
165  Bool_t operator<=(Element val) const;
166  Bool_t operator> (Element val) const;
167  Bool_t operator>=(Element val) const;
168 
170  Bool_t SomePositive (const TVectorT<Element> &select);
171  void AddSomeConstant (Element val,const TVectorT<Element> &select);
172 
173  void Randomize (Element alpha,Element beta,Double_t &seed);
174 
177 
178  void Add(const TVectorT<Element> &v);
179  void Add(const TVectorT<Element> &v1, const TVectorT<Element> &v2);
180  void Clear(Option_t * /*option*/ ="") { if (fIsOwner) Delete_m(fNrows,fElements);
181  else fElements = 0;
182  fNrows = 0; }
183  void Draw (Option_t *option=""); // *MENU*
184  void Print(Option_t *option="") const; // *MENU*
185 
186  ClassDef(TVectorT,4) // Template of Vector class
187 };
188 
189 #ifndef __CINT__
190 // When building with -fmodules, it instantiates all pending instantiations,
191 // instead of delaying them until the end of the translation unit.
192 // We 'got away with' probably because the use and the definition of the
193 // explicit specialization do not occur in the same TU.
194 //
195 // In case we are building with -fmodules, we need to forward declare the
196 // specialization in order to compile the dictionary G__Matrix.cxx.
197 template <> TClass *TVectorT<double>::Class();
198 #endif // __CINT__
199 
200 template<class Element> inline TVectorT<Element> &TVectorT<Element>::Use (Int_t n,Element *data) { return Use(0,n-1,data); }
201 template<class Element> inline const TVectorT<Element> &TVectorT<Element>::Use (Int_t n,const Element *data) const { return Use(0,n-1,data); }
202 template<class Element> inline TVectorT<Element> &TVectorT<Element>::Use (TVectorT &v)
203  {
204  R__ASSERT(v.IsValid());
205  return Use(v.GetLwb(),v.GetUpb(),v.GetMatrixArray());
206  }
207 template<class Element> inline const TVectorT<Element> &TVectorT<Element>::Use (const TVectorT &v) const
208  {
209  R__ASSERT(v.IsValid());
210  return Use(v.GetLwb(),v.GetUpb(),v.GetMatrixArray());
211  }
212 template<class Element> inline TVectorT<Element> TVectorT<Element>::GetSub (Int_t row_lwb,Int_t row_upb,Option_t *option) const
213  {
214  TVectorT tmp;
215  this->GetSub(row_lwb,row_upb,tmp,option);
216  return tmp;
217  }
218 
219 template<class Element> inline const Element &TVectorT<Element>::operator()(Int_t ind) const
220 {
221  // Access a vector element.
222 
223  R__ASSERT(IsValid());
224  const Int_t aind = ind-fRowLwb;
225  if (aind >= fNrows || aind < 0) {
226  Error("operator()","Request index(%d) outside vector range of %d - %d",ind,fRowLwb,fRowLwb+fNrows);
228  }
229 
230  return fElements[aind];
231 }
232 template<class Element> inline Element &TVectorT<Element>::operator()(Int_t ind)
233 {
234  // Access a vector element.
235 
236  R__ASSERT(IsValid());
237  const Int_t aind = ind-fRowLwb;
238  if (aind >= fNrows || aind < 0) {
239  Error("operator()","Request index(%d) outside vector range of %d - %d",ind,fRowLwb,fRowLwb+fNrows);
241  }
242 
243  return fElements[aind];
244 }
245 
246 template<class Element> Bool_t operator== (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
247 template<class Element> TVectorT<Element> operator+ (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
248 template<class Element> TVectorT<Element> operator- (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
249 template<class Element> Element operator* (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
250 template<class Element> TVectorT<Element> operator* (const TMatrixT <Element> &a, const TVectorT <Element> &source);
251 template<class Element> TVectorT<Element> operator* (const TMatrixTSym <Element> &a, const TVectorT <Element> &source);
252 template<class Element> TVectorT<Element> operator* (const TMatrixTSparse<Element> &a, const TVectorT <Element> &source);
253 template<class Element> TVectorT<Element> operator* ( Element val, const TVectorT <Element> &source);
254 template<class Element>
255 inline
256 TVectorT<Element> operator* (const TVectorT <Element> &source, Element val) { return val * source; }
257 
258 template<class Element> Element Dot (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
259 template <class Element1,class Element2>
261 template <class Element1,class Element2,class Element3>
263 template <class Element1,class Element2,class Element3>
264  Element1 Mult (const TVectorT <Element1> &v1, const TMatrixT <Element2> &m, const TVectorT <Element3> &v2);
265 
266 template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source);
267 template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TMatrixT <Element> &a,
268  const TVectorT<Element> &source);
269 template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TMatrixTSym <Element> &a,
270  const TVectorT<Element> &source);
271 template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TMatrixTSparse<Element> &a,
272  const TVectorT<Element> &source);
273 template<class Element> TVectorT<Element> &AddElemMult ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source1,
274  const TVectorT <Element> &source2);
275 template<class Element> TVectorT<Element> &AddElemMult ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source1,
276  const TVectorT <Element> &source2,const TVectorT <Element> &select);
277 template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source1,
278  const TVectorT <Element> &source2);
279 template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source1,
280  const TVectorT <Element> &source2,const TVectorT <Element> &select);
281 template<class Element> TVectorT<Element> &ElementMult ( TVectorT <Element> &target, const TVectorT <Element> &source);
282 template<class Element> TVectorT<Element> &ElementMult ( TVectorT <Element> &target, const TVectorT <Element> &source, const TVectorT <Element> &select);
283 template<class Element> TVectorT<Element> &ElementDiv ( TVectorT <Element> &target, const TVectorT <Element> &source);
284 template<class Element> TVectorT<Element> &ElementDiv ( TVectorT <Element> &target, const TVectorT <Element> &source, const TVectorT <Element> &select);
285 
286 template<class Element1,class Element2> Bool_t AreCompatible(const TVectorT<Element1> &v1,const TVectorT<Element2> &v2,Int_t verbose=0);
287 // Check matrix and vector for compatibility in multiply: M * v and v * M
288 template<class Element1,class Element2> Bool_t AreCompatible(const TMatrixT<Element1> &m, const TVectorT<Element2> &v, Int_t verbose=0);
289 template<class Element1,class Element2> Bool_t AreCompatible(const TVectorT<Element1> &v, const TMatrixT<Element2> &m, Int_t verbose=0);
290 
291 template<class Element> void Compare (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
292 template<class Element> Bool_t VerifyVectorValue (const TVectorT <Element> &m, Element val,Int_t verbose, Element maxDevAllow);
293 template<class Element> Bool_t VerifyVectorValue (const TVectorT <Element> &m, Element val,Int_t verbose)
294  { return VerifyVectorValue(m,val,verbose,Element(0.0)); }
295 template<class Element> Bool_t VerifyVectorValue (const TVectorT <Element> &m, Element val)
296  { return VerifyVectorValue(m,val,1,Element(0.0)); }
297 template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Element> &m1,const TVectorT <Element> &m2, Int_t verbose, Element maxDevAllow);
298 template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Element> &m1,const TVectorT <Element> &m2, Int_t verbose)
299  { return VerifyVectorIdentity(m1,m2,verbose,Element(0.0)); }
300 template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Element> &m1,const TVectorT <Element> &m2)
301  { return VerifyVectorIdentity(m1,m2,1,Element(0.0)); }
302 
303 #endif
const TVectorT< Element > & Use(Int_t lwb, Int_t upb, const Element *data) const
Definition: TVectorT.h:99
void SetElements(const Element *elements)
Definition: TVectorT.h:91
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
Definition: TVectorT.cxx:292
void Invalidate()
Definition: TVectorT.h:87
TVectorT< Element > & operator-=(Element val)
Subtract val from every element of the vector.
Definition: TVectorT.cxx:877
const Element * GetMatrixArray() const
Definition: TVectorT.h:85
TMatrixT< Element1 > OuterProduct(const TVectorT< Element1 > &v1, const TVectorT< Element2 > &v2)
Return the matrix M = v1 * v2&#39;.
Definition: TVectorT.cxx:1493
Bool_t operator!=(Element val) const
Are all vector elements not equal to val?
Definition: TVectorT.cxx:1151
void Add(const TVectorT< Element > &v)
Add vector v to this vector.
Definition: TVectorT.cxx:82
const char Option_t
Definition: RtypesCore.h:62
const Element & operator[](Int_t index) const
Definition: TVectorT.h:127
void Draw(Option_t *option="")
Draw this vector The histogram is named "TVectorT" by default and no title.
Definition: TVectorT.cxx:1351
TVectorT< Element > operator+(const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Return source1+source2.
Definition: TVectorT.cxx:1410
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:157
Int_t GetLwb() const
Definition: TVectorT.h:79
#define BIT(n)
Definition: Rtypes.h:120
Int_t GetUpb() const
Definition: TVectorT.h:80
TVectorT.
Definition: TMatrixTBase.h:89
Bool_t fIsOwner
data container
Definition: TVectorT.h:44
Element operator*(const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Compute the scalar product.
Definition: TVectorT.cxx:1394
#define R__ASSERT(e)
Definition: TError.h:98
TVectorT< Element > & Invert()
v[i] = 1/v[i]
Definition: TVectorT.cxx:520
Int_t GetNrows() const
Definition: TVectorT.h:81
int Int_t
Definition: RtypesCore.h:41
Element fDataStack[kSizeMax]
Definition: TVectorT.h:43
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
Element NormInf() const
Compute the infinity-norm of the vector MAX{ |v[i]| }.
Definition: TVectorT.cxx:601
Bool_t AreCompatible(const TVectorT< Element1 > &v1, const TVectorT< Element2 > &v2, Int_t verbose=0)
Check if v1 and v2 are both valid and have the same shape.
Definition: TVectorT.cxx:2129
TVectorT< Element > & AddElemDiv(TVectorT< Element > &target, Element scalar, const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Modify addition: target += scalar * ElementDiv(source1,source2) .
Definition: TVectorT.cxx:1915
const char * Class
Definition: TXMLSetup.cxx:64
void Print(Option_t *option="") const
Print the vector as a list of elements.
Definition: TVectorT.cxx:1361
TVectorT< Element > & Sqr()
Square each element of the vector.
Definition: TVectorT.cxx:480
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:739
double beta(double x, double y)
Calculates the beta function.
virtual ~TVectorT()
Definition: TVectorT.h:77
void Randomize(Element alpha, Element beta, Double_t &seed)
randomize vector elements value
Definition: TVectorT.cxx:1303
TMatrixT.
Definition: TMatrixDfwd.h:24
TVectorT< Element > & Use(Int_t lwb, Int_t upb, Element *data)
Use the array data to fill the vector lwb..upb].
Definition: TVectorT.cxx:347
#define ClassDef(name, id)
Definition: Rtypes.h:254
TVectorT< Element > & ElementDiv(TVectorT< Element > &target, const TVectorT< Element > &source)
Divide target by the source, element-by-element.
Definition: TVectorT.cxx:2073
Bool_t operator>=(Element val) const
Are all vector elements >= val?
Definition: TVectorT.cxx:1219
TVectorT< Element > & SetSub(Int_t row_lwb, const TVectorT< Element > &source)
Insert vector source starting at [row_lwb], thereby overwriting the part [row_lwb..row_lwb+nrows_source];.
Definition: TVectorT.cxx:420
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.cxx:103
Element1 Mult(const TVectorT< Element1 > &v1, const TMatrixT< Element2 > &m, const TVectorT< Element3 > &v2)
Perform v1 * M * v2, a scalar result.
Definition: TVectorT.cxx:1540
void Delete_m(Int_t size, Element *&)
Delete data pointer m, if it was assigned on the heap.
Definition: TVectorT.cxx:51
TMatrixTSym.
void Clear(Option_t *="")
Definition: TVectorT.h:180
TVectorT< Element > & Sqrt()
Take square root of all elements.
Definition: TVectorT.cxx:498
void Allocate(Int_t nrows, Int_t row_lwb=0, Int_t init=0)
Allocate new vector.
Definition: TVectorT.cxx:149
TVectorT< Element > & Shift(Int_t row_shift)
Definition: TVectorT.h:93
TVectorT< Element > & GetSub(Int_t row_lwb, Int_t row_upb, TVectorT< Element > &target, Option_t *option="S") const
Get subvector [row_lwb..row_upb]; The indexing range of the returned vector depends on the argument o...
Definition: TVectorT.cxx:371
Element Sum() const
Compute sum of elements.
Definition: TVectorT.cxx:635
Element Min() const
return minimum vector element value
Definition: TVectorT.cxx:652
Element * GetMatrixArray()
Definition: TVectorT.h:84
TPaveText * pt
Bool_t operator==(Element val) const
Are all vector elements equal to val?
Definition: TVectorT.cxx:1134
SVector< double, 2 > v
Definition: Dict.h:5
TMatrixTSparse.
TVectorT< Element > & operator=(const TVectorT< Element > &source)
Notice that this assignment does NOT change the ownership : if the storage space was adopted...
Definition: TVectorT.cxx:678
TVectorT< Element > & operator*=(Element val)
Multiply every element of the vector with val.
Definition: TVectorT.cxx:893
TVectorT< Element > & Zero()
Set vector elements to zero.
Definition: TVectorT.cxx:451
Bool_t IsValid() const
Definition: TVectorT.h:89
TVectorT< Element > & ElementMult(TVectorT< Element > &target, const TVectorT< Element > &source)
Multiply target by the source, element-by-element.
Definition: TVectorT.cxx:2030
TMarker * m
Definition: textangle.C:8
bool verbose
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:925
Bool_t operator>(Element val) const
Are all vector elements > val?
Definition: TVectorT.cxx:1202
Int_t GetNoElements() const
Definition: TVectorT.h:82
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
void MakeValid()
Definition: TVectorT.h:88
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
Definition: TObject.cxx:219
Element Norm2Sqr() const
Compute the square of the 2-norm SUM{ v[i]^2 }.
Definition: TVectorT.cxx:582
Bool_t operator<=(Element val) const
Are all vector elements <= val?
Definition: TVectorT.cxx:1185
Element Norm1() const
Compute the 1-norm of the vector SUM{ |v[i]| }.
Definition: TVectorT.cxx:565
Bool_t IsOwner() const
Definition: TVectorT.h:90
TVectorT()
Definition: TVectorT.h:59
Int_t NonZeros() const
Compute the number of elements != 0.0.
Definition: TVectorT.cxx:618
TVectorT< Element > & SelectNonZeros(const TVectorT< Element > &select)
Keep only element as selected through array select non-zero.
Definition: TVectorT.cxx:542
static Int_t init()
double Double_t
Definition: RtypesCore.h:55
Element Dot(const TVectorT< Element > &source1, const TVectorT< Element > &source2)
return inner-produvt v1 . v2
Definition: TVectorT.cxx:1476
TVectorT< Element > & ResizeTo(const TVectorT< Element > &v)
Definition: TVectorT.h:96
Mother of all ROOT objects.
Definition: TObject.h:37
Int_t fRowLwb
Definition: TVectorT.h:37
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: TVectorT.cxx:122
TVectorT< Element > & AddElemMult(TVectorT< Element > &target, Element scalar, const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Modify addition: target += scalar * ElementMult(source1,source2) .
Definition: TVectorT.cxx:1842
Int_t fNrows
Definition: TVectorT.h:36
TVectorT< Element > & Abs()
Take an absolute value of a vector, i.e. apply Abs() to each element.
Definition: TVectorT.cxx:462
Element & operator[](Int_t index)
Definition: TVectorT.h:128
Element * fElements
Definition: TVectorT.h:38
Bool_t MatchesNonZeroPattern(const TVectorT< Element > &select)
Check if vector elements as selected through array select are non-zero.
Definition: TVectorT.cxx:1236
static Element & NaNValue()
Bool_t VerifyVectorIdentity(const TVectorT< Element > &m1, const TVectorT< Element > &m2, Int_t verbose, Element maxDevAllow)
Verify that elements of the two vectors are equal within maxDevAllow .
Definition: TVectorT.cxx:2295
TVectorT< Element > & ResizeTo(Int_t n)
Definition: TVectorT.h:95
void ResetBit(UInt_t f)
Definition: TObject.h:156
Bool_t VerifyVectorValue(const TVectorT< Element > &m, Element val, Int_t verbose, Element maxDevAllow)
Validate that all elements of vector have value val within maxDevAllow .
Definition: TVectorT.cxx:2260
TVectorT< Element > operator-(const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Return source1-source2.
Definition: TVectorT.cxx:1421
const Bool_t kTRUE
Definition: Rtypes.h:91
Element Max() const
return maximum vector element value
Definition: TVectorT.cxx:664
Element * New_m(Int_t size)
default kTRUE, when Use array kFALSE
Definition: TVectorT.cxx:65
void AddSomeConstant(Element val, const TVectorT< Element > &select)
Add to vector elements as selected through array select the value val.
Definition: TVectorT.cxx:1282
const Int_t n
Definition: legend1.C:16
Bool_t SomePositive(const TVectorT< Element > &select)
Check if vector elements as selected through array select are all positive.
Definition: TVectorT.cxx:1259
TVectorT(const TVectorT< Element2 > &another)
Definition: TVectorT.h:68
Bool_t operator<(Element val) const
Are all vector elements < val?
Definition: TVectorT.cxx:1168
TVectorT< Element > & operator+=(Element val)
Add val to every element of the vector.
Definition: TVectorT.cxx:861
TVectorT< Element > & Apply(const TElementActionT< Element > &action)
Apply action to each element of the vector.
Definition: TVectorT.cxx:1320
const Element & operator()(Int_t index) const
Definition: TVectorT.h:219