Logo ROOT  
Reference Guide
TVectorT Class Reference

TVectorT

Template class of Vectors in the linear algebra package.

See The ROOT Matrix Linear Algebra classes. for the documentation of the linear algebra package

Unless otherwise specified, vector indices always start with 0, spanning up to the specified limit-1.

For (n) vectors where n <= kSizeMax (5 currently) storage space is available on the stack, thus avoiding expensive allocation/ deallocation of heap space . However, this introduces of course kSizeMax overhead for each vector object . If this is an issue recompile with a new appropriate value (>=0) for kSizeMax

Another way to assign and store vector data is through Use see for instance stressLinear.cxx file .

Note that Constructors/assignments exists for all different matrix views

For usage examples see $ROOTSYS/test/stressLinear.cxx

Definition at line 78 of file TMatrixTBase.h.

Public Member Functions

 TVectorT ()
 
 TVectorT (const TMatrixTColumn_const< Element > &mc)
 
template<class Element >
 TVectorT (const TMatrixTColumn_const< Element > &mc)
 Constructor : create vector from matrix column. More...
 
 TVectorT (const TMatrixTDiag_const< Element > &md)
 
template<class Element >
 TVectorT (const TMatrixTDiag_const< Element > &md)
 Constructor : create vector from matrix diagonal. More...
 
 TVectorT (const TMatrixTRow_const< Element > &mr)
 
template<class Element >
 TVectorT (const TMatrixTRow_const< Element > &mr)
 Constructor : create vector from matrix row. More...
 
template<class Element >
 TVectorT (const TVectorT &another)
 Copy constructor. More...
 
 TVectorT (const TVectorT< Element > &another)
 
template<class Element2 >
 TVectorT (const TVectorT< Element2 > &another)
 
 TVectorT (Int_t lwb, Int_t upb)
 
template<class Element >
 TVectorT (Int_t lwb, Int_t upb)
 Constructor [lwb..upb]-vector. More...
 
 TVectorT (Int_t lwb, Int_t upb, const Element *elements)
 
template<class Element >
 TVectorT (Int_t lwb, Int_t upb, const Element *elements)
 Constructor [lwb..upb]-vector with data copied from array elements. More...
 
 TVectorT (Int_t lwb, Int_t upb, Double_t iv1,...)
 
template<class Element >
 TVectorT (Int_t lwb, Int_t upb, Double_t iv1,...)
 Make a vector and assign initial values. More...
 
 TVectorT (Int_t n)
 
template<class Element >
 TVectorT (Int_t n)
 Constructor n-vector. More...
 
 TVectorT (Int_t n, const Element *elements)
 
template<class Element >
 TVectorT (Int_t n, const Element *elements)
 Constructor n-vector with data copied from array elements. More...
 
virtual ~TVectorT ()
 
TVectorT< Element > & Abs ()
 Take an absolute value of a vector, i.e. apply Abs() to each element. More...
 
void Add (const TVectorT< Element > &v)
 Add vector v to this vector. More...
 
void Add (const TVectorT< Element > &v1, const TVectorT< Element > &v2)
 Set this vector to v1+v2. More...
 
void AddSomeConstant (Element val, const TVectorT< Element > &select)
 Add to vector elements as selected through array select the value val. More...
 
TVectorT< Element > & Apply (const TElementActionT< Element > &action)
 Apply action to each element of the vector. More...
 
TVectorT< Element > & Apply (const TElementPosActionT< Element > &action)
 Apply action to each element of the vector. More...
 
TClassClass ()
 
void Clear (Option_t *="")
 
void Draw (Option_t *option="")
 Draw this vector The histogram is named "TVectorT" by default and no title. More...
 
Int_t GetLwb () const
 
Element * GetMatrixArray ()
 
const Element * GetMatrixArray () const
 
Int_t GetNoElements () const
 
Int_t GetNrows () const
 
