ROOT logo
ROOT » MATH » MATRIX » TVectorT<float>

class TVectorT<float>: public TObject


TVectorT

Template class of Vectors in 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


This class is also known as (typedefs to this class)

TVectorF, TVector, TVectorT<Float_t>

Function Members (Methods)

public:
TVectorT<float>()
TVectorT<float>(Int_t n)
TVectorT<float>(const TVectorT<float>& another)
TVectorT<float>(const TMatrixTRow_const<float>& mr)
TVectorT<float>(const TMatrixTColumn_const<float>& mc)
TVectorT<float>(const TMatrixTDiag_const<float>& md)
TVectorT<float>(const TVectorT<double>& another)
TVectorT<float>(Int_t lwb, Int_t upb)
TVectorT<float>(Int_t n, const float* elements)
TVectorT<float>(Int_t lwb, Int_t upb, const float* elements)
virtual~TVectorT<float>()
TVectorT<float>&Abs()
voidTObject::AbstractMethod(const char* method) const
voidAdd(const TVectorT<float>& v)
voidAdd(const TVectorT<float>& v1, const TVectorT<float>& v2)
voidAddSomeConstant(float val, const TVectorT<float>& select)
virtual voidTObject::AppendPad(Option_t* option = "")
TVectorT<float>&Apply(const TElementActionT<float>& action)
TVectorT<float>&Apply(const TElementPosActionT<float>& action)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
static TClass*TObject::Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* = "")
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* option = "")MENU
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tGetLwb() const
float*GetMatrixArray()
const float*GetMatrixArray() const
virtual const char*TObject::GetName() const
Int_tGetNoElements() const
Int_tGetNrows() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TVectorT<float>GetSub(Int_t row_lwb, Int_t row_upb, Option_t* option = "S") const
TVectorT<float>&GetSub(Int_t row_lwb, Int_t row_upb, TVectorT<float>& target, Option_t* option = "S") const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Int_tGetUpb() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidInvalidate()
TVectorT<float>&Invert()
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual TClass*TObject::IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsOwner() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidMakeValid()
Bool_tMatchesNonZeroPattern(const TVectorT<float>& select)
floatMax() const
voidTObject::MayNotUse(const char* method) const
floatMin() const
Int_tNonZeros() const
floatNorm1() const
floatNorm2Sqr() const
floatNormInf() const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
Bool_toperator!=(float val) const
const float&operator()(Int_t ind) const
float&operator()(Int_t ind)
TVectorT<float>&operator*=(float val)
TVectorT<float>&operator*=(const TMatrixT<float>& a)
TVectorT<float>&operator*=(const TMatrixTSym<float>& a)
TVectorT<float>&operator*=(const TMatrixTSparse<float>& a)
TVectorT<float>&operator+=(float val)
TVectorT<float>&operator+=(const TVectorT<float>& source)
TVectorT<float>&operator-=(float val)
TVectorT<float>&operator-=(const TVectorT<float>& source)
Bool_toperator<(float val) const
Bool_toperator<=(float val) const
TVectorT<float>&operator=(const TVectorT<float>& source)
TVectorT<float>&operator=(const TMatrixTRow_const<float>& mr)
TVectorT<float>&operator=(const TMatrixTColumn_const<float>& mc)
TVectorT<float>&operator=(const TMatrixTDiag_const<float>& md)
TVectorT<float>&operator=(const TMatrixTSparseRow_const<float>& md)
TVectorT<float>&operator=(const TMatrixTSparseDiag_const<float>& md)
TVectorT<float>&operator=(float val)
Bool_toperator==(float val) const
Bool_toperator>(float val) const
Bool_toperator>=(float val) const
const float&operator[](Int_t index) const
float&operator[](Int_t index)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") constMENU
virtual voidTObject::Print(Option_t* option = "") const
voidRandomize(float alpha, float beta, Double_t& seed)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
TVectorT<float>&ResizeTo(Int_t n)
TVectorT<float>&ResizeTo(const TVectorT<float>& v)
TVectorT<float>&ResizeTo(Int_t lwb, Int_t upb)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
TVectorT<float>&SelectNonZeros(const TVectorT<float>& select)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetElements(const float* elements)
static voidTObject::SetObjectStat(Bool_t stat)
TVectorT<float>&SetSub(Int_t row_lwb, const TVectorT<float>& source)
virtual voidTObject::SetUniqueID(UInt_t uid)
TVectorT<float>&Shift(Int_t row_shift)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
Bool_tSomePositive(const TVectorT<float>& select)
TVectorT<float>&Sqr()
TVectorT<float>&Sqrt()
virtual voidStreamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(TBuffer& b)
floatSum() const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TVectorT<float>&Use(TVectorT<float>& v)
const TVectorT<float>&Use(const TVectorT<float>& v) const
TVectorT<float>&Use(Int_t n, float* data)
const TVectorT<float>&Use(Int_t n, const float* data) const
TVectorT<float>&Use(Int_t lwb, Int_t upb, float* data)
const TVectorT<float>&Use(Int_t lwb, Int_t upb, const float* data) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
TVectorT<float>&Zero()
protected:
voidAllocate(Int_t nrows, Int_t row_lwb = 0, Int_t init = 0)
voidDelete_m(Int_t size, float*&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
Int_tMemcpy_m(float* newp, const float* oldp, Int_t copySize, Int_t newSize, Int_t oldSize)
float*New_m(Int_t size)

Data Members

private:
enum { kSizeMax
kWorkMax
};
enum EVectorStatusBits { kStatus
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
floatfDataStack[5]! data container
float*fElements[fNrows] elements themselves
Bool_tfIsOwner!default kTRUE, when Use array kFALSE
Int_tfNrowsnumber of rows
Int_tfRowLwblower bound of the row index

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Element* New_m(Int_t size)
void Delete_m(Int_t size, float*& )
Int_t Memcpy_m(float* newp, const float* oldp, Int_t copySize, Int_t newSize, Int_t oldSize)
Allocate(another.GetUpb()-another.GetLwb()+1,another.GetLwb())
Int_t GetLwb() const
{ return fRowLwb; }
Int_t GetUpb() const
{ return fNrows+fRowLwb-1; }
Int_t GetNrows() const
{ return fNrows; }
Int_t GetNoElements() const
{ return fNrows; }
Element * GetMatrixArray()
{ return fElements; }
const Element * GetMatrixArray()
{ return fElements; }
void Invalidate()
void MakeValid()
Bool_t IsValid() const
{ return !TestBit(kStatus); }
Bool_t IsOwner() const
{ return fIsOwner; }
void SetElements(const float* elements)
TVectorT<Element> & Shift(Int_t row_shift)
{ fRowLwb += row_shift; return *this; }
TVectorT<Element> & ResizeTo(Int_t lwb, Int_t upb)
TVectorT<Element> & ResizeTo(Int_t n)
{ return ResizeTo(0,n-1); }
TVectorT<Element> & ResizeTo(const TVectorT<Element> &v)
{ return ResizeTo(v.GetLwb(),v.GetUpb()); }
TVectorT<Element> & Use(Int_t lwb,Int_t upb,Element *data)
const TVectorT<Element> & Use(Int_t lwb,Int_t upb,const Element *data)
{ return (const TVectorT<Element>&)(const_cast<TVectorT<Element> *>(this))->Use(lwb,upb,const_cast<Element *>(data)); }
TVectorT<Element> & Use(Int_t n,Element *data)
const TVectorT<Element> & Use(Int_t n,const Element *data)
TVectorT<Element> & Use(TVectorT<Element> &v)
const TVectorT<Element> & Use(const TVectorT<Element> &v)
TVectorT<Element> & GetSub(Int_t row_lwb, Int_t row_upb, TVectorT<float>& target, Option_t* option = "S") const
TVectorT<Element> GetSub(Int_t row_lwb, Int_t row_upb, Option_t* option = "S") const
TVectorT<Element> & SetSub(Int_t row_lwb, const TVectorT<float>& source)
TVectorT<Element> & Zero()
TVectorT<Element> & Abs()
TVectorT<Element> & Sqr()
TVectorT<Element> & Sqrt()
TVectorT<Element> & Invert()
TVectorT<Element> & SelectNonZeros(const TVectorT<float>& select)
Element Norm1() const
Element Norm2Sqr() const
Element NormInf() const
Int_t NonZeros() const
Element Sum() const
Element Min() const
Element Max() const
const Element & operator()(Int_t index)
Element & operator()(Int_t index)
const Element & operator[](Int_t index)
{ return (*this)(index); }
Element & operator[](Int_t index)
{ return (*this)(index); }
TVectorT<Element> & operator=(const TVectorT <Element> &source)
TVectorT<Element> & operator=(const TMatrixTRow_const <Element> &mr)
TVectorT<Element> & operator=(const TMatrixTColumn_const <Element> &mc)
TVectorT<Element> & operator=(const TMatrixTDiag_const <Element> &md)
TVectorT<Element> & operator=(const TMatrixTSparseRow_const <Element> &md)
TVectorT<Element> & operator=(const TMatrixTSparseDiag_const<Element> &md)
template <class Element2> TVectorT<Element> & operator=(const TVectorT<Element2> &source)
TVectorT<Element> & operator+=(Element val)
TVectorT<Element> & operator-=(Element val)
TVectorT<Element> & operator*=(Element val)
TVectorT<Element> & operator+=(const TVectorT <Element> &source)
TVectorT<Element> & operator-=(const TVectorT <Element> &source)
TVectorT<Element> & operator*=(const TMatrixT <Element> &a)
TVectorT<Element> & operator*=(const TMatrixTSym <Element> &a)
TVectorT<Element> & operator*=(const TMatrixTSparse<Element> &a)
Bool_t operator==(float val) const
Bool_t operator!=(float val) const
Bool_t operator<(float val) const
Bool_t operator<=(float val) const
Bool_t operator>(float val) const
Bool_t operator>=(float val) const
Bool_t MatchesNonZeroPattern(const TVectorT<float>& select)
Bool_t SomePositive(const TVectorT<float>& select)
void AddSomeConstant(float val, const TVectorT<float>& select)
void Randomize(float alpha, float beta, Double_t& seed)
TVectorT<Element> & Apply(const TElementActionT <Element> &action)
TVectorT<Element> & Apply(const TElementPosActionT<Element> &action)
void Add(const TVectorT<float>& v)
void Add(const TVectorT<float>& v1, const TVectorT<float>& v2)
void Clear(Option_t* = "")
void Draw(Option_t* option = "")
void Print(Option_t* option = "") const