ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Grid< T, Axes > Class Template Referencefinal

class for describing a regular multi-dimensional grid More...

#include <Acts/Utilities/Grid.hpp>

Inheritance diagram for Acts::Grid< T, Axes >:
[legend]
Collaboration diagram for Acts::Grid< T, Axes >:
[legend]

Public Types

using const_reference = const value_type&
 constant reference type to values stored
using global_iterator_t = GridGlobalIterator<T, Axes...>
 global iterator type
using index_t = std::array<std::size_t, DIM>
 index type using local bin indices along each axis
using local_iterator_t = GridLocalIterator<T, Axes...>
 local iterator type
using point_t = std::array<double, DIM>
 type for points in d-dimensional grid space
using reference = value_type&
 reference type to values stored
using value_type = T
 type of values stored
using AnyIndexType = boost::container::small_vector<std::size_t, 3>
 Type-erased interface to access the contents of the grid.
using AnyPointType = boost::container::small_vector<double, 3>
 Type alias for dynamic point type (coordinates as vector of doubles).

Public Member Functions

 Grid (Axes &&... axes)
 constructor from parameters pack of axes
 Grid (const Axes &... axes)
 constructor from parameters pack of axes
 Grid (const std::tuple< Axes... > &axes)
 Constructor from const axis tuple, this will allow creating a grid with a different value type from a template grid object.
 Grid (std::tuple< Axes... > &&axes)
 Move constructor from axis tuple.
 Grid (TypeTag< T >, Axes &&... axes)
 constructor from parameters pack of axes and type tag
 Grid (TypeTag< T >, const Axes &... axes)
 constructor from parameters pack of axes and type tag
reference at (std::size_t bin)
 access value stored in bin with given global bin number
const_reference at (std::size_t bin) const
 access value stored in bin with given global bin number
reference atLocalBins (const index_t &localBins)
 access value stored in bin with given local bin numbers
const_reference atLocalBins (const index_t &localBins) const
 access value stored in bin with given local bin numbers
std::any atLocalBinsAny (AnyIndexType indices) const override
 Get the value of a bin for a given set of indices.
std::any atLocalBinsAny (AnyIndexType indices) override
 Get the value of a bin for a given set of indices.
template<class Point>
reference atPosition (const Point &point)
 access value stored in bin for a given point
template<class Point>
const_reference atPosition (const Point &point) const
 access value stored in bin for a given point
boost::container::small_vector< const IAxis *, 3 > axes () const override
 get the axes as an array of IAxis pointers
const std::tuple< Axes... > & axesTuple () const
 get the axes as a tuple
global_iterator_t begin () const
 begin iterator for global bins
local_iterator_t begin (const std::array< std::vector< std::size_t >, DIM > &navigator) const
 begin iterator for local bins
point_t binCenter (const index_t &localBins) const
 get center position of bin with given local bin numbers
AnyPointType binCenterAny (AnyIndexType indices) const override
 Get the center of a bin for a given set of indices.
point_t binWidth () const
 get bin width along each specific axis
template<class Point>
detail::GlobalNeighborHoodIndices< DIMclosestPointsIndices (const Point &position) const
 get global bin indices for closest points on grid
template<typename converter_t>
Grid< typename converter_t::value_type, Axes... > convertGrid (converter_t &cVisitor) const
 Convenience function to convert the type of the grid to hold another object type.
template<typename U>
Grid< U, Axes... > convertType () const
 Convenience function to convert the type of the grid to hold another object type.
std::size_t dimensions () const override
 dimensionality of grid
global_iterator_t end () const
 end iterator for global bins
local_iterator_t end (const std::array< std::vector< std::size_t >, DIM > &navigator) const
 end iterator for local bins
template<class Point>
std::size_t globalBinFromFromLowerLeftEdge (const Point &point) const
 determine global bin index of the bin with the lower left edge closest to the given point for each axis
std::size_t globalBinFromLocalBins (const index_t &localBins) const
 determine global bin index from local bin indices along each axis
template<class Point>
std::size_t globalBinFromPosition (const Point &point) const
 determine global index for bin containing the given point