TVectorT< Element > GetSub (Int_t row_lwb, Int_t row_upb, Option_t *option="S") const
 
TVectorT< Element > & GetSub (Int_t row_lwb, Int_t row_upb, TVectorT< Element > &target, Option_t *option="S") const
 
Int_t GetUpb () const
 
void Invalidate ()
 
TVectorT< Element > & Invert ()
 v[i] = 1/v[i] More...
 
Bool_t IsOwner () const
 
Bool_t IsValid () const
 
void MakeValid ()
 
Bool_t MatchesNonZeroPattern (const TVectorT< Element > &select)
 Check if vector elements as selected through array select are non-zero. More...
 
Element Max () const
 return maximum vector element value More...
 
Element Min () const
 return minimum vector element value More...
 
Int_t NonZeros () const
 Compute the number of elements != 0.0. More...
 
Element Norm1 () const
 Compute the 1-norm of the vector SUM{ |v[i]| }. More...
 
Element Norm2Sqr () const
 Compute the square of the 2-norm SUM{ v[i]^2 }. More...
 
Element NormInf () const
 Compute the infinity-norm of the vector MAX{ |v[i]| }. More...
 
Bool_t operator!= (Element val) const
 Are all vector elements not equal to val? More...
 
Element & operator() (Int_t index)
 
const Element & operator() (Int_t index) const
 
TVectorT< Element > & operator*= (const TMatrixT< Element > &a)
 "Inplace" multiplication target = A*target. More...
 
TVectorT< Element > & operator*= (const TMatrixTSparse< Element > &a)
 "Inplace" multiplication target = A*target. More...
 
TVectorT< Element > & operator*= (const TMatrixTSym< Element > &a)
 "Inplace" multiplication target = A*target. More...
 
TVectorT< Element > & operator*= (Element val)
 Multiply every element of the vector with val. More...
 
TVectorT< Element > & operator+= (const TVectorT< Element > &source)
 Add vector source. More...
 
TVectorT< Element > & operator+= (Element val)
 Add val to every element of the vector. More...
 
TVectorT< Element > & operator-= (const TVectorT< Element > &source)
 Subtract vector source. More...
 
TVectorT< Element > & operator-= (Element val)
 Subtract val from every element of the vector. More...
 
Bool_t operator< (Element val) const
 Are all vector elements < val? More...
 
Bool_t operator<= (Element val) const
 Are all vector elements <= val? More...
 
TVectorT< Element > & operator= (const TMatrixTColumn_const< Element > &mc)
 
template<class Element >
TVectorT< Element > & operator= (const TMatrixTColumn_const< Element > &mc)
 Assign a matrix column to a vector. More...
 
TVectorT< Element > & operator= (const TMatrixTDiag_const< Element > &md)
 
template<class Element >
TVectorT< Element > & operator= (const TMatrixTDiag_const< Element > &md)
 Assign the matrix diagonal to a vector. More...
 
TVectorT< Element > & operator= (const TMatrixTRow_const< Element > &mr)
 
template<class Element >
TVectorT< Element > & operator= (const TMatrixTRow_const< Element > &mr)
 Assign a matrix row to a vector. More...
 
TVectorT< Element > & operator= (const TMatrixTSparseDiag_const< Element > &md)
 
template<class Element >
TVectorT< Element > & operator= (const TMatrixTSparseDiag_const< Element > &md)
 Assign a sparse matrix diagonal to a vector. More...
 
TVectorT< Element > & operator= (const TMatrixTSparseRow_const< Element > &md)
 
template<class Element >
TVectorT< Element > & operator= (const TMatrixTSparseRow_const< Element > &mr)
 Assign a sparse matrix row to a vector. More...
 
TVectorT< Element > & operator= (const TVectorT< Element > &source)
 
template<class Element >
TVectorT< Element > & operator= (const TVectorT< Element > &source)
 Notice that this assignment does NOT change the ownership : if the storage space was adopted, source is copied to this space . More...
 
