tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
tatami::FixedVectorOracle< Index_, Container_ > Class Template Referencefinal

Predict future accesses from a vector containing a fixed sequence. More...

#include <FixedOracle.hpp>

Inheritance diagram for tatami::FixedVectorOracle< Index_, Container_ >:
Collaboration diagram for tatami::FixedVectorOracle< Index_, Container_ >:

Public Member Functions

 FixedVectorOracle (Container_ sequence)
 
PredictionIndex total () const
 
Index_ get (PredictionIndex i) const
 
- Public Member Functions inherited from tatami::Oracle< Index_ >

Detailed Description

template<typename Index_, class Container_ = std::vector<Index_>>
class tatami::FixedVectorOracle< Index_, Container_ >

Predict future accesses from a vector containing a fixed sequence.

Template Parameters
Index_Integer type of the row/column indices.
Pointer_Container of indices. This should support size() and access by [].

Constructor & Destructor Documentation

◆ FixedVectorOracle()

template<typename Index_ , class Container_ = std::vector<Index_>>
tatami::FixedVectorOracle< Index_, Container_ >::FixedVectorOracle ( Container_ sequence)
inline
Parameters
sequenceFixed sequence of indices on the target dimension.

Member Function Documentation

◆ total()

template<typename Index_ , class Container_ = std::vector<Index_>>
PredictionIndex tatami::FixedVectorOracle< Index_, Container_ >::total ( ) const
inlinevirtual
Returns
Total number of predictions.

Implements tatami::Oracle< Index_ >.

◆ get()

template<typename Index_ , class Container_ = std::vector<Index_>>
Index_ tatami::FixedVectorOracle< Index_, Container_ >::get ( PredictionIndex i) const
inlinevirtual
Parameters
iWhich prediction to return.
Returns
The i-th prediction, to be interpreted as an index on the target dimension.

Implements tatami::Oracle< Index_ >.


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