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

#include <MatrixSparse.h>

Inherits o2::fwdalign::MatrixSq.

Public Member Functions

 MatrixSparse ()=default
 
 MatrixSparse (Int_t size)
 constructor
 
 MatrixSparse (const MatrixSparse &mat)
 copy c-tor
 
 ~MatrixSparse () override
 
VectorSparseGetRow (Int_t ir) const
 
VectorSparseGetRowAdd (Int_t ir)
 
Int_t GetSize () const override
 
virtual Int_t GetNRows () const
 
virtual Int_t GetNCols () const
 
void Clear (Option_t *option="") override
 
void Reset () override
 
void Print (Option_t *option="") const override
 
MatrixSparseoperator= (const MatrixSparse &src)
 
Double_t & operator() (Int_t row, Int_t col) override
 
Double_t operator() (Int_t row, Int_t col) const override
 
void SetToZero (Int_t row, Int_t col)
 set existing element to 0
 
Float_t GetDensity () const override
 get fraction of non-zero elements
 
Double_t DiagElem (Int_t r) const override
 get diag elem
 
Double_t & DiagElem (Int_t r) override
 get diag elem
 
void SortIndices (Bool_t valuesToo=kFALSE)
 sort columns in increasing order. Used to fix the matrix after ILUk decompostion
 
void MultiplyByVec (const TVectorD &vecIn, TVectorD &vecOut) const override
 fill vecOut by matrix * vecIn (vector should be of the same size as the matrix)
 
void MultiplyByVec (const Double_t *vecIn, Double_t *vecOut) const override
 fill vecOut by matrix * vecIn (vector should be of the same size as the matrix)
 
void AddToRow (Int_t r, Double_t *valc, Int_t *indc, Int_t n) override
 
- Public Member Functions inherited from o2::fwdalign::MatrixSq
 MatrixSq ()
 
 MatrixSq (const MatrixSq &src)
 
 ~MatrixSq () override=default
 
MatrixSqoperator= (const MatrixSq &src)
 = operator
 
virtual Double_t Query (Int_t rown, Int_t coln) const
 
virtual Double_t QueryDiag (Int_t rc) const
 
virtual void PrintCOO () const
 print matrix in COO sparse format
 
Bool_t IsSymmetric () const override
 
void SetSymmetric (Bool_t v=kTRUE)
 
const Double_t * GetMatrixArray () const override
 
Double_t * GetMatrixArray () override
 
const Int_t * GetRowIndexArray () const override
 
Int_t * GetRowIndexArray () override
 
const Int_t * GetColIndexArray () const override
 
Int_t * GetColIndexArray () override
 
TMatrixDBaseSetRowIndexArray (Int_t *) override
 
TMatrixDBaseSetColIndexArray (Int_t *) override
 
TMatrixDBaseGetSub (Int_t, Int_t, Int_t, Int_t, TMatrixDBase &, Option_t *) const override
 
TMatrixDBaseSetSub (Int_t, Int_t, const TMatrixDBase &) override
 
TMatrixDBaseResizeTo (Int_t, Int_t, Int_t) override
 
TMatrixDBaseResizeTo (Int_t, Int_t, Int_t, Int_t, Int_t) override
 