template<class Element2 >
TVectorT< Element > & operator= (const TVectorT< Element2 > &source)
 
TVectorT< Element > & operator= (Element val)
 
template<class Element >
TVectorT< Element > & operator= (Element val)
 Assign val to every element of the vector. More...
 
Bool_t operator== (Element val) const
 Are all vector elements equal to val? More...
 
Bool_t operator> (Element val) const
 Are all vector elements > val? More...
 
Bool_t operator>= (Element val) const
 Are all vector elements >= val? More...
 
Element & operator[] (Int_t index)
 
const Element & operator[] (Int_t index) const
 
void Print (Option_t *option="") const
 Print the vector as a list of elements. More...
 
void Randomize (Element alpha, Element beta, Double_t &seed)
 randomize vector elements value More...
 
TVectorT< Element > & ResizeTo (const TVectorT< Element > &v)
 
TVectorT< Element > & ResizeTo (Int_t lwb, Int_t upb)
 Resize the vector to [lwb:upb] . More...
 
TVectorT< Element > & ResizeTo (Int_t n)
 
TVectorT< Element > & SelectNonZeros (const TVectorT< Element > &select)
 Keep only element as selected through array select non-zero. More...
 
void SetElements (const Element *elements)
 
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];. More...
 
TVectorT< Element > & Shift (Int_t row_shift)
 
Bool_t SomePositive (const TVectorT< Element > &select)
 Check if vector elements as selected through array select are all positive. More...
 
TVectorT< Element > & Sqr ()
 Square each element of the vector. More...
 
TVectorT< Element > & Sqrt ()
 Take square root of all elements. More...
 
Element Sum () const
 Compute sum of elements. More...
 
const TVectorT< Element > & Use (const TVectorT< Element > &v) const
 
const TVectorT< Element > & Use (Int_t lwb, Int_t upb, const Element *data) const
 
TVectorT< Element > & Use (Int_t lwb, Int_t upb, Element *data)
 Use the array data to fill the vector lwb..upb]. More...
 
const TVectorT< Element > & Use (Int_t n, const Element *data) const
 
TVectorT< Element > & Use (Int_t n, Element *data)
 
TVectorT< Element > & Use (TVectorT< Element > &v)
 
TVectorT< Element > & Zero ()
 Set vector elements to zero. More...
 

Protected Types

enum  { kSizeMax = 5 }
 
enum  { kWorkMax = 100 }
 
enum  EVectorStatusBits { kStatus = BIT(14) }
 

Protected Member Functions

void Allocate (Int_t nrows, Int_t row_lwb=0, Int_t init=0)
 Allocate new vector. More...
 
void Delete_m (Int_t size, Element *&)
 Delete data pointer m, if it was assigned on the heap. More...
 
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 . More...
 
Element * New_m (Int_t size)
 default kTRUE, when Use array kFALSE More...
 

Protected Attributes

Element fDataStack [kSizeMax]
 
Element * fElements {nullptr}
 
Bool_t fIsOwner {kTRUE}
 data container More...
 
Int_t fNrows {0}
 
Int_t fRowLwb {0}
 

#include <TMatrixTBase.h>

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kSizeMax 

Definition at line 40 of file TVectorT.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
kWorkMax 

Definition at line 41 of file TVectorT.h.

◆ EVectorStatusBits

Enumerator
kStatus 

Definition at line 53 of file TVectorT.h.

Constructor & Destructor Documentation

◆ TVectorT() [1/20]

TVectorT::TVectorT ( )
inline

Definition at line 59 of file TVectorT.h.

◆ TVectorT() [2/20]

TVectorT::TVectorT ( Int_t  n)
explicit

◆ TVectorT() [3/20]

TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb 
)

◆ TVectorT() [4/20]

TVectorT::TVectorT ( Int_t  n,
const Element *  elements 
)

