Geophysical Inversion and Modelling Library
v1.5.2-5-g042d7f36
|
Interface class for matrices. More...
Inherited by GIMLI::Matrix< double >, GIMLI::SparseMapMatrix< double, Index >, 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_ |
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.
|
inline |
Default constructor.
|
inlinevirtual |
Default destructor.
|
inlinevirtual |
Fill Vector with 0.0. Don't change size.
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, and GIMLI::BlockMatrix< ValueType >.
|
inlinevirtual |
Clear the data, set size to zero and frees memory.
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::H2SparseMapMatrix, and GIMLI::BlockMatrix< ValueType >.
|
inlinevirtual |
Return number of colums
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::IdentityMatrix, GIMLI::HRMatrix< Matrix >, GIMLI::HNMatrix< Matrix >, GIMLI::H2SparseMapMatrix, and GIMLI::BlockMatrix< ValueType >.
Referenced by GIMLI::RInversion::checkJacobian(), GIMLI::LinearModelling::createDefaultStartModel(), GIMLI::HarmonicModelling::createJacobian(), GIMLI::BlockMatrix< ValueType >::mult(), GIMLI::LinearModelling::response(), and GIMLI::BlockMatrix< ValueType >::transMult().
Return this * a. For being numpy api-compatible
Return this * a
Reimplemented in GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::BlockMatrix< ValueType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::BlockMatrix< ValueType >, GIMLI::IdentityMatrix, and GIMLI::H2SparseMapMatrix.
Referenced by GIMLI::BlockMatrix< ValueType >::mult().
|
inlinevirtual |
Resize this matrix to rows, cols
Reimplemented in GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, and GIMLI::Matrix< double >.
Referenced by GIMLI::HarmonicModelling::createJacobian(), and GIMLI::MRSModelling::createJacobian().
|
inlinevirtual |
Return number of cols
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::IdentityMatrix, GIMLI::HRMatrix< Matrix >, GIMLI::HNMatrix< Matrix >, GIMLI::H2SparseMapMatrix, and GIMLI::BlockMatrix< ValueType >.
Referenced by GIMLI::RInversion::checkJacobian(), GIMLI::HarmonicModelling::createJacobian(), GIMLI::BlockMatrix< ValueType >::mult(), and GIMLI::BlockMatrix< ValueType >::transMult().
|
inlinevirtual |
Return entity rtti value.
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, and GIMLI::BlockMatrix< ValueType >.
|
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. / template< class ValueType > const Vector < ValueType > row(Index r) const{ __M ASSERT_RANGE(r, 0, rows()) Vector < ValueType > b(rows(), 0.0); b[r] = 1.0; return this->transMult(b); } these template function above will not work until MatrixBase is a non template function /! 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. */ virtual const RVector row(Index r) const { __M ASSERT_RANGE(r, 0, rows()) RVector b(rows(), 0.0); b[r] = 1.0; return this->transMult(b); }
/*! Save this matrix into the file filename given.
Reimplemented in GIMLI::SparseMatrix< ValueType >, GIMLI::SparseMapMatrix< ValueType, IndexType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, and GIMLI::BlockMatrix< ValueType >.
|
inline |
Return number of rows
Referenced by GIMLI::interpolate(), and GIMLI::DataMap::save().
Return this.T * a
Return this.T * a
Reimplemented in GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< double >, GIMLI::BlockMatrix< ValueType >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::BlockMatrix< ValueType >, GIMLI::IdentityMatrix, and GIMLI::H2SparseMapMatrix.
Referenced by GIMLI::BlockMatrix< ValueType >::transMult().