Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
GridContainer construction helper class. More...
#include <GridConstructionHelper.h>
Static Public Member Functions | |
template<int I> | |
static std::vector< size_t > | createAxesSizesVector (const std::tuple< GridAxis< Axes >... > &axes, const TemplateLoopCounter< I > &) |
Creates a vector which contains the sizes of the given axes. | |
static std::vector< size_t > | createAxesSizesVector (const std::tuple< GridAxis< Axes >... > &, const TemplateLoopCounter< 0 > &) |
Method which terminates the iteration when creating the axes sizes vector. | |
template<int I> | |
static std::vector< std::string > | createAxesNamesVector (const std::tuple< GridAxis< Axes >... > &axes, const TemplateLoopCounter< I > &) |
Creates a vector which contains the names of the given axes. | |
static std::vector< std::string > | createAxesNamesVector (const std::tuple< GridAxis< Axes >... > &, const TemplateLoopCounter< 0 > &) |
Method which terminates the iteration when creating the axes names vector. | |
template<int I> | |
static size_t | getAxisIndexFactor (const std::tuple< GridAxis< Axes >... > &axes, const TemplateLoopCounter< I > &) |
Returns the index factor of an axis. | |
static size_t | getAxisIndexFactor (const std::tuple< GridAxis< Axes >... > &, const TemplateLoopCounter<-1 > &) |
Method which terminates the iteration when calculating the axis index factors. | |
template<int I> | |
static std::vector< size_t > | createAxisIndexFactorVector (const std::tuple< GridAxis< Axes >... > &axes, const TemplateLoopCounter< I > &) |
Creates a vector which contains the index factors of the given axes. | |
static std::vector< size_t > | createAxisIndexFactorVector (const std::tuple< GridAxis< Axes >... > &, const TemplateLoopCounter< 0 > &) |
Method which terminates the iteration when creating the axes index factors. | |
template<int I> | |
static void | findAndFixAxis (std::tuple< GridAxis< Axes >... > &axes_tuple, size_t axis, size_t index, const TemplateLoopCounter< I > &) |
static void | findAndFixAxis (std::tuple< GridAxis< Axes >... > &, size_t, size_t, const TemplateLoopCounter< sizeof...(Axes)> &) |
template<typename IterType , int I> | |
static void | fixIteratorAxes (IterType &iter, std::map< size_t, size_t > fix_indices, const TemplateLoopCounter< I > &) |
template<typename IterType > | |
static void | fixIteratorAxes (IterType &, std::map< size_t, size_t >, const TemplateLoopCounter< sizeof...(Axes)> &) |
GridContainer construction helper class.
The GridConstructionHelper is a helper class, which provides functions which use iteration over variadic templates to construct some collections required during the construction of the GridContainer class. It is meant to be used by the GridContainer constructor. For a helper class with similar behavior to be used outside the GridContainer class see the GridIndexHelper class.
Axes | the types of the axes |
Definition at line 53 of file GridConstructionHelper.h.
|
inlinestatic |
Method which terminates the iteration when creating the axes names vector.
Definition at line 102 of file GridConstructionHelper.h.
|
inlinestatic |
Creates a vector which contains the names of the given axes.
Note that this method is using variadic template iteration by using the second parameter (TemplateLoopCounter). To initiate the iteration the counter must be equal with the number of axes in the tuple.
I | the index of the axis until which the results are calculated |
axes | A tuple containing the GridAxis objects describing the axes |
Definition at line 94 of file GridConstructionHelper.h.
References Euclid::GridContainer::GridConstructionHelper< Axes >::createAxesNamesVector(), and std::vector< T >::push_back().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::createAxesNamesVector().
|
inlinestatic |
Method which terminates the iteration when creating the axes sizes vector.
Definition at line 76 of file GridConstructionHelper.h.
|
inlinestatic |
Creates a vector which contains the sizes of the given axes.
Note that this method is using variadic template iteration by using the second parameter (TemplateLoopCounter). To initiate the iteration the counter must be equal with the number of axes in the tuple.
I | the index of the axis until which the results are calculated |
axes | A tuple containing the GridAxis objects describing the axes |
Definition at line 68 of file GridConstructionHelper.h.
References Euclid::GridContainer::GridConstructionHelper< Axes >::createAxesSizesVector(), and std::vector< T >::push_back().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::createAxesSizesVector().
|
inlinestatic |
Method which terminates the iteration when creating the axes index factors.
Definition at line 156 of file GridConstructionHelper.h.
|
inlinestatic |
Creates a vector which contains the index factors of the given axes.
For an explanation of the index factor see the documentation of the getAxisIndexFactor method. The returned vector has size one bigger than the number of axes. The last element contains the total size of the required single dimensional array to keep the data. Note that this method is using variadic template iteration by using the second parameter (TemplateLoopCounter). To initiate the iteration the counter must be equal with the number of axes in the tuple.
I | the index of the axis until which the results are calculated |
axes | A tuple containing the GridAxis objects describing the axes |
Definition at line 148 of file GridConstructionHelper.h.
References Euclid::GridContainer::GridConstructionHelper< Axes >::createAxisIndexFactorVector(), Euclid::GridContainer::GridConstructionHelper< Axes >::getAxisIndexFactor(), and std::vector< T >::push_back().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::createAxisIndexFactorVector().
|
inlinestatic |
Definition at line 173 of file GridConstructionHelper.h.
|
inlinestatic |
Definition at line 162 of file GridConstructionHelper.h.
References Euclid::GridContainer::GridConstructionHelper< Axes >::findAndFixAxis(), and std::move().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::findAndFixAxis().
|
inlinestatic |
Definition at line 188 of file GridConstructionHelper.h.
|
inlinestatic |
Definition at line 179 of file GridConstructionHelper.h.
References std::map< K, T >::end(), std::map< K, T >::find(), and Euclid::GridContainer::GridConstructionHelper< Axes >::fixIteratorAxes().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::fixIteratorAxes().
|
inlinestatic |
Method which terminates the iteration when calculating the axis index factors.
Definition at line 127 of file GridConstructionHelper.h.
|
inlinestatic |
Returns the index factor of an axis.
The index factor of an axis is the step needed to be done in the single dimensional array to move to the next element of the axis. It is equal to the multiplication of the sizes of all the axes which have faster iteration rate. Its purpose is to facilitate the conversion of multi- dimensional coordinates to the index of a long array.
I | the index of the axis to get the factor for |
axes | The axes to use for the calculation |
Definition at line 122 of file GridConstructionHelper.h.
References Euclid::GridContainer::GridConstructionHelper< Axes >::getAxisIndexFactor().
Referenced by Euclid::GridContainer::GridConstructionHelper< Axes >::createAxisIndexFactorVector(), and Euclid::GridContainer::GridConstructionHelper< Axes >::getAxisIndexFactor().