◆ TVectorT() [5/20]

TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb,
const Element *  elements 
)

◆ TVectorT() [6/20]

TVectorT::TVectorT ( const TVectorT< Element > &  another)

◆ TVectorT() [7/20]

TVectorT::TVectorT ( const TMatrixTRow_const< Element > &  mr)

◆ TVectorT() [8/20]

TVectorT::TVectorT ( const TMatrixTColumn_const< Element > &  mc)

◆ TVectorT() [9/20]

TVectorT::TVectorT ( const TMatrixTDiag_const< Element > &  md)

◆ TVectorT() [10/20]

template<class Element2 >
TVectorT::TVectorT ( const TVectorT< Element2 > &  another)
inline

Definition at line 68 of file TVectorT.h.

◆ TVectorT() [11/20]

TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb,
Double_t  iv1,
  ... 
)

◆ ~TVectorT()

virtual TVectorT::~TVectorT ( )
inlinevirtual

Definition at line 77 of file TVectorT.h.

◆ TVectorT() [12/20]

template<class Element >
TVectorT::TVectorT ( Int_t  n)

Constructor n-vector.

Definition at line 177 of file TVectorT.cxx.

◆ TVectorT() [13/20]

template<class Element >
TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb 
)

Constructor [lwb..upb]-vector.

Definition at line 186 of file TVectorT.cxx.

◆ TVectorT() [14/20]

template<class Element >
TVectorT::TVectorT ( Int_t  n,
const Element *  elements 
)

Constructor n-vector with data copied from array elements.

Definition at line 195 of file TVectorT.cxx.

◆ TVectorT() [15/20]

template<class Element >
TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb,
const Element *  elements 
)

Constructor [lwb..upb]-vector with data copied from array elements.

Definition at line 205 of file TVectorT.cxx.

◆ TVectorT() [16/20]

template<class Element >
TVectorT::TVectorT ( const TVectorT another)

Copy constructor.

Definition at line 215 of file TVectorT.cxx.

◆ TVectorT() [17/20]

template<class Element >
TVectorT::TVectorT ( const TMatrixTRow_const< Element > &  mr)

Constructor : create vector from matrix row.

Definition at line 226 of file TVectorT.cxx.

◆ TVectorT() [18/20]

template<class Element >
TVectorT::TVectorT ( const TMatrixTColumn_const< Element > &  mc)

Constructor : create vector from matrix column.

Definition at line 238 of file TVectorT.cxx.

◆ TVectorT() [19/20]

template<class Element >
TVectorT::TVectorT ( const TMatrixTDiag_const< Element > &  md)

Constructor : create vector from matrix diagonal.

Definition at line 250 of file TVectorT.cxx.

◆ TVectorT() [20/20]

template<class Element >
TVectorT::TVectorT ( Int_t  lwb,
Int_t  upb,
Double_t  iv1,
  ... 
)

Make a vector and assign initial values.

Argument list should contain Element values to assign to vector elements. The list must be terminated by the string "END". Example: TVectorT foo(1,3,0.0,1.0,1.5,"END");

Definition at line 265 of file TVectorT.cxx.

Member Function Documentation

◆ Abs()

TVectorT< Element > & TVectorT::Abs ( )

Take an absolute value of a vector, i.e. apply Abs() to each element.

Definition at line 464 of file TVectorT.cxx.

◆ Add() [1/2]

void TVectorT::Add ( const TVectorT< Element > &  v)

Add vector v to this vector.

Definition at line 84 of file TVectorT.cxx.

◆ Add() [2/2]

void TVectorT::Add ( const TVectorT< Element > &  v1,
const TVectorT< Element > &  v2 
)

Set this vector to v1+v2.

Definition at line 102 of file TVectorT.cxx.

◆ AddSomeConstant()

void TVectorT::AddSomeConstant ( Element  val,
const TVectorT< Element > &  select 
)

Add to vector elements as selected through array select the value val.

