|
ACTS
Experiment-independent tracking
|
Type-safe view into a grid with mutable access. More...
#include <Acts/Utilities/AnyGridView.hpp>
Public Types | |
| using | AnyIndexType = IGrid::AnyIndexType |
| Type for indices, imported from IGrid. | |
| using | AnyPointType = IGrid::AnyPointType |
| Type for points, imported from IGrid. | |
| using | GridPointerType = IGrid* |
| Type of pointer to grid, const or non-const depending on isConst. | |
Public Member Functions | |
| AnyGridView (AnyGridView &&) noexcept=default | |
| Move constructor. | |
| AnyGridView (const AnyGridView &other)=default | |
| Copy constructor. | |
| template<typename... Axes> | |
| AnyGridView (Grid< T, Axes... > &grid) | |
| Constructor from non-const concrete Grid reference. | |
| AnyGridView (IGrid &grid) | |
| Constructor from non-const IGrid reference. | |
| T & | atLocalBins (const AnyIndexType &indices) |
| Access value at given local bin indices with mutable access. | |
| const T & | atLocalBins (const AnyIndexType &indices) const |
| Access value at given local bin indices with const access. | |
| AnyPointType | binCenter (const IGrid::AnyIndexType &indices) const |
| Get the center position of a bin for given indices. | |
| void | checkType () |
| Check if the grid's value type matches the template parameter T. | |
| std::size_t | dimensions () const |
| Get the number of dimensions of the grid. | |
| AnyPointType | lowerLeftBinEdge (const IGrid::AnyIndexType &indices) const |
| Get the lower left edge position of a bin for given indices. | |
| AnyIndexType | numLocalBins () const |
| Get the number of bins along each axis. | |
| AnyGridView & | operator= (AnyGridView &&) noexcept=default |
| Move assignment operator. | |
| AnyGridView & | operator= (const AnyGridView &other)=default |
| Copy assignment operator. | |
| AnyPointType | upperRightBinEdge (const IGrid::AnyIndexType &indices) const |
| Get the upper right edge position of a bin for given indices. | |
Public Attributes | |
| GridPointerType | m_grid |
| Type-erased pointer to the underlying grid. | |
Type-safe view into a grid with mutable access.
| T | Type of values stored in the grid |
This class provides a type-safe interface to access grid objects through the type-erased IGrid interface with mutable access. It ensures that the grid being viewed contains values of the expected type T.
Example usage:
| using Acts::AnyGridView< T >::AnyIndexType = IGrid::AnyIndexType |
Type for indices, imported from IGrid.
| using Acts::AnyGridView< T >::AnyPointType = IGrid::AnyPointType |
Type for points, imported from IGrid.
| using Acts::AnyGridView< T >::GridPointerType = IGrid* |
Type of pointer to grid, const or non-const depending on isConst.
|
explicit |
Constructor from non-const IGrid reference.
| grid | The grid to view |
|
explicit |
Constructor from non-const concrete Grid reference.
| Axes | Parameter pack of axis types defining the grid |
| grid | The concrete grid to view |
|
default |
Copy constructor.
| other | The AnyGridView to copy from |
|
defaultnoexcept |
Move constructor.
| T & Acts::AnyGridView< T >::atLocalBins | ( | const AnyIndexType & | indices | ) |
Access value at given local bin indices with mutable access.
| indices | The local bin indices |
| std::invalid_argument | if indices size doesn't match grid dimensions |
| std::out_of_range | if indices are out of bounds |
| const T & Acts::AnyGridView< T >::atLocalBins | ( | const AnyIndexType & | indices | ) | const |
Access value at given local bin indices with const access.
| indices | The local bin indices |
| std::invalid_argument | if indices size doesn't match grid dimensions |
| std::out_of_range | if indices are out of bounds |
| AnyPointType Acts::AnyGridView< T >::binCenter | ( | const IGrid::AnyIndexType & | indices | ) | const |
Get the center position of a bin for given indices.
| indices | The local bin indices |
| void Acts::AnyGridView< T >::checkType | ( | ) |
Check if the grid's value type matches the template parameter T.
| std::invalid_argument | if there's a type mismatch |
| std::size_t Acts::AnyGridView< T >::dimensions | ( | ) | const |
Get the number of dimensions of the grid.
| AnyPointType Acts::AnyGridView< T >::lowerLeftBinEdge | ( | const IGrid::AnyIndexType & | indices | ) | const |
Get the lower left edge position of a bin for given indices.
| indices | The local bin indices |
| AnyIndexType Acts::AnyGridView< T >::numLocalBins | ( | ) | const |
Get the number of bins along each axis.
|
defaultnoexcept |
Move assignment operator.
|
default |
Copy assignment operator.
| other | The AnyGridView to copy from |
| AnyPointType Acts::AnyGridView< T >::upperRightBinEdge | ( | const IGrid::AnyIndexType & | indices | ) | const |
Get the upper right edge position of a bin for given indices.
| indices | The local bin indices |
| GridPointerType Acts::AnyGridView< T >::m_grid |
Type-erased pointer to the underlying grid.