template<class Point>
requires (Concepts::interpolatable<T, Point, std::array<double, DIM>, std::array<double, DIM>>)
interpolate (const Point &point) const
 interpolate grid values to given position
template<class Point>
bool isInside (const Point &position) const
 check whether given point is inside grid limits
index_t localBinsFromGlobalBin (std::size_t bin) const
 determine local bin index for each axis from global bin index
template<class Point>
index_t localBinsFromLowerLeftEdge (const Point &point) const
 determine local bin index of the bin with the lower left edge closest to the given point for each axis
template<class Point>
index_t localBinsFromPosition (const Point &point) const
 determine local bin index for each axis from the given point
point_t lowerLeftBinEdge (const index_t &localBins) const
 retrieve lower-left bin edge from set of local bin indices
AnyPointType lowerLeftBinEdgeAny (AnyIndexType indices) const override
 Get the lower left edge of a bin for a given set of indices.
point_t maxPosition () const
 get the maximum value of all axes of one grid
point_t minPosition () const
 get the minimum value of all axes of one grid
detail::GlobalNeighborHoodIndices< DIMneighborHoodIndices (const index_t &localBins, std::array< std::pair< int, int >, DIM > &sizePerAxis) const
 get global bin indices for neighborhood
detail::GlobalNeighborHoodIndices< DIMneighborHoodIndices (const index_t &localBins, std::size_t size=1u) const
 get global bin indices for neighborhood
index_t numLocalBins () const
 get number of bins along each specific axis
AnyIndexType numLocalBinsAny () const override
 Get the number of local bins for a given set of indices.
void setExteriorBins (const value_type &value)
 set all overflow and underflow bins to a certain value
std::size_t size (bool fullCounter=true) const
 total number of bins
point_t upperRightBinEdge (const index_t &localBins) const
 retrieve upper-right bin edge from set of local bin indices
AnyPointType upperRightBinEdgeAny (AnyIndexType indices) const override
 Get the upper right edge of a bin for a given set of indices.
const std::type_info & valueType () const override
 Get the type of the values stored in the grid.
Public Member Functions inherited from Acts::IGrid
virtual ~IGrid ()=default

Static Public Attributes

static constexpr std::size_t DIM = sizeof...(Axes)
 number of dimensions of the grid

Protected Member Functions

void toStream (std::ostream &os) const override

Detailed Description

template<typename T, class... Axes>
requires (std::is_default_constructible_v<T> && !std::is_same_v<T, bool>)
class Acts::Grid< T, Axes >

class for describing a regular multi-dimensional grid

Template Parameters
Ttype of values stored inside the bins of the grid
Axesparameter pack of axis types defining the grid

Class describing a multi-dimensional, regular grid which can store objects in its multi-dimensional bins. Bins are hyper-boxes and can be accessed either by global bin index, local bin indices or position.

Note
T must be default-constructible.
T must not be bool, because std::vector<bool> is special and does not return references to its elements.

Member Typedef Documentation

◆ const_reference

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::const_reference = const value_type&

constant reference type to values stored

◆ global_iterator_t

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::global_iterator_t = GridGlobalIterator<T, Axes...>

global iterator type

◆ index_t

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::index_t = std::array<std::size_t, DIM>

index type using local bin indices along each axis

◆ local_iterator_t

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::local_iterator_t = GridLocalIterator<T, Axes...>

local iterator type

◆ point_t

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::point_t = std::array<double, DIM>

type for points in d-dimensional grid space

◆ reference

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::reference = value_type&

reference type to values stored

◆ value_type

template<typename T, class... Axes>
using Acts::Grid< T, Axes >::value_type = T

type of values stored

Constructor & Destructor Documentation

