Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMatrixTBase< Element > Class Template Referenceabstract

template<class Element>
class TMatrixTBase< Element >

TMatrixTBase.

Template of base class in the linear algebra package.

See the Matrix Linear Algebra page 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 ()
 
 ~TMatrixTBase () override
 
virtual TMatrixTBase< Element > & Abs ()
 Take an absolute value of a matrix, i.e. apply Abs() to each element.
 
virtual TMatrixTBase< Element > & Apply (const TElementActionT< Element > &action)
 Apply action to each matrix element.
 
virtual TMatrixTBase< Element > & Apply (const TElementPosActionT< Element > &action)
 Apply action to each element of the matrix.
 
TClassClass ()
 
void Clear (Option_t *option="") override=0
 
virtual Element ColNorm () const
 Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.
 
virtual Double_t Determinant () const
 
virtual void Determinant (Double_t &d1, Double_t &d2) const
 
void Draw (Option_t *option="") override
 Draw this matrix The histogram is named "TMatrixT" by default and no title.
 
virtual Element E2Norm () const
 Square of the Euclidean norm, SUM{ m(i,j)^2 }.
 
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 const Int_tGetColIndexArray () const =0
 
virtual Int_tGetColIndexArray ()=0
 
Int_t GetColLwb () const
 
Int_t GetColUpb () const
 
virtual void GetMatrix2Array (Element *data, Option_t *option="") const
 Copy matrix data to array .
 
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_tGetRowIndexArray () const =0
 
virtual Int_tGetRowIndexArray ()=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.
 
void Invalidate ()
 
TClassIsA () const override
 
Bool_t IsOwner () const
 
virtual Bool_t IsSymmetric () const
 Check whether matrix is symmetric.
 
Bool_t IsValid () const
 
void MakeValid ()
 
virtual Element Max () const
 return maximum vector element value
 
virtual Element Min () const
 return minimum matrix element value
 
virtual Int_t NonZeros () const
 Compute the number of elements != 0.0.
 
Element Norm1 () const
 
virtual TMatrixTBase< Element > & NormByDiag (const TVectorT< Element > &v, Option_t *option="D")
 option:
 
Element NormInf () const
 
Bool_t operator!= (Element val) const
 Are all matrix elements not equal to val?
 
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?
 
Bool_t operator<= (Element val) const
 Are all matrix elements <= val?
 
Bool_t operator== (Element val) const
 Are all matrix elements equal to val?
 
Bool_t operator> (Element val) const
 Are all matrix elements > val?
 
Bool_t operator>= (Element val) const
 Are all matrix elements >= val?
 
void Print (Option_t *name="") const override
 Print the matrix as a table of elements.
 
virtual TMatrixTBase< Element > & Randomize (Element alpha, Element beta, Double_t &seed)
 Randomize matrix element values.
 
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}.
 
virtual TMatrixTBase< Element > & SetColIndexArray (Int_t *data)=0
 
virtual TMatrixTBase< Element > & SetMatrixArray (const Element *data, Option_t *option="")
 Copy array data to matrix .
 
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.
 
virtual TMatrixTBase< Element > & Sqr ()
 Square each element of the matrix.
 
virtual TMatrixTBase< Element > & Sqrt ()
 Take square root of all elements.
 
void Streamer (TBuffer &) override
 Stream an object of class TMatrixTBase<Element>.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual Element Sum () const
 Compute sum of elements.
 
virtual TMatrixTBase< Element > & UnitMatrix ()
 Make a unit matrix (matrix need not be a square one).
 
virtual TMatrixTBase< Element > & Zero ()
 Set matrix elements to zero.
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Element & NaNValue ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Protected Types

enum  { kSizeMax = 25 }
 
enum  { kWorkMax = 100 }
 
enum  EMatrixStatusBits { kStatus = (1ULL << ( 14 )) }
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

Static Protected Member Functions

static void DoubleLexSort (Int_t n, Int_t *first, Int_t *second, Element *data)
 default kTRUE, when Use array kFALSE
 
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.
 

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 ()
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

#include <TMatrixTBase.h>

Inheritance diagram for TMatrixTBase< Element >:
[legend]

Member Enumeration Documentation

◆ anonymous enum

template<class Element >
anonymous enum
protected
Enumerator
kSizeMax 

Definition at line 106 of file TMatrixTBase.h.

◆ anonymous enum

template<class Element >
anonymous enum
protected
Enumerator
kWorkMax 

Definition at line 107 of file TMatrixTBase.h.

◆ EMatrixStatusBits

