Geophysical Inversion and Modelling Library  v1.5.2-5-g042d7f36
GIMLI::IdentityMatrix Class Reference

Identity matrix: derived from matrixBase. More...

+ Inheritance diagram for GIMLI::IdentityMatrix:
+ Collaboration diagram for GIMLI::IdentityMatrix:

Public Member Functions

 IdentityMatrix ()
 
 IdentityMatrix (Index nrows, double val=1.0)
 
virtual ~IdentityMatrix ()
 
virtual Index rows () const
 
virtual Index cols () const
 
virtual RVector mult (const RVector &a) const
 
virtual RVector transMult (const RVector &a) const
 
- Public Member Functions inherited from GIMLI::MatrixBase
 MatrixBase (bool verbose=false)
 
virtual ~MatrixBase ()
 
virtual uint rtti () const
 
void setVerbose (bool verbose)
 
bool verbose () const
 
Index size () const
 
virtual void resize (Index rows, Index cols)
 
virtual void clean ()
 
virtual void clear ()
 
virtual RVector dot (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 CVector transMult (const CVector &a) const
 
virtual void save (const std::string &filename) const
 

Protected Attributes

Index nrows_
 
double val_
 
- Protected Attributes inherited from GIMLI::MatrixBase
bool verbose_
 

Detailed Description

Identity matrix: derived from matrixBase.

Constructor & Destructor Documentation

◆ IdentityMatrix() [1/2]

GIMLI::IdentityMatrix::IdentityMatrix ( )
inline

Default constructor (empty matrix).

◆ IdentityMatrix() [2/2]

GIMLI::IdentityMatrix::IdentityMatrix ( Index  nrows,
double  val = 1.0 
)
inline

Constructor with number of rows/colums.

◆ ~IdentityMatrix()

virtual GIMLI::IdentityMatrix::~IdentityMatrix ( )
inlinevirtual

Default destructor.

Member Function Documentation

◆ cols()

virtual Index GIMLI::IdentityMatrix::cols ( ) const
inlinevirtual

Return number of cols

Reimplemented from GIMLI::MatrixBase.

◆ mult()

virtual RVector GIMLI::IdentityMatrix::mult ( const RVector a) const
inlinevirtual

Return this * a

Reimplemented from GIMLI::MatrixBase.

◆ rows()

virtual Index GIMLI::IdentityMatrix::rows ( ) const
inlinevirtual

Return number of cols

Reimplemented from GIMLI::MatrixBase.

◆ transMult()

virtual RVector GIMLI::IdentityMatrix::transMult ( const RVector a) const
inlinevirtual

Return this.T * a

Reimplemented from GIMLI::MatrixBase.