ROOT logo
ROOT » MATH » MATRIX » TMatrixTSparse<double>

class TMatrixTSparse<double>: public TMatrixTBase<double>


TMatrixTSparse

Template class of a general sparse matrix in the Harwell-Boeing
format

Besides the usual shape/size decsriptors of a matrix like fNrows,
fRowLwb,fNcols and fColLwb, we also store a row index, fRowIndex and
column index, fColIndex only for those elements unequal zero:

fRowIndex[0,..,fNrows]:    Stores for each row the index range of
the elements in the data and column array
fColIndex[0,..,fNelems-1]: Stores the column number for each data
element != 0

As an example how to access all sparse data elements:

for (Int_t irow = 0; irow < this->fNrows; irow++) {
const Int_t sIndex = fRowIndex[irow];
const Int_t eIndex = fRowIndex[irow+1];
for (Int_t index = sIndex; index < eIndex; index++) {
const Int_t icol = fColIndex[index];
const Element data = fElements[index];
printf("data(%d,%d) = %.4e\n",irow+this->fRowLwb,icol+
this->fColLwb,data);
}
}

When checking whether sparse matrices are compatible (like in an
assigment !), not only the shape parameters are compared but also
the sparse structure through fRowIndex and fColIndex .

Several methods exist to fill a sparse matrix with data entries.
Most are the same like for dense matrices but some care has to be
taken with regard to performance. In the constructor, always the
shape of the matrix has to be specified in some form . Data can be
entered through the following methods :
1. constructor
TMatrixTSparse(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,
Int_t col_upb,Int_t nr_nonzeros,
Int_t *row, Int_t *col,Element *data);
It uses SetMatrixArray(..), see below
2. copy constructors
3. SetMatrixArray(Int_t nr,Int_t *irow,Int_t *icol,Element *data)
where it is expected that the irow,icol and data array contain
nr entries . Only the entries with non-zero data[i] value are
inserted !
4. TMatrixTSparse a(n,m); for(....) { a(i,j) = ....
This is a very flexible method but expensive :
- if no entry for slot (i,j) is found in the sparse index table
it will be entered, which involves some memory management !
- before invoking this method in a loop it is smart to first
set the index table through a call to SetSparseIndex(..)
5. SetSub(Int_t row_lwb,Int_t col_lwb,const TMatrixTBase &source)
the matrix to be inserted at position (row_lwb,col_lwb) can be
both dense or sparse .


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

TMatrixDSparse, TMatrixTSparse<Double_t>

Function Members (Methods)

public:
TMatrixTSparse<double>()
TMatrixTSparse<double>(const TMatrixTSparse<double>& another)
TMatrixTSparse<double>(const TMatrixT<double>& another)
TMatrixTSparse<double>(Int_t nrows, Int_t ncols)
TMatrixTSparse<double>(TMatrixTSparse<double>::EMatrixCreatorsOp1 op, const TMatrixTSparse<double>& prototype)
TMatrixTSparse<double>(const TMatrixTSparse<double>& a, TMatrixTSparse<double>::EMatrixCreatorsOp2 op, const TMatrixTSparse<double>& b)
TMatrixTSparse<double>(const TMatrixTSparse<double>& a, TMatrixTSparse<double>::EMatrixCreatorsOp2 op, const TMatrixT<double>& b)
TMatrixTSparse<double>(const TMatrixT<double>& a, TMatrixTSparse<double>::EMatrixCreatorsOp2 op, const TMatrixTSparse<double>& b)
TMatrixTSparse<double>(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb)
TMatrixTSparse<double>(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros, Int_t* row, Int_t* col, double* data)
virtual~TMatrixTSparse<double>()
virtual TMatrixTBase<double>&TMatrixTBase<double>::Abs()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual TMatrixTBase<double>&TMatrixTBase<double>::Apply(const TElementActionT<double>& action)
virtual TMatrixTBase<double>&TMatrixTBase<double>::Apply(const TElementPosActionT<double>& action)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual doubleColNorm() const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Double_tTMatrixTBase<double>::Determinant() const
virtual voidTMatrixTBase<double>::Determinant(Double_t& d1, Double_t& d2) const
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTMatrixTBase<double>::Draw(Option_t* option = "")MENU
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual doubleTMatrixTBase<double>::E2Norm() const
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 voidExtractRow(Int_t row, Int_t col, double* v, Int_t n = -1) const
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 const Int_t*GetColIndexArray() const
virtual Int_t*GetColIndexArray()
Int_tTMatrixTBase<double>::GetColLwb() const
Int_tTMatrixTBase<double>::GetColUpb() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual voidGetMatrix2Array(double* data, Option_t* option = "") const
virtual const double*GetMatrixArray() const
virtual double*GetMatrixArray()
virtual const char*TObject::GetName() const
Int_tTMatrixTBase<double>::GetNcols() const
Int_tTMatrixTBase<double>::GetNoElements() const
Int_tTMatrixTBase<double>::GetNrows() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const Int_t*GetRowIndexArray() const
virtual Int_t*GetRowIndexArray()
Int_tTMatrixTBase<double>::GetRowLwb() const
Int_tTMatrixTBase<double>::GetRowUpb() const
TMatrixTSparse<double>GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Option_t* option = "S") const
virtual TMatrixTBase<double>&GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, TMatrixTBase<double>& target, Option_t* option = "S") const
virtual const char*TObject::GetTitle() const
doubleTMatrixTBase<double>::GetTol() const
virtual UInt_tTObject::GetUniqueID() 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 TMatrixTBase<double>&InsertRow(Int_t row, Int_t col, const double* v, Int_t n = -1)
virtual voidTObject::Inspect() constMENU
voidTMatrixTBase<double>::Invalidate()
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tTMatrixTBase<double>::IsOwner() const
virtual Bool_tTObject::IsSortable() const
virtual Bool_tIsSymmetric() const
Bool_tTMatrixTBase<double>::IsValid() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTMatrixTBase<double>::MakeValid()
virtual doubleTMatrixTBase<double>::Max() const
voidTObject::MayNotUse(const char* method) const
virtual doubleTMatrixTBase<double>::Min() const
voidMult(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b)
virtual Int_tNonZeros() const
doubleTMatrixTBase<double>::Norm1() const
virtual TMatrixTBase<double>&NormByDiag(const TVectorT<double>&, Option_t*)
doubleTMatrixTBase<double>::NormInf() 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_tTMatrixTBase<double>::operator!=(double val) const
virtual doubleoperator()(Int_t rown, Int_t coln) const
virtual double&operator()(Int_t rown, Int_t coln)
TMatrixTSparse<double>&operator*=(double val)
TMatrixTSparse<double>&operator*=(const TMatrixTSparse<double>& source)
TMatrixTSparse<double>&operator*=(const TMatrixT<double>& source)
TMatrixTSparse<double>&operator+=(double val)
TMatrixTSparse<double>&operator+=(const TMatrixTSparse<double>& source)
TMatrixTSparse<double>&operator+=(const TMatrixT<double>& source)
TMatrixTSparse<double>&operator-=(double val)
TMatrixTSparse<double>&operator-=(const TMatrixTSparse<double>& source)
TMatrixTSparse<double>&operator-=(const TMatrixT<double>& source)
Bool_tTMatrixTBase<double>::operator<(double val) const
Bool_tTMatrixTBase<double>::operator<=(double val) const
TMatrixTSparse<double>&operator=(const TMatrixT<double>& source)
TMatrixTSparse<double>&operator=(const TMatrixTSparse<double>& source)
TMatrixTSparse<double>&operator=(double val)
Bool_tTMatrixTBase<double>::operator==(double val) const
Bool_tTMatrixTBase<double>::operator>(double val) const
Bool_tTMatrixTBase<double>::operator>=(double val) const
const TMatrixTSparseRow_const<double>operator[](Int_t rown) const
TMatrixTSparseRow<double>operator[](Int_t rown)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTMatrixTBase<double>::Print(Option_t* name = "") constMENU
virtual TMatrixTBase<double>&Randomize(double alpha, double beta, Double_t& seed)
virtual TMatrixTSparse<double>&RandomizePD(double alpha, double beta, Double_t& seed)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
TMatrixTBase<double>&ResizeTo(const TMatrixTSparse<double>& m)
virtual TMatrixTBase<double>&ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros = -1)
virtual TMatrixTBase<double>&ResizeTo(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros = -1)
virtual doubleRowNorm() const
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual TMatrixTBase<double>&SetColIndexArray(Int_t* data)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual TMatrixTBase<double>&SetMatrixArray(const double* data, Option_t* = "")
virtual TMatrixTBase<double>&SetMatrixArray(Int_t nr_nonzeros, Int_t* irow, Int_t* icol, double* data)
static voidTObject::SetObjectStat(Bool_t stat)
virtual TMatrixTBase<double>&SetRowIndexArray(Int_t* data)
TMatrixTSparse<double>&SetSparseIndex(Int_t nelem_new)
TMatrixTSparse<double>&SetSparseIndex(const TMatrixTBase<double>& another)
TMatrixTSparse<double>&SetSparseIndexAB(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b)
TMatrixTSparse<double>&SetSparseIndexAB(const TMatrixT<double>& a, const TMatrixTSparse<double>& b)
TMatrixTSparse<double>&SetSparseIndexAB(const TMatrixTSparse<double>& a, const TMatrixT<double>& b)
virtual TMatrixTBase<double>&SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase<double>& source)
doubleTMatrixTBase<double>::SetTol(double newTol)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual TMatrixTBase<double>&TMatrixTBase<double>::Shift(Int_t row_shift, Int_t col_shift)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual TMatrixTBase<double>&TMatrixTBase<double>::Sqr()
virtual TMatrixTBase<double>&TMatrixTBase<double>::Sqrt()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual doubleTMatrixTBase<double>::Sum() const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
TMatrixTSparse<double>&T()
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TMatrixTSparse<double>&Transpose(const TMatrixTSparse<double>& source)
virtual TMatrixTBase<double>&UnitMatrix()
TMatrixTSparse<double>&Use(TMatrixTSparse<double>& a)
const TMatrixTSparse<double>&Use(const TMatrixTSparse<double>& a) const
TMatrixTSparse<double>&Use(Int_t nrows, Int_t ncols, Int_t nr_nonzeros, Int_t* pRowIndex, Int_t* pColIndex, double* pData)
const TMatrixTSparse<double>&Use(Int_t nrows, Int_t ncols, Int_t nr_nonzeros, const Int_t* pRowIndex, const Int_t* pColIndex, const double* pData) const
TMatrixTSparse<double>&Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros, Int_t* pRowIndex, Int_t* pColIndex, double* pData)
const TMatrixTSparse<double>&Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros, const Int_t* pRowIndex, const Int_t* pColIndex, const double* pData) 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
virtual TMatrixTBase<double>&Zero()
protected:
voidAllocate(Int_t nrows, Int_t ncols, Int_t row_lwb = 0, Int_t col_lwb = 0, Int_t init = 0, Int_t nr_nonzeros = 0)
voidAMinusB(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAMinusB(const TMatrixTSparse<double>& a, const TMatrixT<double>& b, Int_t constr = 0)
voidAMinusB(const TMatrixT<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAMultB(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAMultB(const TMatrixTSparse<double>& a, const TMatrixT<double>& b, Int_t constr = 0)
voidAMultB(const TMatrixT<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAMultBt(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAMultBt(const TMatrixTSparse<double>& a, const TMatrixT<double>& b, Int_t constr = 0)
voidAMultBt(const TMatrixT<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAPlusB(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
voidAPlusB(const TMatrixTSparse<double>& a, const TMatrixT<double>& b, Int_t constr = 0)
voidAPlusB(const TMatrixT<double>& a, const TMatrixTSparse<double>& b, Int_t constr = 0)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
static voidTMatrixTBase<double>::DoubleLexSort(Int_t n, Int_t* first, Int_t* second, double* data)
static voidTMatrixTBase<double>::IndexedLexSort(Int_t n, Int_t* first, Int_t swapFirst, Int_t* second, Int_t swapSecond, Int_t* index)
voidTObject::MakeZombie()

Data Members

public:
enum EMatrixCreatorsOp1 { kZero
kUnit
kTransposed
kAtA
};
enum EMatrixCreatorsOp2 { kMult
kMultTranspose
kPlus
kMinus
};
enum TMatrixTBase::[unnamed] { kSizeMax
kWorkMax
};
enum TMatrixTBase::EMatrixStatusBits { kStatus
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_t*fColIndex[fNelems] column index
Int_tTMatrixTBase<double>::fColLwblower bound of the col index
double*fElements[fNelems]
Bool_tTMatrixTBase<double>::fIsOwner!default kTRUE, when Use array kFALSE
Int_tTMatrixTBase<double>::fNcolsnumber of columns
Int_tTMatrixTBase<double>::fNelemsnumber of elements in matrix
Int_tTMatrixTBase<double>::fNrowIndexlength of row index array (= fNrows+1) wich is only used for sparse matrices
Int_tTMatrixTBase<double>::fNrowsnumber of rows
Int_t*fRowIndex[fNrowIndex] row index
Int_tTMatrixTBase<double>::fRowLwblower bound of the row index
doubleTMatrixTBase<double>::fTolsqrt(epsilon); epsilon is smallest number number so that 1+epsilon > 1

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void TMatrixTSparse<Element> Allocate(Int_t nrows, Int_t ncols, Int_t row_lwb = 0, Int_t col_lwb = 0, Int_t init = 0, Int_t nr_nonzeros = 0)
 Allocate new matrix. Arguments are number of rows, columns, row lowerbound (0 default)
 and column lowerbound (0 default), 0 initialization flag and number of non-zero
 elements (only relevant for sparse format).
TMatrixTBase<Element> &TMatrixTSparse<Element> InsertRow(Int_t row, Int_t col, const double* v, Int_t n = -1)
 Insert in row rown, n elements of array v at column coln
void TMatrixTSparse<Element> ExtractRow(Int_t row, Int_t col, double* v, Int_t n = -1) const
 Store in array v, n matrix elements of row rown starting at column coln
void TMatrixTSparse<Element> AMultBt(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr)
 General matrix multiplication. Create a matrix C such that C = A * B'.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> AMultBt(const TMatrixTSparse<Element> &a,const TMatrixT<Element> &b,Int_t constr)
 General matrix multiplication. Create a matrix C such that C = A * B'.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> AMultBt(const TMatrixT<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr)
 General matrix multiplication. Create a matrix C such that C = A * B'.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> APlusB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr)
 General matrix addition. Create a matrix C such that C = A + B.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> APlusB(const TMatrixTSparse<Element> &a,const TMatrixT<Element> &b,Int_t constr)
 General matrix addition. Create a matrix C such that C = A + B.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> AMinusB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr)
 General matrix subtraction. Create a matrix C such that C = A - B.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> AMinusB(const TMatrixTSparse<Element> &a,const TMatrixT<Element> &b,Int_t constr)
 General matrix subtraction. Create a matrix C such that C = A - B.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> AMinusB(const TMatrixT<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr)
 General matrix subtraction. Create a matrix C such that C = A - B.
 Note, matrix C is allocated for constr=1.
void TMatrixTSparse<Element> GetMatrix2Array(double* data, Option_t* option = "") const
 Copy matrix data to array . It is assumed that array is of size >= fNelems
TMatrixTBase<Element> &TMatrixTSparse<Element> SetMatrixArray(Int_t nr_nonzeros, Int_t* irow, Int_t* icol, double* data)
 Copy nr elements from row/col index and data array to matrix . It is assumed
 that arrays are of size >= nr
TMatrixTSparse<Element> &TMatrixTSparse<Element> SetSparseIndex(Int_t nelems_new)
 Increase/decrease the number of non-zero elements to nelems_new
TMatrixTSparse<Element> &TMatrixTSparse<Element> SetSparseIndex(const TMatrixTBase<Element> &source)
 Use non-zero data of matrix source to set the sparse structure
TMatrixTSparse<Element> &TMatrixTSparse<Element> SetSparseIndexAB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b)
 Set the row/column indices to the "sum" of matrices a and b
 It is checked that enough space has been allocated
TMatrixTSparse<Element> &TMatrixTSparse<Element> SetSparseIndexAB(const TMatrixT<Element> &a,const TMatrixTSparse<Element> &b)
 Set the row/column indices to the "sum" of matrices a and b
 It is checked that enough space has been allocated
TMatrixTBase<Element> &TMatrixTSparse<Element> ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros = -1)
 Set size of the matrix to nrows x ncols with nr_nonzeros non-zero entries
 if nr_nonzeros > 0 .
 New dynamic elements are created, the overlapping part of the old ones are
 copied to the new structures, then the old elements are deleted.
TMatrixTBase<Element> &TMatrixTSparse<Element> ResizeTo(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros = -1)
 Set size of the matrix to [row_lwb:row_upb] x [col_lwb:col_upb] with nr_nonzeros
 non-zero entries if nr_nonzeros > 0 .
 New dynamic elemenst are created, the overlapping part of the old ones are
 copied to the new structures, then the old elements are deleted.
TMatrixTSparse<Element> &TMatrixTSparse<Element> Use(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb, Int_t nr_nonzeros,Int_t *pRowIndex,Int_t *pColIndex,Element *pData)
TMatrixTBase<Element> &TMatrixTSparse<Element> GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, TMatrixTBase<double>& target, Option_t* option = "S") const
 Get submatrix [row_lwb..row_upb][col_lwb..col_upb]; The indexing range of the
 returned matrix depends on the argument option:

 option == "S" : return [0..row_upb-row_lwb+1][0..col_upb-col_lwb+1] (default)
 else          : return [row_lwb..row_upb][col_lwb..col_upb]
TMatrixTBase<Element> &TMatrixTSparse<Element> SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase<double>& source)
 Insert matrix source starting at [row_lwb][col_lwb], thereby overwriting the part
 [row_lwb..row_lwb+nrows_source-1][col_lwb..col_lwb+ncols_source-1];
TMatrixTSparse<Element> &TMatrixTSparse<Element> Transpose(const TMatrixTSparse<double>& source)
 Transpose a matrix.
TMatrixTBase<Element> &TMatrixTSparse<Element> Zero()
TMatrixTBase<Element> &TMatrixTSparse<Element> UnitMatrix()
 Make a unit matrix (matrix need not be a square one).
Element TMatrixTSparse<Element> RowNorm() const
 Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}.
 The norm is induced by the infinity vector norm.
Element TMatrixTSparse<Element> ColNorm() const
 Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.
 The norm is induced by the 1 vector norm.
Element &TMatrixTSparse<Element> operator()(Int_t rown,Int_t coln)
Element TMatrixTSparse<Element> operator()(Int_t rown,Int_t coln)
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator=(const TMatrixTSparse<Element> &source)
 Notice that the sparsity of the matrix is NOT changed : its fRowIndex/fColIndex
 are used !
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator=(const TMatrixT<Element> &source)
 Notice that the sparsity of the matrix is NOT changed : its fRowIndex/fColIndex
 are used !
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator=(Element val)
 Assign val to every element of the matrix. Check that the row/col
 indices are set !
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator+=(Element val)
 Add val to every element of the matrix.
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator-=(Element val)
 Subtract val from every element of the matrix.
TMatrixTSparse<Element> &TMatrixTSparse<Element> operator*=(Element val)
 Multiply every element of the matrix with val.
TMatrixTBase<Element> &TMatrixTSparse<Element> Randomize(double alpha, double beta, Double_t& seed)
 randomize matrix element values
TMatrixTSparse<Element> &TMatrixTSparse<Element> RandomizePD(double alpha, double beta, Double_t& seed)
 randomize matrix element values but keep matrix symmetric positive definite
void TMatrixTSparse<Element> Streamer(TBuffer& b)
 Stream an object of class TMatrixTSparse.
template <class Element> inline const Element *TMatrixTSparse<Element> GetMatrixArray()
{ return fElements; }
template <class Element> inline Element *TMatrixTSparse<Element> GetMatrixArray()
{ return fElements; }
template <class Element> inline const Int_t *TMatrixTSparse<Element> GetRowIndexArray()
{ return fRowIndex; }
template <class Element> inline Int_t *TMatrixTSparse<Element> GetRowIndexArray()
{ return fRowIndex; }
template <class Element> inline const Int_t *TMatrixTSparse<Element> GetColIndexArray()
{ return fColIndex; }
template <class Element> inline Int_t *TMatrixTSparse<Element> GetColIndexArray()
{ return fColIndex; }
TMatrixTSparse<Element> &TMatrixTSparse<Element> Use(Int_t nrows,Int_t ncols,Int_t nr_nonzeros, Int_t *pRowIndex,Int_t *pColIndex,Element *pData)
{ return Use(0,nrows-1,0,ncols-1,nr_nonzeros,pRowIndex,pColIndex,pData); }
const TMatrixTSparse<Element> &TMatrixTSparse<Element> Use(Int_t nrows,Int_t ncols,Int_t nr_nonzeros, const Int_t *pRowIndex,const Int_t *pColIndex,const Element *pData)
{ return Use(0,nrows-1,0,ncols-1,nr_nonzeros,pRowIndex,pColIndex,pData); }
TMatrixTSparse<Element> &TMatrixTSparse<Element> Use(TMatrixTSparse<Element> &a)
const TMatrixTSparse<Element> &TMatrixTSparse<Element> Use(const TMatrixTSparse<Element> &a)
TMatrixTSparse<Element> TMatrixTSparse<Element> GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Option_t* option = "S") const
void AMultB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr=0)
 Elementary constructors
