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

Predict future accesses from a view on a fixed sequence. More...

#include <FixedOracle.hpp>

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

Public Member Functions

 FixedViewOracle (const Index_ *ptr, size_t number)
 
size_t total () const
 
Index_ get (size_t i) const
 

Detailed Description

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

Predict future accesses from a view on a fixed sequence.

Template Parameters
Index_Integer type of the row/column indices.

Constructor & Destructor Documentation

◆ FixedViewOracle()

template<typename Index_ >
tatami::FixedViewOracle< Index_ >::FixedViewOracle ( const Index_ ptr,
size_t  number 
)
inline
Parameters
ptrPointer to a constant array of indices on the target dimension. The underlying array should be valid for the lifetime of this FixedViewOracle instance.
numberLength of the array at ptr.

Member Function Documentation

◆ total()

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

Implements tatami::Oracle< Index_ >.

◆ get()

template<typename Index_ >
Index_ tatami::FixedViewOracle< 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: