Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
TNL::Matrices::DenseMatrixElement< Real, Index > Class Template Reference

Accessor for dense matrix elements. More...

#include <TNL/Matrices/DenseMatrixElement.h>

Collaboration diagram for TNL::Matrices::DenseMatrixElement< Real, Index >:
Collaboration graph
[legend]

Public Types

using IndexType = Index
 Type of matrix elements column indexes.
 
using RealType = Real
 Type of matrix elements values.
 

Public Member Functions

__cuda_callable__ DenseMatrixElement (RealType &value, IndexType rowIdx, IndexType columnIdx, IndexType localIdx)
 Constructor.
 
__cuda_callable__ IndexType columnIndex () const
 Returns the column index of the matrix element.
 
__cuda_callable__ IndexType localIndex () const
 Returns the column index of the matrix element.
 
__cuda_callable__ IndexType rowIndex () const
 Returns the row index of the matrix element.
 
__cuda_callable__ RealTypevalue ()
 Returns reference on matrix element value.
 
__cuda_callable__ const RealTypevalue () const
 Returns constant reference on matrix element value.
 

Protected Attributes

const IndexType columnIdx
 
const IndexType rowIdx
 
RealTypevalue_
 

Detailed Description

template<typename Real, typename Index>
class TNL::Matrices::DenseMatrixElement< Real, Index >

Accessor for dense matrix elements.

Template Parameters
Realis a type of matrix elements values.
Indexis a type of matrix elements column indexes.

Constructor & Destructor Documentation

◆ DenseMatrixElement()

template<typename Real , typename Index >
__cuda_callable__ TNL::Matrices::DenseMatrixElement< Real, Index >::DenseMatrixElement ( RealType & value,
IndexType rowIdx,
IndexType columnIdx,
IndexType localIdx )
inline

Constructor.

Parameters
valueis matrix element value.
rowIdxis row index of the matrix element.
columnIdxis a column index of the matrix element.
localIdxis the column index of the matrix element as well.

Member Function Documentation

◆ value() [1/2]

template<typename Real , typename Index >
__cuda_callable__ RealType & TNL::Matrices::DenseMatrixElement< Real, Index >::value ( )
inline

Returns reference on matrix element value.

Returns
reference on matrix element value.

◆ value() [2/2]

template<typename Real , typename Index >
__cuda_callable__ const RealType & TNL::Matrices::DenseMatrixElement< Real, Index >::value ( ) const
inline

Returns constant reference on matrix element value.

Returns
constant reference on matrix element value.

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