imate
C++/CUDA Reference
Loading...
Searching...
No Matches
cLinearOperator< DataType > Class Template Referenceabstract

Base class for linear operators. This class serves as interface for all derived classes. More...

#include <c_linear_operator.h>

Inheritance diagram for cLinearOperator< DataType >:
Collaboration diagram for cLinearOperator< DataType >:

Public Member Functions

 cLinearOperator ()
 Default constructor.
 
virtual ~cLinearOperator ()
 Destructor.
 
void set_parameters (DataType *parameters_)
 Sets the scalar parameter this->parameters. Parameter is initialized to NULL. However, before calling dot or transpose_dot functions, the parameters must be set.
 
virtual DataType get_eigenvalue (const DataType *known_parameters, const DataType known_eigenvalue, const DataType *inquiry_parameters) const =0
 
virtual void dot (const DataType *vector, DataType *product)=0
 
virtual void transpose_dot (const DataType *vector, DataType *product)=0
 
- Public Member Functions inherited from cLinearOperatorBase
 cLinearOperatorBase ()
 Default constructor.
 
 cLinearOperatorBase (const LongIndexType num_rows_, const LongIndexType num_columns_)
 Constructor with setting num_rows and num_columns.
 
virtual ~cLinearOperatorBase ()
 Destructor.
 
LongIndexType get_num_rows () const
 Returns the number of rows of the matrix.
 
LongIndexType get_num_columns () const
 Returns the number of columns of the matrix.
 
IndexType get_num_parameters () const
 Returns the number of parameters of the linear operator.
 
FlagType is_eigenvalue_relation_known () const
 Returns a flag that determines whether a relation between the parameters of the operator and its eigenvalue(s) is known.
 
virtual void set_symmetry (FlagType symmetric)=0
 

Protected Attributes

DataType * parameters
 
- Protected Attributes inherited from cLinearOperatorBase
const LongIndexType num_rows
 
const LongIndexType num_columns
 
FlagType eigenvalue_relation_known
 
IndexType num_parameters
 

Detailed Description

template<typename DataType>
class cLinearOperator< DataType >

Base class for linear operators. This class serves as interface for all derived classes.

The prefix c in this class's name (and its derivatves), stands for the cpp code, intrast to the cu prefix, which stands for the cuda code. Most derived classes have a cuda counterpart.

See also
cMatrix, cAffineMatrixFunction, cuLinearOperator, cLinearOperatorBase

Definition at line 42 of file c_linear_operator.h.

Constructor & Destructor Documentation

◆ cLinearOperator()

template<typename DataType >
cLinearOperator< DataType >::cLinearOperator ( )

Default constructor.

Definition at line 28 of file c_linear_operator.cpp.

28 :
29 parameters(NULL)
30{
31}

◆ ~cLinearOperator()

template<typename DataType >
cLinearOperator< DataType >::~cLinearOperator ( )
virtual

Destructor.

Definition at line 42 of file c_linear_operator.cpp.

43{
44}

Member Function Documentation

◆ dot()

template<typename DataType >
virtual void cLinearOperator< DataType >::dot ( const DataType *  vector,
DataType *  product 
)
pure virtual

◆ get_eigenvalue()

template<typename DataType >
virtual DataType cLinearOperator< DataType >::get_eigenvalue ( const DataType *  known_parameters,
const DataType  known_eigenvalue,
const DataType *  inquiry_parameters 
) const
pure virtual

Implemented in cAffineMatrixFunction< DataType >, and cMatrix< DataType >.

Referenced by cTraceEstimator< DataType >::_c_stochastic_lanczos_quadrature().

Here is the caller graph for this function:

◆ set_parameters()

template<typename DataType >
void cLinearOperator< DataType >::set_parameters ( DataType *  parameters_)

Sets the scalar parameter this->parameters. Parameter is initialized to NULL. However, before calling dot or transpose_dot functions, the parameters must be set.

Parameters
[in]parameters_A pointer to the scalar or array of parameters.

Definition at line 59 of file c_linear_operator.cpp.

60{
61 this->parameters = parameters_;
62}

Referenced by cTraceEstimator< DataType >::_c_stochastic_lanczos_quadrature().

Here is the caller graph for this function:

◆ transpose_dot()

template<typename DataType >
virtual void cLinearOperator< DataType >::transpose_dot ( const DataType *  vector,
DataType *  product 
)
pure virtual

Member Data Documentation

◆ parameters

template<typename DataType >
DataType* cLinearOperator< DataType >::parameters
protected

Definition at line 69 of file c_linear_operator.h.


The documentation for this class was generated from the following files: