AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
The SubMap class provides an API to easily traverse a subset of a Map. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.7.0/src/axom/slam/SubMap.hpp>
Classes | |
class | SubMapIterator |
An iterator for SubMap, based on MapIterator. More... | |
Public Types | |
using | DataType = typename SuperMapType::DataType |
using | SetPosition = typename SubsetType::PositionType |
using | SetElement = typename SubsetType::ElementType |
using | StridePolicyType = typename SuperMapType::StridePolicyType |
using | IndirectionPolicyType = typename SuperMapType::IndirectionPolicy |
using | MapType = Map< DataType, SubsetType, IndirectionPolicyType, StridePolicyType > |
using | SubsetBuilder = typename SubsetType::SetBuilder |
using | const_iterator = SubMapIterator |
using | const_iterator_pair = std::pair< const_iterator, const_iterator > |
using | iterator = const_iterator |
using | iterator_pair = const_iterator_pair |
Public Member Functions | |
SubMap () | |
SubMap (SuperMapType *supermap, SubsetType subset_idxset, bool indicesHaveIndirection=true) | |
Constructor for SubMap given the ElementFlatIndex into the SuperMap. More... | |
SubMap (const SubMap &otherMap) | |
SubMap & | operator= (const SubMap &otherMap) |
bool | isValid (bool VerboseOutput=false) const override |
Checks whether the Map is valid. More... | |
SubMapIterator | begin () |
SubMapIterator | end () |
SubMap individual access functions | |
const DataType & | operator[] (IndexType idx) const |
Access the value in the SubMap given the ComponentFlatIndex. More... | |
DataType & | operator[] (IndexType idx) |
const DataType & | operator() (IndexType idx, IndexType comp=0) const |
Access the value associated with the given position in the subset and the component index. More... | |
DataType & | operator() (IndexType idx, IndexType comp=0) |
const DataType & | value (IndexType idx, IndexType comp=0) const |
Access the value associated with the given position in the subset and the component index. More... | |
DataType & | value (IndexType idx, IndexType comp=0) |
IndexType | index (IndexType idx) const |
Return the set element in the SuperMap at the given subset index. More... | |
SubMap cardinality functions | |
IndexType | size () const override |
returns the size of the SubMap More... | |
IndexType | numComp () const |
returns the number of components (aka. stride) of the SubMap More... | |
Protected Attributes | |
SuperMapType * | m_superMap |
SubsetType | m_subsetIdx |
bool | m_indicesHaveIndirection |
The SubMap class provides an API to easily traverse a subset of a Map.
A SubMap is defined by a subset of the indices into a Map, which we refer to as its SuperMap (of type SuperMapType). The indices are expressed as ElementFlatIndex.
Please see BivariateMap for an explanation of the various indexing schemes.
SubMap is used by BivariateMap to return a set of values mapped to each item in its first set.
SuperMapType | the type of SuperMap |
SetType | defines the indices int the super map. SetType cannot be abstract. |
using axom::slam::SubMap< SuperMapType, SubsetType >::DataType = typename SuperMapType::DataType |
using axom::slam::SubMap< SuperMapType, SubsetType >::SetPosition = typename SubsetType::PositionType |
using axom::slam::SubMap< SuperMapType, SubsetType >::SetElement = typename SubsetType::ElementType |
using axom::slam::SubMap< SuperMapType, SubsetType >::StridePolicyType = typename SuperMapType::StridePolicyType |
using axom::slam::SubMap< SuperMapType, SubsetType >::IndirectionPolicyType = typename SuperMapType::IndirectionPolicy |
using axom::slam::SubMap< SuperMapType, SubsetType >::MapType = Map<DataType, SubsetType, IndirectionPolicyType, StridePolicyType> |
using axom::slam::SubMap< SuperMapType, SubsetType >::SubsetBuilder = typename SubsetType::SetBuilder |
using axom::slam::SubMap< SuperMapType, SubsetType >::const_iterator = SubMapIterator |
using axom::slam::SubMap< SuperMapType, SubsetType >::const_iterator_pair = std::pair<const_iterator, const_iterator> |
using axom::slam::SubMap< SuperMapType, SubsetType >::iterator = const_iterator |
using axom::slam::SubMap< SuperMapType, SubsetType >::iterator_pair = const_iterator_pair |
|
inline |
Default Constructor
|
inline |
|
inline |
Copy Constructor
|
inline |
Assignment Operator
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the set element in the SuperMap at the given subset index.
|
inlineoverridevirtual |
returns the size of the SubMap
Implements axom::slam::MapBase< SubsetType::PositionType >.
|
inline |
returns the number of components (aka. stride) of the SubMap
|
overridevirtual |
Checks whether the Map is valid.
Implements axom::slam::MapBase< SubsetType::PositionType >.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |