LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Index manager for a container of data arranged on a >=2-dim 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 | |
Grid structure | |
bool | hasY (typename Base_t::CellDimIndex_t index) const |
Returns whether the specified y index is valid. More... | |
size_t | sizeY () const |
Returns the number of cells on the y axis of the grid. More... | |
Grid structure | |
bool | hasX (typename Base_t::CellDimIndex_t index) const |
Returns whether the specified x index is valid. More... | |
size_t | sizeX () const |
Returns the number of cells on the x axis of the grid. More... | |
Grid structure | |
bool | has (CellIndexOffset_t index) const |
Returns whether the specified index is valid. More... | |
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... | |
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 | Base_t = GridContainerIndicesBase1D< DIMS > |
Index manager for a container of data arranged on a >=2-dim grid.
Definition at line 120 of file GridContainerIndices.h.
|
private |
Definition at line 123 of file GridContainerIndices.h.
|
inherited |
type of difference between indices along a dimension
Definition at line 48 of file GridContainerIndices.h.
|
inherited |
type of cell coordinate (x, y, z)
Definition at line 51 of file GridContainerIndices.h.
|
inherited |
type of index for direct access to the cell
Definition at line 42 of file GridContainerIndices.h.
|
inherited |
type of difference between indices
Definition at line 45 of file GridContainerIndices.h.
|
inlinestaticinherited |
Returns the number of dimensions in this object.
Definition at line 39 of file GridContainerIndices.h.
|
inlineinherited |
Returns whether the specified index is valid.
Definition at line 62 of file GridContainerIndices.h.
References util::TensorIndices< RANK >::hasLinIndex(), and util::details::GridContainerIndicesBase< DIMS >::indices.
|
inlineinherited |
Returns whether the specified x index is valid.
Definition at line 106 of file GridContainerIndices.h.
References util::details::GridContainerIndicesBase< DIMS >::index(), and geo::vect::indices().
|
inline |
Returns whether the specified y index is valid.
Definition at line 132 of file GridContainerIndices.h.
References util::details::GridContainerIndicesBase< DIMS >::index(), and geo::vect::indices().
|
inlineprotectedinherited |
Returns the index of the element from its cell coordinates (no check!)
Definition at line 87 of file GridContainerIndices.h.
References util::begin(), and util::details::GridContainerIndicesBase< DIMS >::indices.
Referenced by util::GridContainerIndicesBase1D< DIMS >::hasX(), util::GridContainerIndicesBase2D< DIMS >::hasY(), util::GridContainerIndicesBase3D< DIMS >::hasZ(), util::details::GridContainerIndicesBase< DIMS >::offset(), and util::details::GridContainerIndicesBase< DIMS >::operator[]().
|
inlineinherited |
Returns the difference in index of cellID respect to origin.
Definition at line 76 of file GridContainerIndices.h.
References util::details::GridContainerIndicesBase< DIMS >::index().
|
inlineinherited |
Returns the index of the element from its cell coordinates (no check!)
Definition at line 73 of file GridContainerIndices.h.
References util::details::GridContainerIndicesBase< DIMS >::index().
|
inlineinherited |
Returns the number of cells in the grid.
Definition at line 65 of file GridContainerIndices.h.
References util::details::GridContainerIndicesBase< DIMS >::indices, and util::TensorIndices< RANK >::size().
|
inlineinherited |
Returns the number of cells on the x axis of the grid.
Definition at line 112 of file GridContainerIndices.h.
References geo::vect::indices().
|
inline |
Returns the number of cells on the y axis of the grid.
Definition at line 138 of file GridContainerIndices.h.
References geo::vect::indices().
|
protectedinherited |
the actual worker
Definition at line 84 of file GridContainerIndices.h.
Referenced by util::details::GridContainerIndicesBase< DIMS >::has(), util::details::GridContainerIndicesBase< DIMS >::index(), and util::details::GridContainerIndicesBase< DIMS >::size().