Template of base class in the linear algebra package.
See MatrixPage for the documentation of the linear algebra package.
Matrix properties are stored here, however the data storage is part of the derived classes
Definition at line 84 of file TMatrixTBase.h.
Public Member Functions | |
TMatrixTBase () | |
virtual | ~TMatrixTBase () |
virtual TMatrixTBase< Element > & | Abs () |
Take an absolute value of a matrix, i.e. apply Abs() to each element. More... | |
virtual TMatrixTBase< Element > & | Apply (const TElementActionT< Element > &action) |
Apply action to each matrix element. More... | |
virtual TMatrixTBase< Element > & | Apply (const TElementPosActionT< Element > &action) |
Apply action to each element of the matrix. More... | |
TClass * | Class () |
virtual void | Clear (Option_t *option="")=0 |
virtual Element | ColNorm () const |
Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}. More... | |
virtual Double_t | Determinant () const |
virtual void | Determinant (Double_t &d1, Double_t &d2) const |
void | Draw (Option_t *option="") |
Draw this matrix The histogram is named "TMatrixT" by default and no title. More... | |
virtual Element | E2Norm () const |
Square of the Euclidian norm, SUM{ m(i,j)^2 }. More... | |
virtual void | ExtractRow (Int_t row, Int_t col, Element *v, Int_t n=-1) const |
Store in array v, n matrix elements of row rown starting at column coln. More... | |
virtual const Int_t * | GetColIndexArray () const =0 |
virtual Int_t * | GetColIndexArray ()=0 |
Int_t | GetColLwb () const |
Int_t | GetColUpb () const |
virtual void | GetMatrix2Array (Element *data, Option_t *option="") const |
Copy matrix data to array . More... | |
virtual const Element * | GetMatrixArray () const =0 |
virtual Element * | GetMatrixArray ()=0 |
Int_t | GetNcols () const |
Int_t | GetNoElements () const |
Int_t | GetNrows () const |
virtual const Int_t * | GetRowIndexArray () const =0 |
virtual Int_t * | GetRowIndexArray ()=0 |
Int_t | GetRowLwb () const |
Int_t | GetRowUpb () const |
virtual TMatrixTBase< Element > & | GetSub (Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, TMatrixTBase< Element > &target, Option_t *option="S") const =0 |
Element | GetTol () const |
virtual TMatrixTBase< Element > & | InsertRow (Int_t row, Int_t col, const Element *v, Int_t n=-1) |
Copy n elements from array v to row rown starting at column coln. More... | |
void | Invalidate () |
Bool_t | IsOwner () const |
virtual Bool_t | IsSymmetric () const |
Check whether matrix is symmetric. More... | |
Bool_t | IsValid () const |
void | MakeValid () |
virtual Element | Max () const |
return maximum vector element value More... | |
virtual Element | Min () const |
return minimum matrix element value More... | |
virtual Int_t | NonZeros () const |
Compute the number of elements != 0.0. More... | |
Element | Norm1 () const |
virtual TMatrixTBase< Element > & | NormByDiag (const TVectorT< Element > &v, Option_t *option="D") |
option: More... | |
Element | NormInf () const |
Bool_t | operator!= (Element val) const |
Are all matrix elements not equal to val? More... | |
virtual Element | operator() (Int_t rown, Int_t coln) const =0 |
virtual Element & | operator() (Int_t rown, Int_t coln)=0 |
Bool_t | operator< (Element val) const |
Are all matrix elements < val? More... | |
Bool_t | operator<= (Element val) const |
Are all matrix elements <= val? More... | |
Bool_t | operator== (Element val) const |
Are all matrix elements equal to val? More... | |
Bool_t | operator> (Element val) const |
Are all matrix elements > val? More... | |
Bool_t | operator>= (Element val) const |
Are all matrix elements >= val? More... | |
void | Print (Option_t *name="") const |
Print the matrix as a table of elements. More... | |
virtual TMatrixTBase< Element > & | Randomize (Element alpha, Element beta, Double_t &seed) |
Randomize matrix element values. More... | |
virtual TMatrixTBase< Element > & | ResizeTo (Int_t nrows, Int_t ncols, Int_t nr_nonzeros=-1)=0 |
virtual TMatrixTBase< Element > & | ResizeTo (Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros=-1)=0 |
virtual Element | RowNorm () const |
Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}. More... | |
virtual TMatrixTBase< Element > & | SetColIndexArray (Int_t *data)=0 |
virtual TMatrixTBase< Element > & | SetMatrixArray (const Element *data, Option_t *option="") |
Copy array data to matrix . More... | |
virtual TMatrixTBase< Element > & | SetRowIndexArray (Int_t *data)=0 |
virtual TMatrixTBase< Element > & | SetSub (Int_t row_lwb, Int_t col_lwb, const TMatrixTBase< Element > &source)=0 |
Element | SetTol (Element tol) |
virtual TMatrixTBase< Element > & | Shift (Int_t row_shift, Int_t col_shift) |
Shift the row index by adding row_shift and the column index by adding col_shift, respectively. More... | |
virtual TMatrixTBase< Element > & | Sqr () |
Square each element of the matrix. More... | |
virtual TMatrixTBase< Element > & | Sqrt () |
Take square root of all elements. More... | |
virtual Element | Sum () const |
Compute sum of elements. More... | |
virtual TMatrixTBase< Element > & | UnitMatrix () |
Make a unit matrix (matrix need not be a square one). More... | |
virtual TMatrixTBase< Element > & | Zero () |
Set matrix elements to zero. More... | |
Static Public Member Functions | |
static Element & | NaNValue () |
Protected Types | |
enum | { kSizeMax = 25 } |
enum | { kWorkMax = 100 } |
enum | EMatrixStatusBits { kStatus = BIT(14) } |
Static Protected Member Functions | |
static void | DoubleLexSort (Int_t n, Int_t *first, Int_t *second, Element *data) |
default kTRUE, when Use array kFALSE More... | |
static void | IndexedLexSort (Int_t n, Int_t *first, Int_t swapFirst, Int_t *second, Int_t swapSecond, Int_t *index) |
Lexical sort on array data using indices first and second. More... | |
Protected Attributes | |
Int_t | fColLwb |
Bool_t | fIsOwner |
Int_t | fNcols |
Int_t | fNelems |
Int_t | fNrowIndex |
Int_t | fNrows |
Int_t | fRowLwb |
Element | fTol |
Private Member Functions | |
Element * | GetElements () |
#include <TMatrixTBase.h>
|
protected |
Enumerator | |
---|---|
kSizeMax |
Definition at line 106 of file TMatrixTBase.h.
|
protected |
Enumerator | |
---|---|
kWorkMax |
Definition at line 107 of file TMatrixTBase.h.
|
protected |
Enumerator | |
---|---|
kStatus |
Definition at line 109 of file TMatrixTBase.h.
|
inline |
Definition at line 115 of file TMatrixTBase.h.
|
inlinevirtual |
Definition at line 119 of file TMatrixTBase.h.
|
virtual |
Take an absolute value of a matrix, i.e. apply Abs() to each element.
Definition at line 363 of file TMatrixTBase.cxx.
|
virtual |
Apply action to each matrix element.
Definition at line 801 of file TMatrixTBase.cxx.
|
virtual |
Apply action to each element of the matrix.
To action the location of the current element is passed.
Definition at line 818 of file TMatrixTBase.cxx.
TClass * TMatrixTBase< double >::Class | ( | ) |
|
pure virtual |
|
virtual |
Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.
The norm is induced by the 1 vector norm.
Definition at line 517 of file TMatrixTBase.cxx.
|
inlinevirtual |
Definition at line 162 of file TMatrixTBase.h.
|
inlinevirtual |
Definition at line 163 of file TMatrixTBase.h.
|
staticprotected |
default kTRUE, when Use array kFALSE
Lexical sort on array data using indices first and second.
Definition at line 42 of file TMatrixTBase.cxx.
void TMatrixTBase< Element >::Draw | ( | Option_t * | option = "" | ) |
Draw this matrix The histogram is named "TMatrixT" by default and no title.
Definition at line 623 of file TMatrixTBase.cxx.
|
virtual |
Square of the Euclidian norm, SUM{ m(i,j)^2 }.
Definition at line 544 of file TMatrixTBase.cxx.
|
virtual |
Store in array v, n matrix elements of row rown starting at column coln.
Definition at line 305 of file TMatrixTBase.cxx.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 124 of file TMatrixTBase.h.
|
inline |
Definition at line 125 of file TMatrixTBase.h.
|
private |
|
virtual |
Copy matrix data to array .
It is assumed that array is of size >= fNelems (=)))) fNrows*fNcols option indicates how the data is stored in the array: option =
Definition at line 245 of file TMatrixTBase.cxx.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 126 of file TMatrixTBase.h.
|
inline |
Definition at line 127 of file TMatrixTBase.h.
|
inline |
Definition at line 123 of file TMatrixTBase.h.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 121 of file TMatrixTBase.h.
|
inline |
Definition at line 122 of file TMatrixTBase.h.
|
pure virtual |
|
inline |
Definition at line 128 of file TMatrixTBase.h.
|
staticprotected |
Lexical sort on array data using indices first and second.
Definition at line 81 of file TMatrixTBase.cxx.
|
virtual |
Copy n elements from array v to row rown starting at column coln.
Definition at line 271 of file TMatrixTBase.cxx.
|
inline |
Definition at line 144 of file TMatrixTBase.h.
|
inline |
Definition at line 147 of file TMatrixTBase.h.
|
virtual |
Check whether matrix is symmetric.
Definition at line 216 of file TMatrixTBase.cxx.
|
inline |
Definition at line 146 of file TMatrixTBase.h.
|
inline |
Definition at line 145 of file TMatrixTBase.h.
|
virtual |
return maximum vector element value
Definition at line 609 of file TMatrixTBase.cxx.
|
virtual |
return minimum matrix element value
Definition at line 596 of file TMatrixTBase.cxx.
|
static |
Definition at line 1086 of file TMatrixTBase.cxx.
|
virtual |
Compute the number of elements != 0.0.
Definition at line 562 of file TMatrixTBase.cxx.
|
inline |
Definition at line 177 of file TMatrixTBase.h.
|
virtual |
|
inline |
Definition at line 176 of file TMatrixTBase.h.
Bool_t TMatrixTBase< Element >::operator!= | ( | Element | val | ) | const |
Are all matrix elements not equal to val?
Definition at line 713 of file TMatrixTBase.cxx.
|
pure virtual |
|
pure virtual |
Bool_t TMatrixTBase< Element >::operator< | ( | Element | val | ) | const |
Are all matrix elements < val?
Definition at line 733 of file TMatrixTBase.cxx.
Bool_t TMatrixTBase< Element >::operator<= | ( | Element | val | ) | const |
Are all matrix elements <= val?
Definition at line 750 of file TMatrixTBase.cxx.
Bool_t TMatrixTBase< Element >::operator== | ( | Element | val | ) | const |
Are all matrix elements equal to val?
Definition at line 693 of file TMatrixTBase.cxx.
Bool_t TMatrixTBase< Element >::operator> | ( | Element | val | ) | const |
Are all matrix elements > val?
Definition at line 767 of file TMatrixTBase.cxx.
Bool_t TMatrixTBase< Element >::operator>= | ( | Element | val | ) | const |
Are all matrix elements >= val?
Definition at line 784 of file TMatrixTBase.cxx.
void TMatrixTBase< Element >::Print | ( | Option_t * | option = "" | ) | const |
Print the matrix as a table of elements.
By default the format "%11.4g" is used to print one element. One can specify an alternative format with eg option ="f= %6.2f "
Definition at line 636 of file TMatrixTBase.cxx.
|
virtual |
Randomize matrix element values.
Definition at line 836 of file TMatrixTBase.cxx.
|
pure virtual |
|
pure virtual |
|
virtual |
Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}.
The norm is induced by the infinity vector norm.
Definition at line 490 of file TMatrixTBase.cxx.
|
pure virtual |
|
virtual |
Copy array data to matrix .
It is assumed that array is of size >= fNelems (=)))) fNrows*fNcols option indicates how the data is stored in the array: option =
Definition at line 188 of file TMatrixTBase.cxx.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 219 of file TMatrixTBase.h.
|
virtual |
Shift the row index by adding row_shift and the column index by adding col_shift, respectively.
So [rowLwb..rowUpb][colLwb..colUpb] becomes [rowLwb+row_shift..rowUpb+row_shift][colLwb+col_shift..colUpb+col_shift]
Definition at line 339 of file TMatrixTBase.cxx.
|
virtual |
Square each element of the matrix.
Definition at line 381 of file TMatrixTBase.cxx.
|
virtual |
Take square root of all elements.
Definition at line 399 of file TMatrixTBase.cxx.
|
virtual |
Compute sum of elements.
Definition at line 579 of file TMatrixTBase.cxx.
|
virtual |
Make a unit matrix (matrix need not be a square one).
Definition at line 417 of file TMatrixTBase.cxx.
|
virtual |
Set matrix elements to zero.
Definition at line 351 of file TMatrixTBase.cxx.
|
protected |
Definition at line 93 of file TMatrixTBase.h.
|
protected |
Definition at line 100 of file TMatrixTBase.h.
|
protected |
Definition at line 91 of file TMatrixTBase.h.
|
protected |
Definition at line 94 of file TMatrixTBase.h.
|
protected |
Definition at line 95 of file TMatrixTBase.h.
|
protected |
Definition at line 90 of file TMatrixTBase.h.
|
protected |
Definition at line 92 of file TMatrixTBase.h.
|
protected |
Definition at line 97 of file TMatrixTBase.h.