Definition at line 1284 of file TVectorT.cxx.

◆ Allocate()

void TVectorT::Allocate ( Int_t  nrows,
Int_t  row_lwb = 0,
Int_t  init = 0 
)
protected

Allocate new vector.

Arguments are number of rows and row lowerbound (0 default).

Definition at line 151 of file TVectorT.cxx.

◆ Apply() [1/2]

TVectorT< Element > & TVectorT::Apply ( const TElementActionT< Element > &  action)

Apply action to each element of the vector.

Definition at line 1322 of file TVectorT.cxx.

◆ Apply() [2/2]

TVectorT< Element > & TVectorT::Apply ( const TElementPosActionT< Element > &  action)

Apply action to each element of the vector.

In action the location of the current element is known.

Definition at line 1335 of file TVectorT.cxx.

◆ Class()

TClass * TVectorT< double >::Class ( )

◆ Clear()

void TVectorT::Clear ( Option_t = "")
inline

Definition at line 180 of file TVectorT.h.

◆ Delete_m()

void TVectorT::Delete_m ( Int_t  size,
Element *&  m 
)
protected

Delete data pointer m, if it was assigned on the heap.

Definition at line 53 of file TVectorT.cxx.

◆ Draw()

void TVectorT::Draw ( Option_t option = "")

Draw this vector The histogram is named "TVectorT" by default and no title.

Definition at line 1353 of file TVectorT.cxx.

◆ GetLwb()

Int_t TVectorT::GetLwb ( ) const
inline

Definition at line 79 of file TVectorT.h.

◆ GetMatrixArray() [1/2]

Element* TVectorT::GetMatrixArray ( )
inline

Definition at line 84 of file TVectorT.h.

◆ GetMatrixArray() [2/2]

const Element* TVectorT::GetMatrixArray ( ) const
inline

Definition at line 85 of file TVectorT.h.

◆ GetNoElements()

Int_t TVectorT::GetNoElements ( ) const
inline

Definition at line 82 of file TVectorT.h.

◆ GetNrows()

Int_t TVectorT::GetNrows ( ) const
inline

Definition at line 81 of file TVectorT.h.

◆ GetSub() [1/2]

TVectorT<Element> TVectorT::GetSub ( Int_t  row_lwb,
Int_t  row_upb,
Option_t option = "S" 
) const

◆ GetSub() [2/2]

TVectorT<Element>& TVectorT::GetSub ( Int_t  row_lwb,
Int_t  row_upb,
TVectorT< Element > &  target,
Option_t option = "S" 
) const

◆ GetUpb()

Int_t TVectorT::GetUpb ( ) const
inline

Definition at line 80 of file TVectorT.h.

◆ Invalidate()

void TVectorT::Invalidate ( )
inline

Definition at line 87 of file TVectorT.h.

◆ Invert()

TVectorT< Element > & TVectorT::Invert ( )

v[i] = 1/v[i]

Definition at line 522 of file TVectorT.cxx.

◆ IsOwner()

Bool_t TVectorT::IsOwner ( ) const
inline

Definition at line 90 of file TVectorT.h.

◆ IsValid()

Bool_t TVectorT::IsValid ( ) const
inline

Definition at line 89 of file TVectorT.h.

◆ MakeValid()

void TVectorT::MakeValid ( )
inline

Definition at line 88 of file TVectorT.h.

◆ MatchesNonZeroPattern()

Bool_t TVectorT::MatchesNonZeroPattern ( const TVectorT< Element > &  select)

Check if vector elements as selected through array select are non-zero.

Definition at line 1238 of file TVectorT.cxx.

◆ Max()

Element TVectorT::Max ( ) const

return maximum vector element value

Definition at line 666 of file TVectorT.cxx.

◆ Memcpy_m()

Int_t TVectorT::Memcpy_m ( Element *  newp,
const Element *  oldp,
Int_t  copySize,
Int_t  newSize,
Int_t  oldSize 
)
protected

