tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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()

virtual const Value_ * tatami::MyopicDenseExtractor< Value_, Index_ >::fetch ( Index_  i,
Value_ buffer 
)
pure virtual

buffer may not necessarily be filled upon extraction if a pointer can be returned to the underlying data store. This can be checked by comparing the returned pointer to buffer; if they are the same, buffer has been filled.

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 hold N values.

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