◆ Grid() [1/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( const std::tuple< Axes... > & axes)
explicit

Constructor from const axis tuple, this will allow creating a grid with a different value type from a template grid object.

Parameters
axes

◆ Grid() [2/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( std::tuple< Axes... > && axes)
explicit

Move constructor from axis tuple.

Parameters
axes

◆ Grid() [3/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( Axes &&... axes)
explicit

constructor from parameters pack of axes

Parameters
axes

◆ Grid() [4/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( const Axes &... axes)
explicit

constructor from parameters pack of axes

Parameters
axes

◆ Grid() [5/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( TypeTag< T > ,
Axes &&... axes )
explicit

constructor from parameters pack of axes and type tag

Parameters
axes

◆ Grid() [6/6]

template<typename T, class... Axes>
Acts::Grid< T, Axes >::Grid ( TypeTag< T > ,
const Axes &... axes )
explicit

constructor from parameters pack of axes and type tag

Parameters
axes

Member Function Documentation

◆ at() [1/2]

template<typename T, class... Axes>
reference Acts::Grid< T, Axes >::at ( std::size_t bin)

access value stored in bin with given global bin number

Parameters
[in]binglobal bin number
Returns
reference to value stored in bin containing the given point

◆ at() [2/2]

template<typename T, class... Axes>
const_reference Acts::Grid< T, Axes >::at ( std::size_t bin) const

access value stored in bin with given global bin number

Parameters
[in]binglobal bin number
Returns
const-reference to value stored in bin containing the given point

◆ atLocalBins() [1/2]

template<typename T, class... Axes>
reference Acts::Grid< T, Axes >::atLocalBins ( const index_t & localBins)

access value stored in bin with given local bin numbers

Parameters
[in]localBinslocal bin indices along each axis
Returns
reference to value stored in bin containing the given point
Precondition
All local bin indices must be a valid index for the corresponding axis (including the under-/overflow bin for this axis).

◆ atLocalBins() [2/2]

template<typename T, class... Axes>
const_reference Acts::Grid< T, Axes >::atLocalBins ( const index_t & localBins) const

access value stored in bin with given local bin numbers

Parameters
[in]localBinslocal bin indices along each axis
Returns
const-reference to value stored in bin containing the given point
Precondition
All local bin indices must be a valid index for the corresponding axis (including the under-/overflow bin for this axis).

◆ atLocalBinsAny() [1/2]

template<typename T, class... Axes>
std::any Acts::Grid< T, Axes >::atLocalBinsAny ( AnyIndexType indices) const
overridevirtual

Get the value of a bin for a given set of indices.

Parameters
indicesThe indices to get the value of the bin for
Returns
The value of the bin: the std::any contains a const pointer to the value

Implements Acts::IGrid.

◆ atLocalBinsAny() [2/2]

template<typename T, class... Axes>
std::any Acts::Grid< T, Axes >::atLocalBinsAny ( AnyIndexType indices)
overridevirtual

Get the value of a bin for a given set of indices.

Parameters
indicesThe indices to get the value of the bin for
Returns
The value of the bin: the std::any contains a const pointer to the value

Implements Acts::IGrid.

◆ atPosition() [1/2]

template<typename T, class... Axes>
template<class Point>
reference Acts::Grid< T, Axes >::atPosition ( const Point & point)

access value stored in bin for a given point

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint used to look up the corresponding bin in the grid
Returns
reference to value stored in bin containing the given point
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
The look-up considers under-/overflow bins along each axis. Therefore, the look-up will never fail.

◆ atPosition() [2/2]

template<typename T, class... Axes>
template<class Point>
const_reference Acts::Grid< T, Axes >::atPosition ( const Point & point) const

access value stored in bin for a given point

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint used to look up the corresponding bin in the grid
Returns
const-reference to value stored in bin containing the given point
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
The look-up considers under-/overflow bins along each axis. Therefore, the look-up will never fail.

◆ axes()

template<typename T, class... Axes>
boost::container::small_vector< const IAxis *, 3 > Acts::Grid< T, Axes >::axes ( ) const
overridevirtual

get the axes as an array of IAxis pointers

Returns
Vector containing pointers to all grid axes

Implements Acts::IGrid.

◆ axesTuple()

template<typename T, class... Axes>
const std::tuple< Axes... > & Acts::Grid< T, Axes >::axesTuple ( ) const

get the axes as a tuple

Returns
Reference to the tuple containing all grid axes

◆ begin() [1/2]

template<typename T, class... Axes>
global_iterator_t Acts::Grid< T, Axes >::begin ( ) const

begin iterator for global bins

Returns
Iterator pointing to the first global bin

◆ begin() [2/2]

template<typename T, class... Axes>
local_iterator_t Acts::Grid< T, Axes >::begin ( const std::array< std::vector< std::size_t >, DIM > & navigator) const

begin iterator for local bins

Parameters
navigatoris local navigator for the grid
Returns
Iterator pointing to the first local bin

◆ binCenter()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::binCenter ( const index_t & localBins) const

get center position of bin with given local bin numbers

Parameters
[in]localBinslocal bin indices along each axis
Returns
center position of bin
Precondition
All local bin indices must be a valid index for the corresponding axis (excluding the under-/overflow bins for each axis).

◆ binCenterAny()

template<typename T, class... Axes>
AnyPointType Acts::Grid< T, Axes >::binCenterAny ( AnyIndexType indices) const
overridevirtual

Get the center of a bin for a given set of indices.

Parameters
indicesThe indices to get the center of the bin for
Returns
The center of the bin

Implements Acts::IGrid.

◆ binWidth()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::binWidth ( ) const

get bin width along each specific axis

Returns
array giving the bin width alonf all axes

◆ closestPointsIndices()

template<typename T, class... Axes>
template<class Point>
detail::GlobalNeighborHoodIndices< DIM > Acts::Grid< T, Axes >::closestPointsIndices ( const Point & position) const

get global bin indices for closest points on grid

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]positionpoint of interest
Returns
Iterable thatemits the indices of bins whose lower-left corners are the closest points on the grid to the input.
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid. It must lie within the grid range (i.e. not within a under-/overflow bin).

◆ convertGrid()

template<typename T, class... Axes>
template<typename converter_t>
Grid< typename converter_t::value_type, Axes... > Acts::Grid< T, Axes >::convertGrid ( converter_t & cVisitor) const

Convenience function to convert the type of the grid to hold another object type.

Template Parameters
converter_tthe converter type

This is designed to be most flexible with a converter object as a visitor. If needed, such a visitor could also use caching or other techniques to speed up the conversion.

Parameters
cVisitorthe converter object as visitor
Returns
a new grid with the same axes and a different value type

◆ convertType()

template<typename T, class... Axes>
template<typename U>
Grid< U, Axes... > Acts::Grid< T, Axes >::convertType ( ) const

Convenience function to convert the type of the grid to hold another object type.

Template Parameters
Uthe new grid value type
Returns
a new grid with the same axes and a different value type

◆ dimensions()

template<typename T, class... Axes>
std::size_t Acts::Grid< T, Axes >::dimensions ( ) const
overridevirtual

dimensionality of grid

Returns
number of axes spanning the grid

Implements Acts::IGrid.

◆ end() [1/2]

template<typename T, class... Axes>
global_iterator_t Acts::Grid< T, Axes >::end ( ) const

end iterator for global bins

Returns
Iterator pointing one past the last global bin

◆ end() [2/2]

template<typename T, class... Axes>
local_iterator_t Acts::Grid< T, Axes >::end ( const std::array< std::vector< std::size_t >, DIM > & navigator) const

end iterator for local bins

Parameters
navigatoris local navigator for the grid
Returns
Iterator pointing one past the last local bin

◆ globalBinFromFromLowerLeftEdge()

template<typename T, class... Axes>
template<class Point>
std::size_t Acts::Grid< T, Axes >::globalBinFromFromLowerLeftEdge ( const Point & point) const

determine global bin index of the bin with the lower left edge closest to the given point for each axis

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint to look up in the grid
Returns
global index for bin containing the given point
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
This could be a under-/overflow bin along one or more axes.

◆ globalBinFromLocalBins()

template<typename T, class... Axes>
std::size_t Acts::Grid< T, Axes >::globalBinFromLocalBins ( const index_t & localBins) const

determine global bin index from local bin indices along each axis

Parameters
[in]localBinslocal bin indices along each axis
Returns
global index for bin defined by the local bin indices
Precondition
All local bin indices must be a valid index for the corresponding axis (including the under-/overflow bin for this axis).

◆ globalBinFromPosition()

template<typename T, class... Axes>
template<class Point>
std::size_t Acts::Grid< T, Axes >::globalBinFromPosition ( const Point & point) const

determine global index for bin containing the given point

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint to look up in the grid
Returns
global index for bin containing the given point
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
This could be a under-/overflow bin along one or more axes.

◆ interpolate()

template<typename T, class... Axes>
template<class Point>
requires (Concepts::interpolatable<T, Point, std::array<double, DIM>, std::array<double, DIM>>)
T Acts::Grid< T, Axes >::interpolate ( const Point & point) const

interpolate grid values to given position

Template Parameters
Pointtype specifying geometric positions
Udummy template parameter identical to T
Parameters
[in]pointlocation to which to interpolate grid values. The position must be within the grid dimensions and not lie in an under-/overflow bin along any axis.
Returns
interpolated value at given position
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
This function is available only if the following conditions are fulfilled:
  • Given U and V of value type T as well as two double a and b, then the following must be a valid expression a * U + b
  • V yielding an object which is (implicitly) convertible to T.
  • Point must represent a d-dimensional position and support coordinate access using operator[] which should return a double (or a value which is implicitly convertible). Coordinate indices must start at 0.
Bin values are interpreted as being the field values at the lower-left corner of the corresponding hyper-box.

◆ isInside()

template<typename T, class... Axes>
template<class Point>
bool Acts::Grid< T, Axes >::isInside ( const Point & position) const

check whether given point is inside grid limits

Parameters
positionPoint to check for inclusion within grid boundaries
Returns
true if \(\text{xmin_i} \le x_i < \text{xmax}_i \forall i=0, \dots, d-1\), otherwise false
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Postcondition
If true is returned, the global bin containing the given point is a valid bin, i.e. it is neither a underflow nor an overflow bin along any axis.

◆ localBinsFromGlobalBin()

template<typename T, class... Axes>
index_t Acts::Grid< T, Axes >::localBinsFromGlobalBin ( std::size_t bin) const

determine local bin index for each axis from global bin index

Parameters
[in]binglobal bin index
Returns
array with local bin indices along each axis (in same order as given axes object)
Note
Local bin indices can contain under-/overflow bins along the corresponding axis.

◆ localBinsFromLowerLeftEdge()

template<typename T, class... Axes>
template<class Point>
index_t Acts::Grid< T, Axes >::localBinsFromLowerLeftEdge ( const Point & point) const

determine local bin index of the bin with the lower left edge closest to the given point for each axis

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint to look up in the grid
Returns
array with local bin indices along each axis (in same order as given axes object)
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
This could be a under-/overflow bin along one or more axes.

◆ localBinsFromPosition()

template<typename T, class... Axes>
template<class Point>
index_t Acts::Grid< T, Axes >::localBinsFromPosition ( const Point & point) const

determine local bin index for each axis from the given point

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Parameters
[in]pointpoint to look up in the grid
Returns
array with local bin indices along each axis (in same order as given axes object)
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is dimensionality of the grid.
Note
This could be a under-/overflow bin along one or more axes.

◆ lowerLeftBinEdge()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::lowerLeftBinEdge ( const index_t & localBins) const

retrieve lower-left bin edge from set of local bin indices

Parameters
[in]localBinslocal bin indices along each axis
Returns
generalized lower-left bin edge position
Precondition
localBins must only contain valid bin indices (excluding underflow bins).

◆ lowerLeftBinEdgeAny()

template<typename T, class... Axes>
AnyPointType Acts::Grid< T, Axes >::lowerLeftBinEdgeAny ( AnyIndexType indices) const
overridevirtual

Get the lower left edge of a bin for a given set of indices.

Parameters
indicesThe indices to get the lower left edge of the bin for
Returns
The lower left edge of the bin

Implements Acts::IGrid.

◆ maxPosition()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::maxPosition ( ) const

get the maximum value of all axes of one grid

Returns
array returning the maxima of all given axes

◆ minPosition()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::minPosition ( ) const

get the minimum value of all axes of one grid

Returns
array returning the minima of all given axes

◆ neighborHoodIndices() [1/2]

template<typename T, class... Axes>
detail::GlobalNeighborHoodIndices< DIM > Acts::Grid< T, Axes >::neighborHoodIndices ( const index_t & localBins,
std::array< std::pair< int, int >, DIM > & sizePerAxis ) const

get global bin indices for neighborhood

Parameters
[in]localBinscenter bin defined by local bin indices along each axis. If size is negative, center bin is not returned.
[in]sizePerAxissize of neighborhood for each axis, how many adjacent bins along each axis are considered
Returns
set of global bin indices for all bins in neighborhood
Note
Over-/underflow bins are included in the neighborhood.
The size parameter sets the range by how many units each local bin index is allowed to be varied. All local bin indices are varied independently, that is diagonal neighbors are included. Ignoring the truncation of the neighborhood size reaching beyond over-/underflow bins, the neighborhood is of size \(2 \times \text{size}+1\) along each dimension.

◆ neighborHoodIndices() [2/2]

template<typename T, class... Axes>
detail::GlobalNeighborHoodIndices< DIM > Acts::Grid< T, Axes >::neighborHoodIndices ( const index_t & localBins,
std::size_t size = 1u ) const

get global bin indices for neighborhood

Parameters
[in]localBinscenter bin defined by local bin indices along each axis
[in]sizesize of neighborhood determining how many adjacent bins along each axis are considered
Returns
set of global bin indices for all bins in neighborhood
Note
Over-/underflow bins are included in the neighborhood.
The size parameter sets the range by how many units each local bin index is allowed to be varied. All local bin indices are varied independently, that is diagonal neighbors are included. Ignoring the truncation of the neighborhood size reaching beyond over-/underflow bins, the neighborhood is of size \(2 \times \text{size}+1\) along each dimension.

◆ numLocalBins()

template<typename T, class... Axes>
index_t Acts::Grid< T, Axes >::numLocalBins ( ) const

get number of bins along each specific axis

Returns
array giving the number of bins along all axes
Note
Not including under- and overflow bins

◆ numLocalBinsAny()

template<typename T, class... Axes>
AnyIndexType Acts::Grid< T, Axes >::numLocalBinsAny ( ) const
overridevirtual

Get the number of local bins for a given set of indices.

Returns
The number of local bins

Implements Acts::IGrid.

◆ setExteriorBins()

template<typename T, class... Axes>
void Acts::Grid< T, Axes >::setExteriorBins ( const value_type & value)

set all overflow and underflow bins to a certain value

Parameters
[in]valuevalue to be inserted in every overflow and underflow bin of the grid.

◆ size()

template<typename T, class... Axes>
std::size_t Acts::Grid< T, Axes >::size ( bool fullCounter = true) const

total number of bins

Parameters
fullCounterWhether to include under-and overflow bins in the count
Returns
total number of bins in the grid
Note
This number contains under-and overflow bins along all axes.

◆ toStream()

template<typename T, class... Axes>
void Acts::Grid< T, Axes >::toStream ( std::ostream & os) const
overrideprotectedvirtual
Parameters
osOutput stream to write grid representation to

Implements Acts::IGrid.

◆ upperRightBinEdge()

template<typename T, class... Axes>
point_t Acts::Grid< T, Axes >::upperRightBinEdge ( const index_t & localBins) const

retrieve upper-right bin edge from set of local bin indices

Parameters
[in]localBinslocal bin indices along each axis
Returns
generalized upper-right bin edge position
Precondition
localBins must only contain valid bin indices (excluding overflow bins).

◆ upperRightBinEdgeAny()

template<typename T, class... Axes>
AnyPointType Acts::Grid< T, Axes >::upperRightBinEdgeAny ( AnyIndexType indices) const
overridevirtual

Get the upper right edge of a bin for a given set of indices.

Parameters
indicesThe indices to get the upper right edge of the bin for
Returns
The upper right edge of the bin

Implements Acts::IGrid.

◆ valueType()

template<typename T, class... Axes>
const std::type_info & Acts::Grid< T, Axes >::valueType ( ) const
overridevirtual

Get the type of the values stored in the grid.

Returns
The type of the values stored in the grid

Implements Acts::IGrid.

Member Data Documentation

◆ DIM

template<typename T, class... Axes>
std::size_t Acts::Grid< T, Axes >::DIM = sizeof...(Axes)
staticconstexpr

number of dimensions of the grid