Copy copySize doubles from *oldp to *newp .

However take care of the situation where both pointers are assigned to the same stack space

Definition at line 124 of file TVectorT.cxx.

◆ Min()

Element TVectorT::Min ( ) const

return minimum vector element value

Definition at line 654 of file TVectorT.cxx.

◆ New_m()

Element * TVectorT::New_m ( Int_t  size)
protected

default kTRUE, when Use array kFALSE

Return data pointer .

if requested size <= kSizeMax, assign pointer to the stack space

Definition at line 67 of file TVectorT.cxx.

◆ NonZeros()

Int_t TVectorT::NonZeros ( ) const

Compute the number of elements != 0.0.

Definition at line 620 of file TVectorT.cxx.

◆ Norm1()

Element TVectorT::Norm1 ( ) const

Compute the 1-norm of the vector SUM{ |v[i]| }.

Definition at line 567 of file TVectorT.cxx.

◆ Norm2Sqr()

Element TVectorT::Norm2Sqr ( ) const

Compute the square of the 2-norm SUM{ v[i]^2 }.

Definition at line 584 of file TVectorT.cxx.

◆ NormInf()

Element TVectorT::NormInf ( ) const

Compute the infinity-norm of the vector MAX{ |v[i]| }.

Definition at line 603 of file TVectorT.cxx.

◆ operator!=()

Bool_t TVectorT::operator!= ( Element  val) const

Are all vector elements not equal to val?

Definition at line 1153 of file TVectorT.cxx.

◆ operator()() [1/2]

Element& TVectorT::operator() ( Int_t  index)
inline

◆ operator()() [2/2]

const Element& TVectorT::operator() ( Int_t  index) const
inline

◆ operator*=() [1/4]

TVectorT< Element > & TVectorT::operator*= ( const TMatrixT< Element > &  a)

"Inplace" multiplication target = A*target.

A needn't be a square one If target has to be resized, it should own the storage: fIsOwner = kTRUE

Definition at line 952 of file TVectorT.cxx.

◆ operator*=() [2/4]

TVectorT< Element > & TVectorT::operator*= ( const TMatrixTSparse< Element > &  a)

"Inplace" multiplication target = A*target.

A needn't be a square one If target has to be resized, it should own the storage: fIsOwner = kTRUE

Definition at line 1019 of file TVectorT.cxx.

◆ operator*=() [3/4]

TVectorT< Element > & TVectorT::operator*= ( const TMatrixTSym< Element > &  a)

"Inplace" multiplication target = A*target.

A is symmetric . vector size will not change

Definition at line 1082 of file TVectorT.cxx.

◆ operator*=() [4/4]

TVectorT< Element > & TVectorT::operator*= ( Element  val)

Multiply every element of the vector with val.

Definition at line 895 of file TVectorT.cxx.

◆ operator+=() [1/2]

TVectorT< Element > & TVectorT::operator+= ( const TVectorT< Element > &  source)

Add vector source.

Definition at line 911 of file TVectorT.cxx.

◆ operator+=() [2/2]

TVectorT< Element > & TVectorT::operator+= ( Element  val)

Add val to every element of the vector.

Definition at line 863 of file TVectorT.cxx.

◆ operator-=() [1/2]

TVectorT< Element > & TVectorT::operator-= ( const TVectorT< Element > &  source)

Subtract vector source.

Definition at line 931 of file TVectorT.cxx.

◆ operator-=() [2/2]

TVectorT< Element > & TVectorT::operator-= ( Element  val)

Subtract val from every element of the vector.

Definition at line 879 of file TVectorT.cxx.

◆ operator<()

Bool_t TVectorT::operator< ( Element  val) const

Are all vector elements < val?

Definition at line 1170 of file TVectorT.cxx.

◆ operator<=()

Bool_t TVectorT::operator<= ( Element  val) const

