MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::shifted_inserter< BaseInserter > Class Template Reference

Offset decorator for sparse matrix inserters. More...

#include <shifted_inserter.hpp>

Public Member Functions

template<typename Matrix>
 shifted_inserter (Matrix &matrix, size_type slot_size, size_type row_offset=0, size_type col_offset=0)
 Construct shifted inserter owning a base inserter.
row_proxy operator[] (size_type row)
void set_row_offset (size_type off)
void set_col_offset (size_type off)
size_type get_row_offset () const
size_type get_col_offset () const

Detailed Description

template<typename BaseInserter>
class mtl::shifted_inserter< BaseInserter >

Offset decorator for sparse matrix inserters.

Wraps a base inserter and shifts row/col indices by configurable offsets.

Constructor & Destructor Documentation

◆ shifted_inserter()

template<typename BaseInserter>
template<typename Matrix>
mtl::mat::shifted_inserter< BaseInserter >::shifted_inserter ( Matrix & matrix,
size_type slot_size,
size_type row_offset = 0,
size_type col_offset = 0 )
inline

Construct shifted inserter owning a base inserter.

Parameters
matrixThe sparse matrix to insert into
slot_sizeSlots per row for the base inserter
row_offsetOffset added to row indices
col_offsetOffset added to column indices

Member Function Documentation

◆ get_col_offset()

template<typename BaseInserter>
size_type mtl::mat::shifted_inserter< BaseInserter >::get_col_offset ( ) const
inline

◆ get_row_offset()

template<typename BaseInserter>
size_type mtl::mat::shifted_inserter< BaseInserter >::get_row_offset ( ) const
inline

◆ operator[]()

template<typename BaseInserter>
row_proxy mtl::mat::shifted_inserter< BaseInserter >::operator[] ( size_type row)
inline

◆ set_col_offset()

template<typename BaseInserter>
void mtl::mat::shifted_inserter< BaseInserter >::set_col_offset ( size_type off)
inline

◆ set_row_offset()

template<typename BaseInserter>
void mtl::mat::shifted_inserter< BaseInserter >::set_row_offset ( size_type off)
inline

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