virtual void Allocate (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
 

Protected Member Functions

 ClassDefOverride (MatrixSparse, 0)
 
- Protected Member Functions inherited from o2::fwdalign::MatrixSq
void Swap (int &r, int &c) const
 
 ClassDefOverride (MatrixSq, 1)
 

Protected Attributes

VectorSparse ** fVecs = nullptr
 
- Protected Attributes inherited from o2::fwdalign::MatrixSq
Bool_t fSymmetric
 is the matrix symmetric? Only lower triangle is filled
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::fwdalign::MatrixSq
static Bool_t IsZero (Double_t x, Double_t thresh=1e-64)
 

Detailed Description

Definition at line 28 of file MatrixSparse.h.

Constructor & Destructor Documentation

◆ MatrixSparse() [1/3]

o2::fwdalign::MatrixSparse::MatrixSparse ( )
default

◆ MatrixSparse() [2/3]

MatrixSparse::MatrixSparse ( Int_t  size)

constructor

Definition at line 25 of file MatrixSparse.cxx.

◆ MatrixSparse() [3/3]

MatrixSparse::MatrixSparse ( const MatrixSparse mat)

copy c-tor

Definition at line 38 of file MatrixSparse.cxx.

◆ ~MatrixSparse()

o2::fwdalign::MatrixSparse::~MatrixSparse ( )
inlineoverride

Definition at line 39 of file MatrixSparse.h.

Member Function Documentation

◆ AddToRow()

void MatrixSparse::AddToRow ( Int_t  r,
Double_t *  valc,
Int_t *  indc,
Int_t  n 
)
overridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 169 of file MatrixSparse.cxx.

◆ ClassDefOverride()

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

◆ Clear()

void MatrixSparse::Clear ( Option_t *  option = "")
overridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 90 of file MatrixSparse.cxx.

◆ DiagElem() [1/2]

Double_t o2::fwdalign::MatrixSparse::DiagElem ( Int_t  r) const
inlineoverridevirtual

get diag elem

Implements o2::fwdalign::MatrixSq.

Definition at line 132 of file MatrixSparse.h.

◆ DiagElem() [2/2]

Double_t & o2::fwdalign::MatrixSparse::DiagElem ( Int_t  r)
inlineoverridevirtual

get diag elem

Implements o2::fwdalign::MatrixSq.

Definition at line 147 of file MatrixSparse.h.

◆ GetDensity()

Float_t MatrixSparse::GetDensity ( ) const
overridevirtual

get fraction of non-zero elements

Implements o2::fwdalign::MatrixSq.

Definition at line 207 of file MatrixSparse.cxx.

◆ GetNCols()

virtual Int_t o2::fwdalign::MatrixSparse::GetNCols ( ) const
inlinevirtual

Definition at line 46 of file MatrixSparse.h.

◆ GetNRows()

virtual Int_t o2::fwdalign::MatrixSparse::GetNRows ( ) const
inlinevirtual

Definition at line 45 of file MatrixSparse.h.

◆ GetRow()

VectorSparse * o2::fwdalign::MatrixSparse::GetRow ( Int_t  ir) const
inline

Definition at line 41 of file MatrixSparse.h.

◆ GetRowAdd()

VectorSparse * MatrixSparse::GetRowAdd ( Int_t  ir)

Definition at line 49 of file MatrixSparse.cxx.

◆ GetSize()

Int_t o2::fwdalign::MatrixSparse::GetSize ( ) const
inlineoverridevirtual

Reimplemented from o2::fwdalign::MatrixSq.

Definition at line 44 of file MatrixSparse.h.

◆ MultiplyByVec() [1/2]

void MatrixSparse::MultiplyByVec ( const Double_t *  vecIn,
Double_t *  vecOut 
) const
overridevirtual

fill vecOut by matrix * vecIn (vector should be of the same size as the matrix)

Reimplemented from o2::fwdalign::MatrixSq.

Definition at line 117 of file MatrixSparse.cxx.

◆ MultiplyByVec() [2/2]

void o2::fwdalign::MatrixSparse::MultiplyByVec ( const TVectorD &  vecIn,
TVectorD &  vecOut 
) const
inlineoverridevirtual

fill vecOut by matrix * vecIn (vector should be of the same size as the matrix)

multiplication

Reimplemented from o2::fwdalign::MatrixSq.

Definition at line 85 of file MatrixSparse.h.

◆ operator()() [1/2]

Double_t o2::fwdalign::MatrixSparse::operator() ( Int_t  row,
Int_t  col 
) const
inlineoverridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 104 of file MatrixSparse.h.

◆ operator()() [2/2]

Double_t & o2::fwdalign::MatrixSparse::operator() ( Int_t  row,
Int_t  col 
)
inlineoverridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 117 of file MatrixSparse.h.

◆ operator=()

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

Definition at line 71 of file MatrixSparse.cxx.

◆ Print()

void MatrixSparse::Print ( Option_t *  option = "") const
overridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 100 of file MatrixSparse.cxx.

◆ Reset()

void o2::fwdalign::MatrixSparse::Reset ( )
inlineoverridevirtual

Implements o2::fwdalign::MatrixSq.

Definition at line 49 of file MatrixSparse.h.

◆ SetToZero()

void o2::fwdalign::MatrixSparse::SetToZero ( Int_t  row,
Int_t  col 
)
inline

set existing element to 0

Definition at line 92 of file MatrixSparse.h.

◆ SortIndices()

void MatrixSparse::SortIndices ( Bool_t  valuesToo = kFALSE)

sort columns in increasing order. Used to fix the matrix after ILUk decompostion

Definition at line 155 of file MatrixSparse.cxx.

Member Data Documentation

◆ fVecs

VectorSparse** o2::fwdalign::MatrixSparse::fVecs = nullptr
protected

Definition at line 78 of file MatrixSparse.h.


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