Are all vector elements <= val?

Definition at line 1187 of file TVectorT.cxx.

◆ operator=() [1/15]

TVectorT<Element>& TVectorT::operator= ( const TMatrixTColumn_const< Element > &  mc)

◆ operator=() [2/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TMatrixTColumn_const< Element > &  mc)

Assign a matrix column to a vector.

Definition at line 729 of file TVectorT.cxx.

◆ operator=() [3/15]

TVectorT<Element>& TVectorT::operator= ( const TMatrixTDiag_const< Element > &  md)

◆ operator=() [4/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TMatrixTDiag_const< Element > &  md)

Assign the matrix diagonal to a vector.

Definition at line 760 of file TVectorT.cxx.

◆ operator=() [5/15]

TVectorT<Element>& TVectorT::operator= ( const TMatrixTRow_const< Element > &  mr)

◆ operator=() [6/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TMatrixTRow_const< Element > &  mr)

Assign a matrix row to a vector.

Definition at line 698 of file TVectorT.cxx.

◆ operator=() [7/15]

TVectorT<Element>& TVectorT::operator= ( const TMatrixTSparseDiag_const< Element > &  md)

◆ operator=() [8/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TMatrixTSparseDiag_const< Element > &  md)

Assign a sparse matrix diagonal to a vector.

Definition at line 823 of file TVectorT.cxx.

◆ operator=() [9/15]

TVectorT<Element>& TVectorT::operator= ( const TMatrixTSparseRow_const< Element > &  md)

◆ operator=() [10/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TMatrixTSparseRow_const< Element > &  mr)

Assign a sparse matrix row to a vector.

The matrix row is implicitly transposed to allow the assignment in the strict sense.

Definition at line 792 of file TVectorT.cxx.

◆ operator=() [11/15]

TVectorT<Element>& TVectorT::operator= ( const TVectorT< Element > &  source)