template<class Element >
enum TMatrixTBase::EMatrixStatusBits
protected
Enumerator
kStatus 

Definition at line 109 of file TMatrixTBase.h.

Constructor & Destructor Documentation

◆ TMatrixTBase()

template<class Element >
TMatrixTBase< Element >::TMatrixTBase ( )
inline

Definition at line 115 of file TMatrixTBase.h.

◆ ~TMatrixTBase()

template<class Element >
TMatrixTBase< Element >::~TMatrixTBase ( )
inlineoverride

Definition at line 119 of file TMatrixTBase.h.

Member Function Documentation

◆ Abs()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Abs
virtual

Take an absolute value of a matrix, i.e. apply Abs() to each element.

Definition at line 363 of file TMatrixTBase.cxx.

◆ Apply() [1/2]

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Apply ( const TElementActionT< Element > &  action)
virtual

Apply action to each matrix element.

Reimplemented in TMatrixTSym< Double_t >, and TMatrixTSym< Element >.

Definition at line 801 of file TMatrixTBase.cxx.

◆ Apply() [2/2]

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Apply ( const TElementPosActionT< Element > &  action)
virtual

Apply action to each element of the matrix.

To action the location of the current element is passed.

Reimplemented in TMatrixTSym< Double_t >, and TMatrixTSym< Element >.

Definition at line 818 of file TMatrixTBase.cxx.

◆ Class() [1/2]

template<class Element >
static TClass * TMatrixTBase< Element >::Class ( )
static
Returns
TClass describing this class

◆ Class() [2/2]

TClass * TMatrixTBase< double >::Class ( )

◆ Class_Name()

template<class Element >
static const char * TMatrixTBase< Element >::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

template<class Element >
static constexpr Version_t TMatrixTBase< Element >::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 204 of file TMatrixTBase.h.

◆ Clear()

template<class Element >
void TMatrixTBase< Element >::Clear ( Option_t option = "")
overridepure virtual

◆ ColNorm()

template<class Element >
Element TMatrixTBase< Element >::ColNorm
virtual

Column matrix norm, MAX{ SUM{ |M(i,j)|, over i}, over j}.

The norm is induced by the 1 vector norm.

Reimplemented in TMatrixTSparse< Element >, and TMatrixTSparse< Double_t >.

Definition at line 517 of file TMatrixTBase.cxx.

◆ DeclFileName()

template<class Element >
static const char * TMatrixTBase< Element >::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 204 of file TMatrixTBase.h.

◆ Determinant() [1/2]

template<class Element >
virtual Double_t TMatrixTBase< Element >::Determinant ( ) const
inlinevirtual

◆ Determinant() [2/2]

template<class Element >
virtual void TMatrixTBase< Element >::Determinant ( Double_t d1,
Double_t d2 
) const
inlinevirtual

◆ DoubleLexSort()

template<class Element >
void TMatrixTBase< Element >::DoubleLexSort ( Int_t  n,
Int_t first,
Int_t second,
Element *  data 
)
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.

◆ Draw()

template<class Element >
void TMatrixTBase< Element >::Draw ( Option_t option = "")
overridevirtual

Draw this matrix The histogram is named "TMatrixT" by default and no title.

Reimplemented from TObject.

Definition at line 623 of file TMatrixTBase.cxx.

◆ E2Norm()

template<class Element >
Element TMatrixTBase< Element >::E2Norm
virtual

Square of the Euclidean norm, SUM{ m(i,j)^2 }.

Definition at line 544 of file TMatrixTBase.cxx.

◆ ExtractRow()

template<class Element >
void TMatrixTBase< Element >::ExtractRow ( Int_t  row,
Int_t  col,
Element *  v,
Int_t  n = -1 
) const
virtual

Store in array v, n matrix elements of row rown starting at column coln.

Reimplemented in TMatrixTSparse< Double_t >, and TMatrixTSparse< Element >.

Definition at line 305 of file TMatrixTBase.cxx.

◆ GetColIndexArray() [1/2]

template<class Element >
virtual const Int_t * TMatrixTBase< Element >::GetColIndexArray ( ) const
pure virtual

◆ GetColIndexArray() [2/2]

template<class Element >
virtual Int_t * TMatrixTBase< Element >::GetColIndexArray ( )
pure virtual

◆ GetColLwb()

template<class Element >
Int_t TMatrixTBase< Element >::GetColLwb ( ) const
inline

Definition at line 124 of file TMatrixTBase.h.

◆ GetColUpb()

template<class Element >
Int_t TMatrixTBase< Element >::GetColUpb ( ) const
inline

Definition at line 125 of file TMatrixTBase.h.

