tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
tatami::PseudoOracularDenseExtractor< Value_, Index_ > Struct Template Referencefinal

Mimic the OracularDenseExtractor interface. More...

#include <PseudoOracularExtractor.hpp>

Inheritance diagram for tatami::PseudoOracularDenseExtractor< Value_, Index_ >:
Collaboration diagram for tatami::PseudoOracularDenseExtractor< Value_, Index_ >:

Public Member Functions

 PseudoOracularDenseExtractor (std::shared_ptr< const Oracle< Index_ > > oracle, std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > ext)
 
const Value_ * fetch (const Index_, Value_ *const buffer)
 
- Public Member Functions inherited from tatami::OracularDenseExtractor< Value_, Index_ >
const Value_ * next (Value_ *buffer)
 

Detailed Description

template<typename Value_, typename Index_>
struct tatami::PseudoOracularDenseExtractor< Value_, Index_ >

Mimic the OracularDenseExtractor interface.

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

This is used to quickly implement the dense extraction methods for a Matrix subclass that does not benefit from an Oracle. Specifically, the oracle is used to generate a prediction that is passed to an oracle-unaware MyopicDenseExtractor. This allows Matrix subclasses to satisfy the dense oracle-aware extraction interface.

Constructor & Destructor Documentation

◆ PseudoOracularDenseExtractor()

template<typename Value_ , typename Index_ >
tatami::PseudoOracularDenseExtractor< Value_, Index_ >::PseudoOracularDenseExtractor ( std::shared_ptr< const Oracle< Index_ > > oracle,
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > ext )
inline
Parameters
oracleThe oracle.
extA dense extractor to extract dimension elements according to ora.

Member Function Documentation

◆ fetch()

template<typename Value_ , typename Index_ >
const Value_ * tatami::PseudoOracularDenseExtractor< Value_, Index_ >::fetch ( const Index_ i,
Value_ *const buffer )
inlinevirtual

This method is intended for subclass developers only. It has the same signature as MyopicDenseExtractor::fetch(), which makes it easier to define MyopicDenseExtractor and OracularDenseExtractor subclasses from a single template class. Implementations of this method are expected to ignore i. Most users should just use next() instead.

Parameters
iIgnored, only provided for consistency with MyopicDenseExtractor::fetch(),
[out]bufferPointer to an array of length no less than N, where N is defined as described for MyopicDenseExtractor::fetch().
Returns
Pointer to an array containing the contents of the next dimension element, see next() for more details.

Implements tatami::OracularDenseExtractor< Value_, Index_ >.


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