◆ operator=() [12/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( const TVectorT< Element > &  source)

Notice that this assignment does NOT change the ownership : if the storage space was adopted, source is copied to this space .

Definition at line 680 of file TVectorT.cxx.

◆ operator=() [13/15]

template<class Element2 >
TVectorT<Element>& TVectorT::operator= ( const TVectorT< Element2 > &  source)
inline

Definition at line 136 of file TVectorT.h.

◆ operator=() [14/15]

TVectorT<Element>& TVectorT::operator= ( Element  val)

◆ operator=() [15/15]

template<class Element >
TVectorT<Element>& TVectorT::operator= ( Element  val)

Assign val to every element of the vector.

Definition at line 847 of file TVectorT.cxx.

◆ operator==()

Bool_t TVectorT::operator== ( Element  val) const

Are all vector elements equal to val?

Definition at line 1136 of file TVectorT.cxx.

◆ operator>()

Bool_t TVectorT::operator> ( Element  val) const

Are all vector elements > val?

Definition at line 1204 of file TVectorT.cxx.

◆ operator>=()

Bool_t TVectorT::operator>= ( Element  val) const

Are all vector elements >= val?

Definition at line 1221 of file TVectorT.cxx.

◆ operator[]() [1/2]

Element& TVectorT::operator[] ( Int_t  index)
inline

Definition at line 128 of file TVectorT.h.

◆ operator[]() [2/2]

const Element& TVectorT::operator[] ( Int_t  index) const
inline

Definition at line 127 of file TVectorT.h.

◆ Print()

void TVectorT::Print ( Option_t option = "") const

Print the vector as a list of elements.

Definition at line 1363 of file TVectorT.cxx.

◆ Randomize()

void TVectorT::Randomize ( Element  alpha,
Element  beta,
Double_t seed 
)

randomize vector elements value

Definition at line 1305 of file TVectorT.cxx.

◆ ResizeTo() [1/3]

TVectorT<Element>& TVectorT::ResizeTo ( const TVectorT< Element > &  v)
inline

Definition at line 96 of file TVectorT.h.

◆ ResizeTo() [2/3]

TVectorT< Element > & TVectorT::ResizeTo ( Int_t  lwb,
Int_t  upb 
)

Resize the vector to [lwb:upb] .

New dynamic elemenst are created, the overlapping part of the old ones are copied to the new structures, then the old elements are deleted.

Definition at line 294 of file TVectorT.cxx.

◆ ResizeTo() [3/3]

TVectorT<Element>& TVectorT::ResizeTo ( Int_t  n)
inline

Definition at line 95 of file TVectorT.h.

◆ SelectNonZeros()

TVectorT< Element > & TVectorT::SelectNonZeros ( const TVectorT< Element > &  select)

Keep only element as selected through array select non-zero.

Definition at line 544 of file TVectorT.cxx.

◆ SetElements()

void TVectorT::SetElements ( const Element *  elements)
inline

Definition at line 91 of file TVectorT.h.

◆ SetSub()

TVectorT< Element > & TVectorT::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 at line 422 of file TVectorT.cxx.

◆ Shift()

TVectorT<Element>& TVectorT::Shift ( Int_t  row_shift)
inline

Definition at line 93 of file TVectorT.h.

◆ SomePositive()

Bool_t TVectorT::SomePositive ( const TVectorT< Element > &  select)

Check if vector elements as selected through array select are all positive.

Definition at line 1261 of file TVectorT.cxx.

◆ Sqr()

TVectorT< Element > & TVectorT::Sqr ( )

Square each element of the vector.

Definition at line 482 of file TVectorT.cxx.

◆ Sqrt()

TVectorT< Element > & TVectorT::Sqrt ( )

Take square root of all elements.

Definition at line 500 of file TVectorT.cxx.

◆ Sum()

Element TVectorT::Sum ( ) const

Compute sum of elements.

Definition at line 637 of file TVectorT.cxx.

◆ Use() [1/6]

const TVectorT<Element>& TVectorT::Use ( const TVectorT< Element > &  v) const

◆ Use() [2/6]

const TVectorT<Element>& TVectorT::Use ( Int_t  lwb,
Int_t  upb,
const Element *  data 
) const
inline

Definition at line 99 of file TVectorT.h.

◆ Use() [3/6]

TVectorT< Element > & TVectorT::Use ( Int_t  lwb,
Int_t  upb,
Element *  data 
)

Use the array data to fill the vector lwb..upb].

Definition at line 349 of file TVectorT.cxx.

◆ Use() [4/6]

const TVectorT< Element > & TVectorT::Use ( Int_t  n,
const Element *  data 
) const
inline

Definition at line 195 of file TVectorT.h.

◆ Use() [5/6]

TVectorT< Element > & TVectorT::Use ( Int_t  n,
Element *  data 
)
inline

Definition at line 194 of file TVectorT.h.

◆ Use() [6/6]

TVectorT<Element>& TVectorT::Use ( TVectorT< Element > &  v)

◆ Zero()

TVectorT< Element > & TVectorT::Zero ( )

Set vector elements to zero.

Definition at line 453 of file TVectorT.cxx.

Member Data Documentation

◆ fDataStack

Element TVectorT::fDataStack[kSizeMax]
protected

Definition at line 43 of file TVectorT.h.

◆ fElements

Element* TVectorT::fElements {nullptr}
protected

Definition at line 38 of file TVectorT.h.

◆ fIsOwner

Bool_t TVectorT::fIsOwner {kTRUE}
protected

data container

Definition at line 44 of file TVectorT.h.

◆ fNrows

Int_t TVectorT::fNrows {0}
protected

Definition at line 36 of file TVectorT.h.

◆ fRowLwb

Int_t TVectorT::fRowLwb {0}
protected

Definition at line 37 of file TVectorT.h.


The documentation for this class was generated from the following files: