12#ifndef ROOT_TMatrixTBase
13#define ROOT_TMatrixTBase
78template<
class Element>
class TVectorT;
179 virtual Element
Sum ()
const;
180 virtual Element
Min ()
const;
181 virtual Element
Max ()
const;
221 const Element oldTol =
fTol;
231template<
class Element1,
class Element2>
239 Int_t verbose,Element maxDevAllow);
245 Int_t verbose,Element maxDevAllow);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual Element Sum() const
Compute sum of elements.
virtual Element RowNorm() const
Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}.
virtual Int_t * GetColIndexArray()=0
virtual Element ColNorm() const
Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.
virtual TMatrixTBase< Element > & Randomize(Element alpha, Element beta, Double_t &seed)
Randomize matrix element values.
virtual Int_t * GetRowIndexArray()=0
virtual TMatrixTBase< Element > & Sqr()
Square each element of the matrix.
virtual const Element * GetMatrixArray() const =0
virtual void Determinant(Double_t &d1, Double_t &d2) const
virtual TMatrixTBase< Element > & UnitMatrix()
Make a unit matrix (matrix need not be a square one).
Bool_t operator!=(Element val) const
Are all matrix elements not equal to val?
virtual TMatrixTBase< Element > & SetColIndexArray(Int_t *data)=0
virtual TMatrixTBase< Element > & Apply(const TElementPosActionT< Element > &action)
Apply action to each element of the matrix.
virtual const Int_t * GetRowIndexArray() const =0
virtual TMatrixTBase< Element > & Zero()
Set matrix elements to zero.
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
void Print(Option_t *name="") const override
Print the matrix as a table of elements.
virtual Int_t NonZeros() const
Compute the number of elements != 0.0.
virtual Double_t Determinant() const
virtual const Int_t * GetColIndexArray() const =0
virtual Element E2Norm() const
Square of the Euclidean norm, SUM{ m(i,j)^2 }.
virtual TMatrixTBase< Element > & Apply(const TElementActionT< Element > &action)
Apply action to each matrix element.
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 TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros=-1)=0
virtual Element Min() const
return minimum matrix element value
virtual Element * GetMatrixArray()=0
virtual Element Max() const
return maximum vector element value
virtual void GetMatrix2Array(Element *data, Option_t *option="") const
Copy matrix data to array .
Int_t GetNoElements() const
Bool_t operator<(Element val) const
Are all matrix elements < val?
void Draw(Option_t *option="") override
Draw this matrix The histogram is named "TMatrixT" by default and no title.
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.
static Element & NaNValue()
static void DoubleLexSort(Int_t n, Int_t *first, Int_t *second, Element *data)
Lexical sort on array data using indices first and second.
virtual TMatrixTBase< Element > & SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase< Element > &source)=0
Bool_t operator>(Element val) const
Are all matrix elements > val?
virtual Element operator()(Int_t rown, Int_t coln) const =0
virtual TMatrixTBase< Element > & SetRowIndexArray(Int_t *data)=0
virtual TMatrixTBase< Element > & Sqrt()
Take square root of all elements.
Bool_t operator==(Element val) const
Are all matrix elements equal to val?
virtual Element & operator()(Int_t rown, Int_t coln)=0
void Clear(Option_t *option="") override=0
virtual TMatrixTBase< Element > & Abs()
Take an absolute value of a matrix, i.e. apply Abs() to each element.
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.
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.
Bool_t operator<=(Element val) const
Are all matrix elements <= val?
Element SetTol(Element tol)
virtual Bool_t IsSymmetric() const
Check whether matrix is symmetric.
virtual TMatrixTBase< Element > & SetMatrixArray(const Element *data, Option_t *option="")
Copy array data to matrix .
Bool_t operator>=(Element val) const
Are all matrix elements >= val?
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.
virtual TMatrixTBase< Element > & NormByDiag(const TVectorT< Element > &v, Option_t *option="D")
option:
void AbstractMethod(const char *method) const
Call this function within a function that you don't want to define as purely virtual,...
Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TObject()
TObject constructor.
Bool_t VerifyMatrixIdentity(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2, Int_t verbose, Element maxDevAllow)
Verify that elements of the two matrices are equal within MaxDevAllow .
void Compare(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2)
Compare two matrices and print out the result of the comparison.
Bool_t VerifyMatrixValue(const TMatrixTBase< Element > &m, Element val, Int_t verbose, Element maxDevAllow)
Validate that all elements of matrix have value val within maxDevAllow.
Bool_t operator==(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2)
Check to see if two matrices are identical.
Element E2Norm(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2)
Square of the Euclidean norm of the difference between two matrices.
Bool_t AreCompatible(const TMatrixTBase< Element1 > &m1, const TMatrixTBase< Element2 > &m2, Int_t verbose=0)
Check that matrice sm1 and m2 areboth valid and have identical shapes .