|
tatami
C++ API for different matrix representations
|
Mimic the OracularSparseExtractor interface.
More...
#include <PseudoOracularExtractor.hpp>


Public Member Functions | |
| PseudoOracularSparseExtractor (std::shared_ptr< const Oracle< Index_ > > oracle, std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > ext) | |
| SparseRange< Value_, Index_ > | fetch (const Index_, Value_ *const value_buffer, Index_ *const index_buffer) |
Public Member Functions inherited from tatami::OracularSparseExtractor< Value_, Index_ > | |
| SparseRange< Value_, Index_ > | next (Value_ *value_buffer, Index_ *index_buffer) |
Mimic the OracularSparseExtractor interface.
| Value_ | Data value type, should be numeric. |
| Index_ | Row/column index type, should be integer. |
This is used to quickly implement the sparse 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 MyopicSparseExtractor. This allows Matrix subclasses to satisfy the sparse oracle-aware extraction interface without much effort.
|
inline |
| oracle | The oracle. |
| ext | A sparse extractor to extract dimension elements according to ora. |
|
inlinevirtual |
This method is intended for subclass developers only. It has the same signature as MyopicSparseExtractor::fetch(), which makes it easier to define MyopicSparseExtractor and OracularSparseExtractor subclasses from a single template class. Implementations of this method are expected to ignore i. Most users should just use next() instead.
| i | Ignored, only provided for consistency with MyopicSparseExtractor::fetch(). | |
| [out] | value_buffer | Pointer to an array with enough space for at least N values, where N is defined as described for MyopicDenseExtractor::fetch(). |
| [out] | index_buffer | Pointer to an array with enough space for at least N indices, where N is defined as described for MyopicDenseExtractor::fetch(). |
SparseRange object describing the contents of the next dimension element, see next() for details. Implements tatami::OracularSparseExtractor< Value_, Index_ >.