Index manager for a container of data arranged on a DIMS-dimension grid. More...
#include <GridContainerIndices.h>
Public Types | |
using | CellIndex_t = typename IndexManager_t::LinIndex_t |
type of index for direct access to the cell More... | |
using | CellIndexOffset_t = std::ptrdiff_t |
type of difference between indices More... | |
using | CellDimIndex_t = CellIndexOffset_t |
type of difference between indices along a dimension More... | |
using | CellID_t = std::array< CellDimIndex_t, dims()> |
type of cell coordinate (x, y, z) More... | |
Public Member Functions | |
size_t | size () const |
Returns the number of cells in the grid. More... | |
Indexing | |
CellIndex_t | operator[] (CellID_t id) const |
Returns the index of the element from its cell coordinates (no check!) More... | |
CellIndexOffset_t | offset (CellID_t const &origin, CellID_t const &cellID) const |
Returns the difference in index of cellID respect to origin. More... | |
Static Public Member Functions | |
static constexpr unsigned int | dims () |
Returns the number of dimensions in this object. More... | |
Public Attributes | |
__pad0__: indices(new_dims.begin()) {} bool has(CellIndexOffset_t index) const { return indices.hasLinIndex(index) | |
Constructor: specifies the size of the container and allocates it. More... | |
Protected Member Functions | |
CellIndex_t | index (CellID_t id) const |
Returns the index of the element from its cell coordinates (no check!) More... | |
Protected Attributes | |
IndexManager_t | indices |
the actual worker More... | |
Private Types | |
using | IndexManager_t = util::TensorIndices< DIMS > |
Index manager for a container of data arranged on a DIMS-dimension grid.
Definition at line 36 of file GridContainerIndices.h.
using util::details::GridContainerIndicesBase< DIMS >::CellDimIndex_t = CellIndexOffset_t |
type of difference between indices along a dimension
Definition at line 50 of file GridContainerIndices.h.
using util::details::GridContainerIndicesBase< DIMS >::CellID_t = std::array<CellDimIndex_t, dims()> |
type of cell coordinate (x, y, z)
Definition at line 53 of file GridContainerIndices.h.
using util::details::GridContainerIndicesBase< DIMS >::CellIndex_t = typename IndexManager_t::LinIndex_t |
type of index for direct access to the cell
Definition at line 44 of file GridContainerIndices.h.
using util::details::GridContainerIndicesBase< DIMS >::CellIndexOffset_t = std::ptrdiff_t |
type of difference between indices
Definition at line 47 of file GridContainerIndices.h.
|
private |
Definition at line 37 of file GridContainerIndices.h.
|
inlinestatic |
Returns the number of dimensions in this object.
Definition at line 41 of file GridContainerIndices.h.
|
inlineprotected |
Returns the index of the element from its cell coordinates (no check!)
Definition at line 89 of file GridContainerIndices.h.
|
inline |
Returns the difference in index of cellID respect to origin.
Definition at line 80 of file GridContainerIndices.h.
|
inline |
Returns the index of the element from its cell coordinates (no check!)
Definition at line 76 of file GridContainerIndices.h.
|
inline |
Returns the number of cells in the grid.
Definition at line 68 of file GridContainerIndices.h.
util::details::GridContainerIndicesBase< DIMS >::__pad0__ |
Constructor: specifies the size of the container and allocates it.
Definition at line 65 of file GridContainerIndices.h.
|
protected |
the actual worker
Definition at line 86 of file GridContainerIndices.h.