tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
tatami::MyopicDenseWrapper< Value_, Index_ > Class Template Reference

User-friendly wrapper around a MyopicDenseExtractor. More...

#include <make_Wrapper.hpp>

Public Member Functions

Index_ length () const
 
const Value_ * fetch (Index_ i)
 

Detailed Description

template<typename Value_, typename Index_>
class tatami::MyopicDenseWrapper< Value_, Index_ >

User-friendly wrapper around a MyopicDenseExtractor.

Template Parameters
Value_Numeric type of the matrix value.
Index_Integer type of the row/column indices.

Each instance of this class automatically allocates the buffer to be used in MyopicDenseExtractor::fetch().

Member Function Documentation

◆ length()

template<typename Value_ , typename Index_ >
Index_ tatami::MyopicDenseWrapper< Value_, Index_ >::length ( ) const
inline
Returns
Length of the array extracted by fetch(). This is constant for a given instance of this class.

◆ fetch()

template<typename Value_ , typename Index_ >
const Value_ * tatami::MyopicDenseWrapper< Value_, Index_ >::fetch ( Index_ i)
inline
Parameters
iIndex of the row/column of interest.
Returns
Pointer to an array of length length(), containing the values of the i-th row/column. This is only guaranteed to be valid until the next call to this method.

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