Project
Loading...
Searching...
No Matches
o2::fwdalign::VectorSparse Class Reference

#include <VectorSparse.h>

Inherits TObject.

Public Member Functions

 VectorSparse ()
 
 VectorSparse (const VectorSparse &src)
 copy c-tor
 
 ~VectorSparse () override
 
void Print (Option_t *option="") const override
 print itself
 
Int_t GetNElems () const
 
UShort_t * GetIndices () const
 
Double_t * GetElems () const
 
UShort_t & GetIndex (Int_t i)
 
Double_t & GetElem (Int_t i) const
 
void Clear (Option_t *option="") override
 clear all
 
void Reset ()
 
void ReSize (Int_t sz, Bool_t copy=kFALSE)
 change the size
 
void SortIndices (Bool_t valuesToo=kFALSE)
 sort indices in increasing order. Used to fix the row after ILUk decomposition
 
void Add (Double_t *valc, Int_t *indc, Int_t n)
 add indiced array to row. Indices must be in increasing order
 
VectorSparseoperator= (const VectorSparse &src)
 assignment op-tor
 
virtual Double_t operator() (Int_t ind) const
 
virtual Double_t & operator() (Int_t ind)
 
virtual void SetToZero (Int_t ind)
 set element to 0 if it was already defined
 
Double_t FindIndex (Int_t ind) const
 return an element with given index
 
Double_t & FindIndexAdd (Int_t ind)
 increment an element with given index
 
Int_t GetLastIndex () const
 
Double_t GetLastElem () const
 
Double_t & GetLastElem ()
 

Protected Member Functions

 ClassDefOverride (VectorSparse, 0)
 

Protected Attributes

Int_t fNElems
 Number of elements.
 
UShort_t * fIndex
 Index of stored elems.
 
Double_t * fElems
 pointer on elements
 

Detailed Description

Definition at line 28 of file VectorSparse.h.

Constructor & Destructor Documentation

◆ VectorSparse() [1/2]

VectorSparse::VectorSparse ( )

Definition at line 23 of file VectorSparse.cxx.

◆ VectorSparse() [2/2]

VectorSparse::VectorSparse ( const VectorSparse src)

copy c-tor

Definition at line 31 of file VectorSparse.cxx.

◆ ~VectorSparse()

o2::fwdalign::VectorSparse::~VectorSparse ( )
inlineoverride

Definition at line 36 of file VectorSparse.h.

Member Function Documentation

◆ Add()

void VectorSparse::Add ( Double_t *  valc,
Int_t *  indc,
Int_t  n 
)

add indiced array to row. Indices must be in increasing order

Definition at line 212 of file VectorSparse.cxx.

◆ ClassDefOverride()

o2::fwdalign::VectorSparse::ClassDefOverride ( VectorSparse  ,
 
)
protected

◆ Clear()

void VectorSparse::Clear ( Option_t *  option = "")
override

clear all

Definition at line 44 of file VectorSparse.cxx.

◆ FindIndex()

Double_t VectorSparse::FindIndex ( Int_t  ind) const

return an element with given index

Definition at line 71 of file VectorSparse.cxx.

◆ FindIndexAdd()

Double_t & VectorSparse::FindIndexAdd ( Int_t  ind)

increment an element with given index

Definition at line 112 of file VectorSparse.cxx.

◆ GetElem()

Double_t & o2::fwdalign::VectorSparse::GetElem ( Int_t  i) const
inline

Definition at line 45 of file VectorSparse.h.

◆ GetElems()

Double_t * o2::fwdalign::VectorSparse::GetElems ( ) const
inline

Definition at line 43 of file VectorSparse.h.

◆ GetIndex()

UShort_t & o2::fwdalign::VectorSparse::GetIndex ( Int_t  i)
inline

Definition at line 44 of file VectorSparse.h.

◆ GetIndices()

UShort_t * o2::fwdalign::VectorSparse::GetIndices ( ) const
inline

Definition at line 42 of file VectorSparse.h.

◆ GetLastElem() [1/2]

Double_t & o2::fwdalign::VectorSparse::GetLastElem ( )
inline

Definition at line 78 of file VectorSparse.h.

◆ GetLastElem() [2/2]

Double_t o2::fwdalign::VectorSparse::GetLastElem ( ) const
inline

Definition at line 77 of file VectorSparse.h.

◆ GetLastIndex()

Int_t o2::fwdalign::VectorSparse::GetLastIndex ( ) const
inline

Definition at line 76 of file VectorSparse.h.

◆ GetNElems()

Int_t o2::fwdalign::VectorSparse::GetNElems ( ) const
inline

Definition at line 41 of file VectorSparse.h.

◆ operator()() [1/2]

Double_t & o2::fwdalign::VectorSparse::operator() ( Int_t  ind)
inlinevirtual

Definition at line 95 of file VectorSparse.h.

◆ operator()() [2/2]

Double_t o2::fwdalign::VectorSparse::operator() ( Int_t  ind) const
inlinevirtual

Definition at line 89 of file VectorSparse.h.

◆ operator=()

VectorSparse & VectorSparse::operator= ( const VectorSparse src)

assignment op-tor

Definition at line 54 of file VectorSparse.cxx.

◆ Print()

void VectorSparse::Print ( Option_t *  option = "") const
override

print itself

Definition at line 193 of file VectorSparse.cxx.

◆ Reset()

void o2::fwdalign::VectorSparse::Reset ( )
inline

Definition at line 50 of file VectorSparse.h.

◆ ReSize()

void VectorSparse::ReSize ( Int_t  sz,
Bool_t  copy = kFALSE 
)

change the size

Definition at line 149 of file VectorSparse.cxx.

◆ SetToZero()

void VectorSparse::SetToZero ( Int_t  ind)
virtual

set element to 0 if it was already defined

Definition at line 92 of file VectorSparse.cxx.

◆ SortIndices()

void VectorSparse::SortIndices ( Bool_t  valuesToo = kFALSE)

sort indices in increasing order. Used to fix the row after ILUk decomposition

Definition at line 174 of file VectorSparse.cxx.

Member Data Documentation

◆ fElems

Double_t* o2::fwdalign::VectorSparse::fElems
protected

pointer on elements

Definition at line 83 of file VectorSparse.h.

◆ fIndex

UShort_t* o2::fwdalign::VectorSparse::fIndex
protected

Index of stored elems.

Definition at line 82 of file VectorSparse.h.

◆ fNElems

Int_t o2::fwdalign::VectorSparse::fNElems
protected

Number of elements.

Definition at line 81 of file VectorSparse.h.


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