12 #ifndef ROOT_TMatrixTBase 13 #define ROOT_TMatrixTBase 115 fNrows(0), fNcols(0), fRowLwb(0), fColLwb(0), fNelems(0), fNrowIndex(0),
116 fTol(0), fIsOwner(
kTRUE) { }
139 inline Element
SetTol (Element tol);
172 virtual Element
RowNorm ()
const;
173 virtual Element
ColNorm ()
const;
174 virtual Element
E2Norm ()
const;
178 virtual Element
Sum ()
const;
179 virtual Element
Min ()
const;
180 virtual Element
Max ()
const;
220 const Element oldTol =
fTol;
228 template<
class Element1,
class Element2>
236 Int_t verbose,Element maxDevAllow);
242 Int_t verbose,Element maxDevAllow);
virtual TMatrixTBase< Element > & UnitMatrix()
Make a unit matrix (matrix need not be a square one).
virtual const Element * GetMatrixArray() const =0
virtual TMatrixTBase< Element > & Sqrt()
Take square root of all elements.
virtual void Clear(Option_t *option="")=0
virtual Bool_t IsSymmetric() const
Check whether matrix is symmetric.
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...
virtual Int_t NonZeros() const
Compute the number of elements != 0.0.
virtual TMatrixTBase< Element > & SetMatrixArray(const Element *data, Option_t *option="")
Copy array data to matrix .
virtual TMatrixTBase< Element > & Zero()
Set matrix elements to zero.
Bool_t operator!=(Element val) const
Are all matrix elements not equal to val?
virtual TMatrixTBase< Element > & SetColIndexArray(Int_t *data)=0
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
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.
virtual TMatrixTBase< Element > & Sqr()
Square each element of the matrix.
Bool_t operator>(Element val) const
Are all matrix elements > val?
virtual TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros=-1)=0
virtual TMatrixTBase< Element > & SetRowIndexArray(Int_t *data)=0
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
double beta(double x, double y)
Calculates the beta function.
Int_t GetNoElements() const
Bool_t operator<(Element val) const
Are all matrix elements < val?
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 .
static void DoubleLexSort(Int_t n, Int_t *first, Int_t *second, Element *data)
default kTRUE, when Use array kFALSE
virtual Double_t Determinant() const
#define ClassDef(name, id)
Bool_t operator>=(Element val) const
Are all matrix elements >= val?
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 .
static constexpr double second
virtual Element operator()(Int_t rown, Int_t coln) const =0
virtual TMatrixTBase< Element > & Apply(const TElementActionT< Element > &action)
Apply action to each matrix element.
virtual TMatrixTBase< Element > & NormByDiag(const TVectorT< Element > &v, Option_t *option="D")
option:
virtual void Determinant(Double_t &d1, Double_t &d2) const
virtual TMatrixTBase< Element > & SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase< Element > &source)=0
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 > & 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.
virtual void GetMatrix2Array(Element *data, Option_t *option="") const
Copy matrix data to array .
virtual Element Min() const
return minimum matrix element value
virtual TMatrixTBase< Element > & Randomize(Element alpha, Element beta, Double_t &seed)
Randomize matrix element values.
The ROOT global object gROOT contains a list of all defined classes.
static constexpr double m2
Bool_t operator<=(Element val) const
Are all matrix elements <= val?
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
R__EXTERN Int_t gMatrixCheck
virtual Element RowNorm() const
Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}.
virtual Element E2Norm() const
Square of the Euclidian norm, SUM{ m(i,j)^2 }.
virtual Element Sum() const
Compute sum of elements.
void Print(Option_t *name="") const
Print the matrix as a table of elements.
void Draw(Option_t *option="")
Draw this matrix The histogram is named "TMatrixT" by default and no title.
Mother of all ROOT objects.
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 equal to val?
static Element & NaNValue()
virtual Element ColNorm() const
Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.
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 AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
virtual Element Max() const
return maximum vector element value
Element SetTol(Element tol)
virtual const Int_t * GetColIndexArray() const =0
virtual const Int_t * GetRowIndexArray() const =0
virtual TMatrixTBase< Element > & Abs()
Take an absolute value of a matrix, i.e. apply Abs() to each element.