tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tatami::ConsecutiveOracle< Index_ > Class Template Reference

Predict future accesses along a consecutive sequence. More...

#include <ConsecutiveOracle.hpp>

Inheritance diagram for tatami::ConsecutiveOracle< Index_ >:
Inheritance graph
[legend]
Collaboration diagram for tatami::ConsecutiveOracle< Index_ >:
Collaboration graph
[legend]

Public Member Functions

 ConsecutiveOracle (Index_ start, Index_ length)
 
size_t total () const
 
Index_ get (size_t i) const
 

Detailed Description

template<typename Index_>
class tatami::ConsecutiveOracle< Index_ >

Predict future accesses along a consecutive sequence.

Template Parameters
Index_Integer type of the row/column indices.

Constructor & Destructor Documentation

◆ ConsecutiveOracle()

template<typename Index_ >
tatami::ConsecutiveOracle< Index_ >::ConsecutiveOracle ( Index_  start,
Index_  length 
)
inline
Parameters
startStart index of the consecutive sequence on the target dimension.
lengthLength of the sequence.

Member Function Documentation

◆ total()

template<typename Index_ >
size_t tatami::ConsecutiveOracle< Index_ >::total ( ) const
inlinevirtual
Returns
Total number of predictions.

Implements tatami::Oracle< Index_ >.

◆ get()

template<typename Index_ >
Index_ tatami::ConsecutiveOracle< Index_ >::get ( size_t  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: