4#ifndef INPLACECLUSTERIZATION_CELLCONTAINERPROXY_H
5#define INPLACECLUSTERIZATION_CELLCONTAINERPROXY_H
26template <
class T_CellContainer>
76template <
class T_CellContainer>
78 ClusterProxy<T_CellContainer>,
79 CellProxy<T_CellContainer>,
80 IndexWithBeginIndexCache>
90 return this->
index().m_idHash;
114 assert( element_index < container->m_cells.size());
115 return ++element_index;
120template <
class T_CellContainer>
122 ModuleProxy<T_CellContainer>,
123 ClusterProxy<T_CellContainer>,
132 assert( this->
index() < this->
container().m_moduleClusterRange.size());
133 return this->
container().m_moduleClusterRange[this->
index()].idHash;
140 assert(module_index < container->m_moduleClusterRange.size());
141 const typename T_CellContainer::ClusterRange &cluster_range =
container->m_moduleClusterRange[module_index];
142 assert( cluster_range.clusterRangeBeginIndex <=
container->m_relativeClusterCellIndex.size());
143 assert( cluster_range.cellBeginIndex <=
container->m_cells.size());
144 return IndexWithBeginIndexCache{cluster_range.clusterRangeBeginIndex, cluster_range.cellBeginIndex, cluster_range.idHash};
149 assert(module_index < container->m_moduleClusterRange.size());
150 const typename T_CellContainer::ClusterRange &cluster_range =
container->m_moduleClusterRange[module_index];
151 assert( cluster_range.clusterRangeEndIndex <=
container->m_relativeClusterCellIndex.size());
152 assert( cluster_range.cellBeginIndex <=
container->m_cells.size());
153 return IndexWithBeginIndexCache{cluster_range.clusterRangeEndIndex, cluster_range.cellBeginIndex, cluster_range.idHash };
160 return ++element_index;
167template <
class T_CellContainer>
169 CellContainerProxy<T_CellContainer>,
170 ModuleProxy<T_CellContainer>,
Utils::ContainerProxy< T_CellContainer, CellContainerProxy< T_CellContainer >, ModuleProxy< T_CellContainer >, RootNodeIndex > BASE
Utils::ElementProxyBase< T_CellContainer, unsigned int > BASE
const auto & coordinates() const
Utils::ContainerProxy< T_CellContainer, ClusterProxy< T_CellContainer >, CellProxy< T_CellContainer >, IndexWithBeginIndexCache > BASE
static unsigned int nextElementIndex(const T_CellContainer *container, unsigned int element_index)
static unsigned int beginIndex(const T_CellContainer *container, IndexWithBeginIndexCache cluster_index)
static unsigned int endIndex(const T_CellContainer *container, IndexWithBeginIndexCache cluster_index)
unsigned int identifyHash() const
static IndexWithBeginIndexCache beginIndex(const T_CellContainer *container, unsigned int module_index)
unsigned int identifyHash() const
Utils::ContainerProxy< T_CellContainer, ModuleProxy< T_CellContainer >, ClusterProxy< T_CellContainer >, unsigned int > BASE
static IndexWithBeginIndexCache nextElementIndex(const T_CellContainer *container, IndexWithBeginIndexCache element_index)
static IndexWithBeginIndexCache endIndex(const T_CellContainer *container, unsigned int module_index)
IndexWithBeginIndexCache & operator++()
IndexWithBeginIndexCache operator+(std::size_t counter) const
unsigned int m_clusterIndex
unsigned int m_cellBeginIndex
std::size_t operator-(const IndexWithBeginIndexCache &other) const
bool operator==(const IndexWithBeginIndexCache &other) const
const ContainerNonConst & container() const
The proxy container object which provides the means to iterate over its elements and create element p...
const index_t & index() const
ContainerProxyBase< T_CellContainer, typename CellProxy< T_CellContainer >::index_t > BASE
static constexpr bool isConst
const ContainerNonConst & container() const
Helper struct to indicate the "index" of a top level container proxy.