tatami_chunked
Helpers to create custom chunked tatami matrices
|
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 |
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.
Index_ | Integer type for the various dimensions. |
|
inline |
dimension_extent | Full extent of the dimension. |
chunk_length | Length of each chunk. |
|
inline |
Default constructor.
Index_ tatami_chunked::ChunkDimensionStats< Index_ >::dimension_extent |
Extent of the dimension.
Index_ tatami_chunked::ChunkDimensionStats< Index_ >::chunk_length |
Length of the chunks, except for (possibly) the last chunk. See also get_chunk_length()
.
Index_ tatami_chunked::ChunkDimensionStats< Index_ >::num_chunks |
Number of chunks along this dimension.
Index_ tatami_chunked::ChunkDimensionStats< Index_ >::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()
.