◆ GetElements()

template<class Element >
Element * TMatrixTBase< Element >::GetElements ( )
private

◆ GetMatrix2Array()

template<class Element >
void TMatrixTBase< Element >::GetMatrix2Array ( Element *  data,
Option_t option = "" 
) const
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 =

  • 'F' : column major (Fortran) array[i+j*fNrows] = m[i][j]
  • else : row major (C) array[i*fNcols+j] = m[i][j] (default)

Reimplemented in TMatrixTSparse< Double_t >, and TMatrixTSparse< Element >.

Definition at line 245 of file TMatrixTBase.cxx.

◆ GetMatrixArray() [1/2]

template<class Element >
virtual const Element * TMatrixTBase< Element >::GetMatrixArray ( ) const
pure virtual

◆ GetMatrixArray() [2/2]

template<class Element >
virtual Element * TMatrixTBase< Element >::GetMatrixArray ( )
pure virtual

◆ GetNcols()

template<class Element >
Int_t TMatrixTBase< Element >::GetNcols ( ) const
inline

Definition at line 126 of file TMatrixTBase.h.

◆ GetNoElements()

template<class Element >
Int_t TMatrixTBase< Element >::GetNoElements ( ) const
inline

Definition at line 127 of file TMatrixTBase.h.

◆ GetNrows()

template<class Element >
Int_t TMatrixTBase< Element >::GetNrows ( ) const
inline

Definition at line 123 of file TMatrixTBase.h.

◆ GetRowIndexArray() [1/2]

template<class Element >
virtual const Int_t * TMatrixTBase< Element >::GetRowIndexArray ( ) const
pure virtual

◆ GetRowIndexArray() [2/2]

template<class Element >
virtual Int_t * TMatrixTBase< Element >::GetRowIndexArray ( )
pure virtual

◆ GetRowLwb()

template<class Element >
Int_t TMatrixTBase< Element >::GetRowLwb ( ) const
inline

Definition at line 121 of file TMatrixTBase.h.

◆ GetRowUpb()

template<class Element >
Int_t TMatrixTBase< Element >::GetRowUpb ( ) const
inline

Definition at line 122 of file TMatrixTBase.h.

◆ GetSub()

template<class Element >
virtual TMatrixTBase< Element > & 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
pure virtual

◆ GetTol()

template<class Element >
Element TMatrixTBase< Element >::GetTol ( ) const
inline

Definition at line 128 of file TMatrixTBase.h.

◆ IndexedLexSort()

template<class Element >
void TMatrixTBase< Element >::IndexedLexSort ( Int_t  n,
Int_t first,
Int_t  swapFirst,
Int_t second,
Int_t  swapSecond,
Int_t index 
)
staticprotected

Lexical sort on array data using indices first and second.

Definition at line 81 of file TMatrixTBase.cxx.

◆ InsertRow()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::InsertRow ( Int_t  row,
Int_t  col,
const Element *  v,
Int_t  n = -1 
)
virtual

Copy n elements from array v to row rown starting at column coln.

Reimplemented in TMatrixTSparse< Double_t >, and TMatrixTSparse< Element >.

Definition at line 271 of file TMatrixTBase.cxx.

◆ Invalidate()

template<class Element >
void TMatrixTBase< Element >::Invalidate ( )
inline

Definition at line 144 of file TMatrixTBase.h.

◆ IsA()

template<class Element >
TClass * TMatrixTBase< Element >::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Reimplemented in TMatrixTSparse< Element >, TMatrixTSparse< Double_t >, TMatrixTSym< Element >, and TMatrixTSym< Double_t >.

Definition at line 204 of file TMatrixTBase.h.

◆ IsOwner()

template<class Element >
Bool_t TMatrixTBase< Element >::IsOwner ( ) const
inline

Definition at line 147 of file TMatrixTBase.h.

◆ IsSymmetric()

template<class Element >
Bool_t TMatrixTBase< Element >::IsSymmetric
virtual

Check whether matrix is symmetric.

Reimplemented in TMatrixTSparse< Element >, TMatrixTSparse< Double_t >, TMatrixTSym< Element >, and TMatrixTSym< Double_t >.

Definition at line 216 of file TMatrixTBase.cxx.

◆ IsValid()

template<class Element >
Bool_t TMatrixTBase< Element >::IsValid ( ) const
inline

Definition at line 146 of file TMatrixTBase.h.

◆ MakeValid()

template<class Element >
void TMatrixTBase< Element >::MakeValid ( )
inline

Definition at line 145 of file TMatrixTBase.h.

◆ Max()

