tatami_chunked
Helpers to create custom chunked tatami matrices
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
tatami_chunked::ChunkDimensionStats< Index_ > Struct Template Reference

Statistics for regular chunks along a dimension. More...

#include <ChunkDimensionStats.hpp>

Public Member Functions

 ChunkDimensionStats (Index_ dimension_extent, Index_ chunk_length)
 
 ChunkDimensionStats ()
 

Public Attributes

Index_ dimension_extent
 
Index_ chunk_length
 
Index_ num_chunks
 
Index_ last_chunk_length
 

Detailed Description

template<typename Index_>
struct tatami_chunked::ChunkDimensionStats< Index_ >

Statistics for regular chunks along a dimension.

This class holds useful statistics for contiguous equilength chunks along a dimension. The first chunk starts at position zero. All chunks have the same length, except for (potentially) the last chunk, which may contain fewer elements than the chunk length.

Template Parameters
Index_Integer type for the various dimensions.

Constructor & Destructor Documentation

◆ ChunkDimensionStats() [1/2]

template<typename Index_ >
tatami_chunked::ChunkDimensionStats< Index_ >::ChunkDimensionStats ( Index_  dimension_extent,
Index_  chunk_length 
)
inline
Parameters
dimension_extentFull extent of the dimension.
chunk_lengthLength of each chunk.

◆ ChunkDimensionStats() [2/2]

template<typename Index_ >
tatami_chunked::ChunkDimensionStats< Index_ >::ChunkDimensionStats ( )
inline

Default constructor.

Member Data Documentation

◆ dimension_extent

Extent of the dimension.

◆ chunk_length

Length of the chunks, except for (possibly) the last chunk. See also get_chunk_length().

◆ num_chunks

Number of chunks along this dimension.

◆ last_chunk_length

Length of the last chunk. This may be different from chunk_length if dimension_extent is not a multiple of chunk_length. See also get_chunk_length().


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