HLIBpro  2.1
Public Member Functions | List of all members
TLinearOperator Class Referenceabstract

Base class for all linear operators mapping vectors to vectors. More...

#include <TLinearOperator.hh>

Inheritance diagram for TLinearOperator:
TTypeInfo TFacInvMatrix TJacobi TMatrix TSOR TLDLInvMatrix TLDUInvMatrix TLLInvMatrix TLUInvMatrix TBlockMatrix TDenseMatrix TGhostMatrix TRkMatrix TSparseMatrix TUniformMatrix TZeroMatrix

Public Member Functions

virtual bool is_complex () const =0
 return true, if field type is complex
 
virtual bool is_self_adjoint () const =0
 return true, of operator is self adjoint
 
virtual void apply (const TVector *x, TVector *y, const matop_t op=MATOP_NORM) const =0
 
virtual void apply_add (const real alpha, const TVector *x, TVector *y, const matop_t op=MATOP_NORM) const =0
 
virtual TVectordomain_vector () const =0
 return vector in domain space
 
virtual TVectorrange_vector () const =0
 return vector in range space
 
virtual typeid_t type () const
 return type ID of matrix
 
- Public Member Functions inherited from TTypeInfo
virtual bool is_type (const typeid_t t) const
 return true if local object is of given type ID t
 
virtual std::string typestr () const
 return string representation of type
 

Detailed Description

Many standard arithmetic operations only depend upon a linear operator providing the mapping between vectors, e.g. iterativ solvers. Instead of requiring a full matrix and hence the need for an implementation of the full matrix algebra, an object of type TLinearOperator is fully sufficient in such cases.

Member Function Documentation

virtual void apply ( const TVector x,
TVector y,
const matop_t  op = MATOP_NORM 
) const
pure virtual

mapping function of linear operator $A$, e.g. $ y := A(x)$. Depending on op, either $A$, $A^T$ or $A^H$ is applied.

Implemented in TMatrix, TFacInvMatrix, TSOR, and TJacobi.

virtual void apply_add ( const real  alpha,
const TVector x,
TVector y,
const matop_t  op = MATOP_NORM 
) const
pure virtual

mapping function with update: $ y := y + \alpha A(x)$. Depending on op, either $A$, $A^T$ or $A^H$ is applied.

Implemented in TMatrix, TFacInvMatrix, TSOR, and TJacobi.