template<class Element >
Element TMatrixTBase< Element >::Max
virtual

return maximum vector element value

Definition at line 609 of file TMatrixTBase.cxx.

◆ Min()

template<class Element >
Element TMatrixTBase< Element >::Min
virtual

return minimum matrix element value

Definition at line 596 of file TMatrixTBase.cxx.

◆ NaNValue()

template<class Element >
Element & TMatrixTBase< Element >::NaNValue
static

Definition at line 1086 of file TMatrixTBase.cxx.

◆ NonZeros()

template<class Element >
Int_t TMatrixTBase< Element >::NonZeros
virtual

Compute the number of elements != 0.0.

Reimplemented in TMatrixTSparse< Element >, and TMatrixTSparse< Double_t >.

Definition at line 562 of file TMatrixTBase.cxx.

◆ Norm1()

template<class Element >
Element TMatrixTBase< Element >::Norm1 ( ) const
inline

Definition at line 177 of file TMatrixTBase.h.

◆ NormByDiag()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::NormByDiag ( const TVectorT< Element > &  v,
Option_t option = "D" 
)
virtual

option:

Reimplemented in TMatrixTSparse< Element >.

Definition at line 436 of file TMatrixTBase.cxx.

◆ NormInf()

template<class Element >
Element TMatrixTBase< Element >::NormInf ( ) const
inline

Definition at line 176 of file TMatrixTBase.h.

◆ operator!=()

template<class Element >
Bool_t TMatrixTBase< Element >::operator!= ( Element  val) const

Are all matrix elements not equal to val?

Definition at line 713 of file TMatrixTBase.cxx.

◆ operator()() [1/2]

template<class Element >
virtual Element TMatrixTBase< Element >::operator() ( Int_t  rown,
Int_t  coln 
) const
pure virtual

◆ operator()() [2/2]

template<class Element >
virtual Element & TMatrixTBase< Element >::operator() ( Int_t  rown,
Int_t  coln 
)
pure virtual

◆ operator<()

template<class Element >
Bool_t TMatrixTBase< Element >::operator< ( Element  val) const

Are all matrix elements < val?

Definition at line 733 of file TMatrixTBase.cxx.

◆ operator<=()

template<class Element >
Bool_t TMatrixTBase< Element >::operator<= ( Element  val) const

Are all matrix elements <= val?

Definition at line 750 of file TMatrixTBase.cxx.

◆ operator==()

template<class Element >
Bool_t TMatrixTBase< Element >::operator== ( Element  val) const

Are all matrix elements equal to val?

Definition at line 693 of file TMatrixTBase.cxx.

◆ operator>()

template<class Element >
Bool_t TMatrixTBase< Element >::operator> ( Element  val) const

Are all matrix elements > val?

Definition at line 767 of file TMatrixTBase.cxx.

◆ operator>=()

template<class Element >
Bool_t TMatrixTBase< Element >::operator>= ( Element  val) const

Are all matrix elements >= val?

Definition at line 784 of file TMatrixTBase.cxx.

◆ Print()

template<class Element >
void TMatrixTBase< Element >::Print ( Option_t option = "") const
overridevirtual

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 "

Reimplemented from TObject.

Definition at line 636 of file TMatrixTBase.cxx.

◆ Randomize()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Randomize ( Element  alpha,
Element  beta,
Double_t seed 
)
virtual

Randomize matrix element values.

Reimplemented in TMatrixTSparse< Double_t >, TMatrixTSym< Double_t >, TMatrixTSparse< Element >, and TMatrixTSym< Element >.

Definition at line 836 of file TMatrixTBase.cxx.

◆ ResizeTo() [1/2]

template<class Element >
virtual TMatrixTBase< Element > & TMatrixTBase< Element >::ResizeTo ( Int_t  nrows,
Int_t  ncols,
Int_t  nr_nonzeros = -1 
)
pure virtual

◆ ResizeTo() [2/2]

template<class Element >
virtual TMatrixTBase< Element > & TMatrixTBase< Element >::ResizeTo ( Int_t  row_lwb,
Int_t  row_upb,
Int_t  col_lwb,
Int_t  col_upb,
Int_t  nr_nonzeros = -1 
)
pure virtual

◆ RowNorm()

template<class Element >
Element TMatrixTBase< Element >::RowNorm
virtual

Row matrix norm, MAX{ SUM{ |M(i,j)|, over j}, over i}.

The norm is induced by the infinity vector norm.

Reimplemented in TMatrixTSparse< Element >, and TMatrixTSparse< Double_t >.

Definition at line 490 of file TMatrixTBase.cxx.

