Geophysical Inversion and Modelling Library v1.5.4
|
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_ |
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.
Referenced by GIMLI::BlockMatrix< double >::add(), GIMLI::BlockMatrix< double >::addMatrix(), GIMLI::BlockMatrix< double >::addMatrix(), GIMLI::IdentityMatrix::IdentityMatrix(), GIMLI::IdentityMatrix::IdentityMatrix(), GIMLI::Matrix< double >::Matrix(), GIMLI::Matrix< double >::Matrix(), GIMLI::Matrix< double >::Matrix(), GIMLI::Matrix< double >::Matrix(), GIMLI::BlockMatrix< double >::mult(), GIMLI::SparseMapMatrix< int, Index >::SparseMapMatrix(), GIMLI::SparseMapMatrix< int, Index >::SparseMapMatrix(), GIMLI::SparseMatrix< int >::SparseMatrix(), GIMLI::SparseMatrix< int >::SparseMatrix(), GIMLI::SparseMatrix< int >::SparseMatrix(), and GIMLI::BlockMatrix< double >::transMult().
|
inlinevirtual |
Default destructor.
|
inlinevirtual |
Fill Vector with 0.0. Don't change size.
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::SparseMatrix< ValueType >, GIMLI::SparseMatrix< Complex >, GIMLI::SparseMatrix< Complex >, GIMLI::SparseMatrix< double >, GIMLI::SparseMatrix< double >, GIMLI::SparseMatrix< int >, and GIMLI::SparseMatrix< int >.
|
inlinevirtual |
Clear the data, set size to zero and frees memory.
Reimplemented in GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::H2SparseMapMatrix, 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 >.
|
inlinevirtual |
Return number of colums
Reimplemented in GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::H2SparseMapMatrix, GIMLI::HNMatrix< Matrix >, GIMLI::HRMatrix< Matrix >, GIMLI::IdentityMatrix, 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 >.
Referenced by resize(), transMult(), and transMult().
Return this * a. For being numpy api-compatible
References mult().
Return this * a
References rows().
Return this * a
Reimplemented in GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::H2SparseMapMatrix, GIMLI::IdentityMatrix, GIMLI::Matrix< ValueType >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMatrix< double >, and GIMLI::SparseMatrix< double >.
References rows().
Referenced by dot().
|
inlinevirtual |
Reimplemented in GIMLI::Matrix< double >, and GIMLI::Matrix< double >.
|
inlinevirtual |
Resize this matrix to rows, cols
Reimplemented in 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 >, and GIMLI::SparseMapMatrix< int, Index >.
|
inlinevirtual |
Return number of cols
Reimplemented in GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::H2SparseMapMatrix, GIMLI::HNMatrix< Matrix >, GIMLI::HRMatrix< Matrix >, GIMLI::IdentityMatrix, 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 >.
|
inlinevirtual |
Return entity rtti value.
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 >.
|
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 >.
|
inline |
Return this.T * a
References cols().
Return this.T * a
Reimplemented in GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< ValueType >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::BlockMatrix< double >, GIMLI::H2SparseMapMatrix, GIMLI::IdentityMatrix, GIMLI::Matrix< ValueType >, GIMLI::Matrix< ValueType >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< Complex >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::Matrix< double >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMapMatrix< double, Index >, GIMLI::SparseMatrix< double >, and GIMLI::SparseMatrix< double >.
References cols().