Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
GIMLI::MatrixBase Class Reference

Interface class for matrices. More...

#include <matrix.h>

Inherited by GIMLI::BlockMatrix< double >, GIMLI::DRMatrix< RMatrix >, GIMLI::DRMatrix< SparseMapMatrix< double, Index > >, GIMLI::DRMatrix< TwoModelsCMatrix >, GIMLI::DRMatrix< RSparseMapMatrix >, GIMLI::Matrix< double >, GIMLI::Matrix< Complex >, GIMLI::SparseMapMatrix< int, Index >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMapMatrix< Complex, Index >, GIMLI::SparseMatrix< int >, GIMLI::SparseMatrix< double >, GIMLI::SparseMatrix< Complex >, GIMLI::V2Matrix< ManyCMatrix, ManyModelsCMatrix >, 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 >, and GIMLI::VRMatrix< Matrix >.

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

◆ ~MatrixBase()

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

Default destructor.

Member Function Documentation

◆ clean()

◆ clear()

◆ cols()

◆ dot()

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

Return this * a. For being numpy api-compatible

References mult().

◆ mult() [1/3]

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

Return this * a

References rows().

◆ mult() [2/3]

◆ mult() [3/3]

virtual RVector GIMLI::MatrixBase::mult ( const RVector & b,
Index startI,
Index endI ) const
inlinevirtual

◆ resize()

◆ 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::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< Complex, Index >, GIMLI::SparseMapMatrix< Complex, Index >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMapMatrix< int, Index >, GIMLI::SparseMapMatrix< int, Index >, GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMatrix< Complex >, GIMLI::SparseMatrix< Complex >, GIMLI::SparseMatrix< double >, GIMLI::SparseMatrix< double >, GIMLI::SparseMatrix< int >, and GIMLI::SparseMatrix< int >.

◆ size()

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

Return number of rows

References rows().

Referenced by GIMLI::interpolate().

◆ transMult() [1/2]

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

Return this.T * a

References cols().

◆ transMult() [2/2]