void AMultB(const TMatrixTSparse<Element> &a,const TMatrixT<Element> &b,Int_t constr=0)
void AMultB(const TMatrixT<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr=0)
void APlusB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b,Int_t constr=0)
TMatrixTBase<Element> & SetRowIndexArray(Int_t* data)
{ memmove(fRowIndex,data,(this->fNrows+1)*sizeof(Int_t)); return *this; }
TMatrixTBase<Element> & SetColIndexArray(Int_t* data)
{ memmove(fColIndex,data,this->fNelems*sizeof(Int_t)); return *this; }
TMatrixTSparse<Element> & SetSparseIndexAB(const TMatrixTSparse<Element> &a,const TMatrixTSparse<Element> &b)
TMatrixTBase<Element> & SetMatrixArray(const double* data, Option_t* = "")
{ memcpy(fElements,data,this->fNelems*sizeof(Element)); return *this; }
TMatrixTBase<Element> & ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros = -1)
void Clear(Option_t* = "")
TMatrixTSparse<Element> & Use(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,Int_t nr_nonzeros, Int_t *pRowIndex,Int_t *pColIndex,Element *pData)
Bool_t IsSymmetric() const
{ return (*this == TMatrixTSparse<Element>(kTransposed,*this)); }
void Mult(const TMatrixTSparse<double>& a, const TMatrixTSparse<double>& b)
{ AMultB(a,b,0); }
Int_t NonZeros() const
{ return this->fNelems; }
TMatrixTBase<Element> & NormByDiag(const TVectorT<double>& , Option_t* )
{ MayNotUse("NormByDiag"); return *this; }
const TMatrixTSparseRow_const<Element> operator[](Int_t rown)
 or as a[i][j]
{ return TMatrixTSparseRow_const<Element>(*this,rown); }
TMatrixTSparseRow <Element> operator[](Int_t rown)
{ return TMatrixTSparseRow <Element>(*this,rown); }
TMatrixTSparse<Element> & operator-=(Element val)
TMatrixTSparse<Element> & operator+=(Element val)
TMatrixTSparse<Element> & operator*=(Element val)
TMatrixTSparse<Element> & operator+=(const TMatrixTSparse<Element> &source)
TMatrixTSparse<Element> & operator-=(const TMatrixTSparse<Element> &source)
TMatrixTSparse<Element> & operator*=(const TMatrixTSparse<Element> &source)