tatami_chunked
Helpers to create custom chunked tatami matrices
Loading...
Searching...
No Matches
tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ > Class Template Referenceabstract

Manager of chunks for a CustomSparseChunkedMatrix. More...

#include <CustomSparseChunkedMatrix.hpp>

Public Member Functions

virtual std::unique_ptr< CustomSparseChunkedMatrixWorkspace< ChunkValue_, Index_ > > new_workspace () const =0
 
std::unique_ptr< CustomSparseChunkedMatrixWorkspace< ChunkValue_, Index_ > > new_workspace_exact () const
 
virtual bool prefer_rows () const =0
 
virtual const ChunkDimensionStats< Index_ > & row_stats () const =0
 
virtual const ChunkDimensionStats< Index_ > & column_stats () const =0
 

Detailed Description

template<typename ChunkValue_, typename Index_>
class tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >

Manager of chunks for a CustomSparseChunkedMatrix.

Template Parameters
ChunkValue_Numeric type of the data values in each chunk.
Index_Integer type of the row/column indices of the CustomSparseChunkedMatrix.

Member Function Documentation

◆ new_workspace()

template<typename ChunkValue_ , typename Index_ >
virtual std::unique_ptr< CustomSparseChunkedMatrixWorkspace< ChunkValue_, Index_ > > tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >::new_workspace ( ) const
pure virtual
Returns
A CustomSparseChunkedMatrixWorkspace instance to unpack each chunk of interest.

◆ new_workspace_exact()

template<typename ChunkValue_ , typename Index_ >
std::unique_ptr< CustomSparseChunkedMatrixWorkspace< ChunkValue_, Index_ > > tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >::new_workspace_exact ( ) const
inline
Returns
A CustomSparseChunkedMatrixWorkspace instance (or any of its subclasses) to unpack each chunk of interest.

This is a non-virtual counterpart to new_workspace() that may optionally be shadowed by a method with the same signature in each subclass. If implemented in a subclass, this should return a pointer to its specific CustomSparseChunkedMatrixWorkspace subclass, rather than to the base class. This provides some devirtualization opportunities within CustomSparseChunkMatrix when Manager_ is hard-coded to a CustomSparseChunkedMatrixManager subclass.

◆ prefer_rows()

template<typename ChunkValue_ , typename Index_ >
virtual bool tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >::prefer_rows ( ) const
pure virtual
Returns
Whether extraction of rows is the preferred access pattern.

◆ row_stats()

template<typename ChunkValue_ , typename Index_ >
virtual const ChunkDimensionStats< Index_ > & tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >::row_stats ( ) const
pure virtual
Returns
Statistics for the rows, i.e., the number of rows in the matrix, the number of rows in each chunk, the number of chunks along all rows.

In all calls to CustomSparseChunkedMatrixManager::extract(), each chunk_row_id will be less than the ChunkDimensionsStats::num_chunks of the return value.

◆ column_stats()

template<typename ChunkValue_ , typename Index_ >
virtual const ChunkDimensionStats< Index_ > & tatami_chunked::CustomSparseChunkedMatrixManager< ChunkValue_, Index_ >::column_stats ( ) const
pure virtual
Returns
Statistics for the columns, i.e., the number of columns in the matrix, the number of columns in each chunk, the number of chunks along all columns.

In all calls to CustomSparseChunkedMatrixManager::extract(), each chunk_column_id will be less than the ChunkDimensionsStats::num_chunks of the return value.


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