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


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_ * | fetch (Value_ *buffer) |
Mimic the OracularDenseExtractor interface.
| 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.
|
inline |
| oracle | The oracle. |
| ext | A dense extractor to extract dimension elements according to ora. |
|
inlinevirtual |
This overload is intended for developers only. It introduces the i argument so that the signature is the same as that of MyopicDenseExtractor::fetch(). This makes it easier to define MyopicDenseExtractor and OracularDenseExtractor subclasses from a single template, avoiding code duplication that would otherwise occur when defining methods with and without i. Of course, implementations are expected to ignore i in oracle-aware extraction.
Other than the extra i argument, all other behaviors of the two overloads are the same. To avoid confusion, most users should just use the fetch() overload that does not accept i, given that the value of i is never actually used.
| i | Ignored, only provided for consistency with MyopicDenseExtractor::fetch(), | |
| [out] | buffer | Pointer to an array of length no less than N, where N is defined as described for MyopicDenseExtractor::fetch(). |
Oracle used to construct this instance. This is guaranteed to have N values. Implements tatami::OracularDenseExtractor< Value_, Index_ >.