Geophysical Inversion and Modeling Library  v1.0.12-3-g179296b4
GIMLI::MatrixBase Class Reference

Interface class for matrices. More...

Inherited by GIMLI::BlockMatrix< ValueType >, GIMLI::D2Matrix< Matrix1, Matrix2 >, GIMLI::DNMatrix< Matrix >, GIMLI::DRMatrix< Matrix >, GIMLI::H2SparseMapMatrix, GIMLI::HNMatrix< Matrix >, GIMLI::HRMatrix< Matrix >, GIMLI::IdentityMatrix, GIMLI::Matrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMatrix< ValueType >, GIMLI::V2Matrix< Matrix1, Matrix2 >, GIMLI::VNMatrix< Matrix >, GIMLI::VRMatrix< Matrix >, GIMLI::Matrix< double >, and GIMLI::SparseMapMatrix< double, Index >.

Public Member Functions

 MatrixBase (bool verbose=false)
 
virtual ~MatrixBase ()
 
virtual uint rtti () const
 
void setVerbose (bool verbose)
 
bool verbose () const
 
Index size () const
 
virtual Index rows () const
 
virtual Index cols () const
 
virtual void resize (Index rows, Index cols)
 
virtual void clean ()
 
virtual void clear ()
 
virtual RVector dot (const RVector &a) const
 
virtual RVector mult (const RVector &a) const
 
virtual CVector mult (const CVector &a) const
 
virtual RVector mult (const RVector &b, Index startI, Index endI) const
 
virtual CVector mult (const CVector &b, Index startI, Index endI) const
 
virtual RVector transMult (const RVector &a) const
 
virtual CVector transMult (const CVector &a) const
 
virtual void save (const std::string &filename) const
 

Protected Attributes

bool verbose_
 

Detailed Description

Interface class for matrices.

Pure virtual interface class for matrices. If you want your own Jacobian matrix to be used in Inversion or ModellingBase you have to derive your matrix from this class and implement all necessary members.

Constructor & Destructor Documentation

◆ MatrixBase()

GIMLI::MatrixBase::MatrixBase ( bool  verbose = false)
inline

Default constructor.

◆ ~MatrixBase()

virtual GIMLI::MatrixBase::~MatrixBase ( )
inlinevirtual

Default destructor.

Member Function Documentation

◆ clean()

virtual void GIMLI::MatrixBase::clean ( )
inlinevirtual

◆ clear()

◆ cols()

◆ dot()

virtual RVector GIMLI::MatrixBase::dot ( const RVector a) const
inlinevirtual

Return this * a. For being numpy api-compatible

References GIMLI::mult().

◆ mult() [1/2]

◆ mult() [2/2]

virtual CVector GIMLI::MatrixBase::mult ( const CVector a) const
inlinevirtual

Return this * a

References GIMLI::mult().

◆ resize()

virtual void GIMLI::MatrixBase::resize ( Index  rows,
Index  cols 
)
inlinevirtual

◆ rows()

◆ rtti()

◆ save()

virtual void GIMLI::MatrixBase::save ( const std::string &  filename) const
inlinevirtual

Brute force column separation fallback .. should be overwriten if you need performance for your onw matrix type.

Brute force row separation fallback .. should be overwriten if you need performance for your onw matrix type.

Brute force column separation fallback .. should be overwriten if you need performance for your onw matrix type.

Brute force row separation fallback .. should be overwriten if you need performance for your onw matrix type.

Save this matrix into the file filename given.

Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, and GIMLI::BlockMatrix< ValueType >.

Referenced by GIMLI::inv(), and GIMLI::Inversion< ModelValType >::run().

◆ size()

Index GIMLI::MatrixBase::size ( ) const
inline

◆ transMult() [1/2]

◆ transMult() [2/2]

virtual CVector GIMLI::MatrixBase::transMult ( const CVector a) const
inlinevirtual

Return this.T * a