|
tatami
C++ API for different matrix representations
|
Extract an element of the target dimension in dense form with an oracle. More...
#include <Extractor.hpp>

Public Member Functions | |
| const Value_ * | next (Value_ *buffer) |
| virtual const Value_ * | fetch (Index_ i, Value_ *buffer)=0 |
Extract an element of the target dimension in dense form with an oracle.
| Value_ | Data value type, should be numeric. |
| Index_ | Row/column index type, should be integer. |
|
inline |
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.
| [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 be filled with N values.buffer, this means that buffer has been filled with the contents of the i-th dimension element.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 OracularDenseExtractor. Similarly, the contents should not change for the lifetime of the Matrix. In this situation, no guarantees are provided for the contents of buffer.
|
pure virtual |
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.
| 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(). |
next() for more details. Implemented in tatami::PseudoOracularDenseExtractor< Value_, Index_ >.