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

Extract an element of the target dimension in dense form without an oracle. More...

#include <Extractor.hpp>

Public Member Functions

virtual const Value_ * fetch (Index_ i, Value_ *buffer)=0
 

Detailed Description

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

Extract an element of the target dimension in dense form without an oracle.

Template Parameters
Value_Data value type, should be numeric.
Index_Row/column index type, should be integer.

Member Function Documentation

◆ fetch()

template<typename Value_ , typename Index_ >
virtual const Value_ * tatami::MyopicDenseExtractor< Value_, Index_ >::fetch ( Index_ i,
Value_ * buffer )
pure virtual
Parameters
iIndex of the target dimension element, i.e., the row or column index.
[out]bufferPointer to an array of length no less than N, where N is defined as:
  • the number of columns, when extracting each row.
  • the number of rows, when extracting each column.
  • the block length, when extracting a contiguous block from each row/column.
  • the number of indices, when extracting an indexed subset of each row/column.
Returns
Pointer to an array containing the values from the i-th dimension element. This is guaranteed to be filled with N values.

If the returned pointer is equal to buffer, this means that buffer has been filled with the contents of the i-th dimension element.

If the returned pointer is not equal to buffer, it should refer to another array of length N. This array should be valid for the lifetime of the Matrix object used to construct this MyopicDenseExtractor. Similarly, the contents should not change for the lifetime of the Matrix. In this situation, no guarantees are provided for the contents of buffer.


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