◆ SetColIndexArray()

template<class Element >
virtual TMatrixTBase< Element > & TMatrixTBase< Element >::SetColIndexArray ( Int_t data)
pure virtual

◆ SetMatrixArray()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::SetMatrixArray ( const Element *  data,
Option_t option = "" 
)
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 =

  • 'F' : column major (Fortran) m[i][j] = array[i+j*fNrows]
  • else : row major (C) m[i][j] = array[i*fNcols+j] (default)

Reimplemented in TMatrixTSym< Double_t >, TMatrixTSparse< Element >, and TMatrixTSym< Element >.

Definition at line 188 of file TMatrixTBase.cxx.

◆ SetRowIndexArray()

template<class Element >
virtual TMatrixTBase< Element > & TMatrixTBase< Element >::SetRowIndexArray ( Int_t data)
pure virtual

◆ SetSub()

template<class Element >
virtual TMatrixTBase< Element > & TMatrixTBase< Element >::SetSub ( Int_t  row_lwb,
Int_t  col_lwb,
const TMatrixTBase< Element > &  source 
)
pure virtual

◆ SetTol()

template<class Element >
Element TMatrixTBase< Element >::SetTol ( Element  tol)
inline

Definition at line 219 of file TMatrixTBase.h.

◆ Shift()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Shift ( Int_t  row_shift,
Int_t  col_shift 
)
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]

Reimplemented in TMatrixTSym< Element >, and TMatrixTSym< Double_t >.

Definition at line 339 of file TMatrixTBase.cxx.

◆ Sqr()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Sqr
virtual

Square each element of the matrix.

Definition at line 381 of file TMatrixTBase.cxx.

◆ Sqrt()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Sqrt
virtual

Take square root of all elements.

Definition at line 399 of file TMatrixTBase.cxx.

◆ Streamer()

template<class Element >
void TMatrixTBase< Element >::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TMatrixTBase<Element>.

Reimplemented from TObject.

Reimplemented in TMatrixTSparse< Element >, TMatrixTSparse< Double_t >, TMatrixTSym< Element >, and TMatrixTSym< Double_t >.

Definition at line 1058 of file TMatrixTBase.cxx.

◆ StreamerNVirtual()

template<class Element >
void TMatrixTBase< Element >::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 204 of file TMatrixTBase.h.

◆ Sum()

template<class Element >
Element TMatrixTBase< Element >::Sum
virtual

Compute sum of elements.

Definition at line 579 of file TMatrixTBase.cxx.

◆ UnitMatrix()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::UnitMatrix
virtual

Make a unit matrix (matrix need not be a square one).

Reimplemented in TMatrixTSparse< Element >, and TMatrixTSparse< Double_t >.

Definition at line 417 of file TMatrixTBase.cxx.

◆ Zero()

template<class Element >
TMatrixTBase< Element > & TMatrixTBase< Element >::Zero
virtual

Set matrix elements to zero.

Reimplemented in TMatrixTSparse< Element >, and TMatrixTSparse< Double_t >.

Definition at line 351 of file TMatrixTBase.cxx.

Member Data Documentation

◆ fColLwb

template<class Element >
Int_t TMatrixTBase< Element >::fColLwb
protected

Definition at line 93 of file TMatrixTBase.h.

◆ fIsOwner

template<class Element >
Bool_t TMatrixTBase< Element >::fIsOwner
protected

Definition at line 100 of file TMatrixTBase.h.

◆ fNcols

template<class Element >
Int_t TMatrixTBase< Element >::fNcols
protected

Definition at line 91 of file TMatrixTBase.h.

◆ fNelems

template<class Element >
Int_t TMatrixTBase< Element >::fNelems
protected

Definition at line 94 of file TMatrixTBase.h.

◆ fNrowIndex

template<class Element >
Int_t TMatrixTBase< Element >::fNrowIndex
protected

Definition at line 95 of file TMatrixTBase.h.

◆ fNrows

template<class Element >
Int_t TMatrixTBase< Element >::fNrows
protected

Definition at line 90 of file TMatrixTBase.h.

◆ fRowLwb

template<class Element >
Int_t TMatrixTBase< Element >::fRowLwb
protected

Definition at line 92 of file TMatrixTBase.h.

◆ fTol

template<class Element >
Element TMatrixTBase< Element >::fTol
protected

Definition at line 97 of file TMatrixTBase.h.

  • math/matrix/inc/TMatrixDBasefwd.h
  • math/matrix/inc/TMatrixTBase.h
  • math/matrix/src/TMatrixTBase.cxx