AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::Map< T, S, IndPol, StrPol, IfacePol > Class Template Reference

A Map class that associates a constant number of values to every element in a set. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/Map.hpp>

Inheritance diagram for axom::slam::Map< T, S, IndPol, StrPol, IfacePol >:

Classes

class  MapBuilder
 Helper class for constructing a Map. More...
 
class  MapIterator
 An iterator type for a map. Each increment operation advances the iterator to the element at the next flat index. More...
 
class  MapRangeIterator
 An iterator type for a map. Each increment operation advances the iterator to the next set element. To access the jth component values of the iterator's current element, use iter(j). More...
 

Public Types

using DataType = T
 
using SetType = S
 
using IndirectionPolicy = IndPol
 
using StridePolicyType = StrPol
 
using OrderedMap = typename IndirectionPolicy::IndirectionBufferType
 
using SetPosition = typename SetType::PositionType
 
using SetElement = typename SetType::ElementType
 
using ElementShape = typename StridePolicyType::ShapeType
 
using ValueType = typename IndirectionPolicy::IndirectionResult
 
using ConstValueType = typename IndirectionPolicy::ConstIndirectionResult
 
using const_iterator = MapIterator< true >
 
using const_iterator_pair = std::pair< const_iterator, const_iterator >
 
using iterator = MapIterator< false >
 
using iterator_pair = std::pair< iterator, iterator >
 
using const_range_iterator = MapRangeIterator< true >
 
using range_iterator = MapRangeIterator< false >
 
using ConcreteMap = Map< T, S, IndPol, StrPol, policies::ConcreteInterface >
 
using VirtualMap = Map< T, S, IndPol, StrPol, policies::VirtualInterface >
 
using IndexType = IntType
 
using ShapeType = IntType
 

Public Member Functions

 Map (const SetType *theSet=policies::EmptySetTraits< SetType >::emptySet(), DataType defaultValue=DataType(), ElementShape shape=StridePolicyType::DefaultSize(), int allocatorID=axom::getDefaultAllocatorID())
 Constructor for Map using a Set pointer. More...
 
template<typename USet , typename TSet = SetType, typename Enable = typename std::enable_if< !std::is_abstract<TSet>::value && std::is_base_of<TSet, USet>::value>::type>
 Map (const USet &theSet, DataType defaultValue=DataType(), ElementShape shape=StridePolicyType::DefaultSize(), int allocatorID=axom::getDefaultAllocatorID())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<typename USet , typename TSet = SetType, typename Enable = typename std::enable_if< !std::is_abstract<TSet>::value && std::is_base_of<TSet, USet>::value>::type>
 Map (const USet &theSet, OrderedMap data, ElementShape shape=StridePolicyType::DefaultSize())
 Constructor for Map using a Set passed by-value and data passed in by-value. More...
 
 Map (const MapBuilder &builder)
 Constructor for Map using a MapBuilder. More...
 
const SetTypeset () const
 Returns a pointer to the map's underlying set. More...
 
void print () const
 print information on the map, including every element inside Map More...
 
bool isValid (bool verboseOutput=false) const
 returns true if the map is valid, false otherwise.
More...
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
RangeAdapter< iteratorrange () const
 
range_iterator set_begin ()
 
range_iterator set_end ()
 
const_range_iterator set_begin () const
 
const_range_iterator set_end () const
 
RangeAdapter< range_iteratorset_elements ()
 
OrderedMapdata ()
 Returns a reference to the underlying map data. More...
 
const OrderedMapdata () const
 
AXOM_HOST_DEVICE IntType stride () const
 
IntType operator() () const
 
AXOM_HOST_DEVICE void setStride (IntType AXOM_DEBUG_PARAM(val))
 
Map individual access functions
AXOM_HOST_DEVICE ConstValueType operator[] (SetPosition setIndex) const
 Access the value in the map using a flat index in the range of 0 to size()*numComp() More...
 
AXOM_HOST_DEVICE ValueType operator[] (SetPosition setIndex)
 
AXOM_HOST_DEVICE ConstValueType operator() (SetPosition setIdx) const
 Access the value associated with the given position in the set. More...
 
AXOM_HOST_DEVICE ValueType operator() (SetPosition setIdx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<typename... ComponentPos>
AXOM_HOST_DEVICE ConstValueType operator() (SetPosition setIdx, ComponentPos... compIdx) const
 Access the value associated with the given position in the set and the component index. More...
 
template<typename... ComponentPos>
AXOM_HOST_DEVICE ValueType operator() (SetPosition setIdx, ComponentPos... compIdx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
AXOM_HOST_DEVICE ConstValueType value (SetPosition setIdx) const
 
AXOM_HOST_DEVICE ValueType value (SetPosition setIdx)
 
template<typename... ComponentPos>
AXOM_HOST_DEVICE ConstValueType value (SetPosition setIdx, ComponentPos... compIdx) const
 Access the value associated with the given position in the set and the component index. More...
 
template<typename... ComponentPos>
AXOM_HOST_DEVICE ValueType value (SetPosition setIdx, ComponentPos... compIdx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
SetElement index (IndexType idx) const
 
Map cardinality functions
AXOM_HOST_DEVICE SetPosition size () const
 Return the set size. Same as set()->size(). More...
 
SetPosition numComp () const
 
ElementShape shape () const
 Returns the shape of the component values associated with each element. More...
 
Map modifying functions for all entries
void clear ()
 replace all elements in the Map with the default DataType More...
 
void fill (DataType val=DataType())
 
void copy (const Map &other)
 Element-wise copy of data from another map. More...
 

Static Public Member Functions

static constexpr IntType DefaultSize ()
 

Static Public Attributes

static const NullSet< SetPosition, SetElements_nullSet
 
static const IntType DEFAULT_VALUE = INT_VAL
 
static const bool IS_COMPILE_TIME = true
 
constexpr static int NumDims = 1
 

Detailed Description

template<typename T, typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
class axom::slam::Map< T, S, IndPol, StrPol, IfacePol >

A Map class that associates a constant number of values to every element in a set.

Template Parameters
TThe data type of each value
SThe map's set type
IndPolThe map's indirection policy
StrPolA policy class that determines how many values to associate with each element. There is a fixed stride between the data associated with each element of the set.

The map class associates a fixed number of values, also referred to as components, with each element in its underlying Set instance. Depending on the StridePolicy, this can be fixed at compile time or at runtime.
Access to the jth component of the ith element, can be obtained via the parenthesis operator ( map(i,j) ), or via the square bracket operator (i.e. map[k], where k = i * stride() + j ).

Member Typedef Documentation

◆ DataType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::DataType = T

◆ SetType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::SetType = S

◆ IndirectionPolicy

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::IndirectionPolicy = IndPol

◆ StridePolicyType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::StridePolicyType = StrPol

◆ OrderedMap

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::OrderedMap = typename IndirectionPolicy::IndirectionBufferType

◆ SetPosition

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::SetPosition = typename SetType::PositionType

◆ SetElement

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::SetElement = typename SetType::ElementType

◆ ElementShape

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::ElementShape = typename StridePolicyType::ShapeType

◆ ValueType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::ValueType = typename IndirectionPolicy::IndirectionResult

◆ ConstValueType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::ConstValueType = typename IndirectionPolicy::ConstIndirectionResult

◆ const_iterator

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::const_iterator = MapIterator<true>

◆ const_iterator_pair

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::const_iterator_pair = std::pair<const_iterator, const_iterator>

◆ iterator

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::iterator = MapIterator<false>

◆ iterator_pair

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::iterator_pair = std::pair<iterator, iterator>

◆ const_range_iterator

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::const_range_iterator = MapRangeIterator<true>

◆ range_iterator

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::range_iterator = MapRangeIterator<false>

◆ ConcreteMap

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::ConcreteMap = Map<T, S, IndPol, StrPol, policies::ConcreteInterface>

◆ VirtualMap

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::VirtualMap = Map<T, S, IndPol, StrPol, policies::VirtualInterface>

◆ IndexType

template<typename IntType , IntType INT_VAL>
using axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::IndexType = IntType
inherited

◆ ShapeType

template<typename IntType , IntType INT_VAL>
using axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::ShapeType = IntType
inherited

Constructor & Destructor Documentation

◆ Map() [1/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::Map ( const SetType theSet = policies::EmptySetTraits<SetType>::emptySet(),
DataType  defaultValue = DataType(),
ElementShape  shape = StridePolicyType::DefaultSize(),
int  allocatorID = axom::getDefaultAllocatorID() 
)
inline

Constructor for Map using a Set pointer.

Parameters
theSet(Optional) A pointer to the map's set
defaultValue(Optional) If given, every entry in the map will be initialized using defaultValue
shape(Optional) The number of DataType that each element in the set will be mapped to. When using a RuntimeStridePolicy, the default is 1.
Note
When using a compile time StridePolicy, stride must be equal to stride(), when provided.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::numComp(), and axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::size().

◆ Map() [2/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename USet , typename TSet = SetType, typename Enable = typename std::enable_if< !std::is_abstract<TSet>::value && std::is_base_of<TSet, USet>::value>::type>
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::Map ( const USet &  theSet,
DataType  defaultValue = DataType(),
ElementShape  shape = StridePolicyType::DefaultSize(),
int  allocatorID = axom::getDefaultAllocatorID() 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::numComp(), and axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::size().

◆ Map() [3/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename USet , typename TSet = SetType, typename Enable = typename std::enable_if< !std::is_abstract<TSet>::value && std::is_base_of<TSet, USet>::value>::type>
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::Map ( const USet &  theSet,
OrderedMap< T, S, IndPol, StrPol, IfacePol >  data,
ElementShape  shape = StridePolicyType::DefaultSize() 
)
inline

Constructor for Map using a Set passed by-value and data passed in by-value.

Parameters
theSetA reference to the map's set
dataPointer to the externally-owned data
shape(Optional) The number of DataType that each element in the set will be mapped to. When using a RuntimeStridePolicy, the default is 1.
Note
When using a compile time StridePolicy, stride must be equal to stride(), when provided.

◆ Map() [4/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::Map ( const MapBuilder builder)
inline

Constructor for Map using a MapBuilder.

Member Function Documentation

◆ set()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const SetType* axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set ( ) const
inline

Returns a pointer to the map's underlying set.

◆ operator[]() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ConstValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator[] ( SetPosition  setIndex) const
inline

Access the value in the map using a flat index in the range of 0 to size()*numComp()

Returns
The value for the jth component of the ith element, where setIndex = i * numComp() + j.
Precondition
0 <= setIndex < size() * numComp()

◆ operator[]() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator[] ( SetPosition  setIndex)
inline

◆ operator()() [1/5]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ConstValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator() ( SetPosition  setIdx) const
inline

Access the value associated with the given position in the set.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value().

◆ operator()() [2/5]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator() ( SetPosition  setIdx)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value().

◆ operator()() [3/5]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename... ComponentPos>
AXOM_HOST_DEVICE ConstValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator() ( SetPosition  setIdx,
ComponentPos...  compIdx 
) const
inline

Access the value associated with the given position in the set and the component index.

Precondition
0 <= setIdx < size()
sizeof(compIdx) == StridePolicy::NumDims
0 <= compIdx[idim] < shape()[idim]

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value().

◆ operator()() [4/5]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename... ComponentPos>
AXOM_HOST_DEVICE ValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::operator() ( SetPosition  setIdx,
ComponentPos...  compIdx 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value().

◆ value() [1/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ConstValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value ( SetPosition  setIdx) const
inline

◆ value() [2/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE ValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value ( SetPosition  setIdx)
inline

◆ value() [3/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename... ComponentPos>
AXOM_HOST_DEVICE ConstValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value ( SetPosition  setIdx,
ComponentPos...  compIdx 
) const
inline

Access the value associated with the given position in the set and the component index.

Precondition
0 <= setIdx < size()
sizeof(compIdx) == StridePolicy::NumDims
0 <= compIdx[idim] < shape()[idim]

◆ value() [4/4]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<typename... ComponentPos>
AXOM_HOST_DEVICE ValueType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::value ( SetPosition  setIdx,
ComponentPos...  compIdx 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ index()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
SetElement axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::index ( IndexType  idx) const
inline

◆ size()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
AXOM_HOST_DEVICE SetPosition axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::size ( ) const
inline

Return the set size. Same as set()->size().

The total storage size for the map's values is size() * numComp()

References axom::slam::policies::EmptySetTraits< SetType, P, E >::isEmpty().

◆ numComp()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
SetPosition axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::numComp ( ) const
inline

◆ shape()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
ElementShape axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::shape ( ) const
inline

Returns the shape of the component values associated with each element.

For one-dimensional strides, equivalent to stride(); otherwise, returns an N-dimensional array with the number of values in each sub-component index.

◆ clear()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
void axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::clear ( )
inline

replace all elements in the Map with the default DataType

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::fill().

◆ fill()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
void axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::fill ( DataType  val = DataType())
inline

Set each entry in the map to the given value

◆ copy()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
void axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::copy ( const Map< T, S, IndPol, StrPol, IfacePol > &  other)
inline

◆ print()

template<typename T , typename S , typename IndPol , typename StrPol , typename IfacePol >
void axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::print

print information on the map, including every element inside Map

◆ isValid()

template<typename T , typename S , typename IndPol , typename StrPol , typename IfacePol >
bool axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::isValid ( bool  verboseOutput = false) const

returns true if the map is valid, false otherwise.

◆ begin() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::begin ( )
inline

◆ end() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::end ( )
inline

◆ begin() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::begin ( ) const
inline

◆ end() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::end ( ) const
inline

◆ range()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
RangeAdapter<iterator> axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::range ( ) const
inline

◆ set_begin() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
range_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set_begin ( )
inline

◆ set_end() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
range_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set_end ( )
inline

◆ set_begin() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const_range_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set_begin ( ) const
inline

◆ set_end() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const_range_iterator axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set_end ( ) const
inline

◆ set_elements()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
RangeAdapter<range_iterator> axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::set_elements ( )
inline

◆ data() [1/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
OrderedMap& axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::data ( )
inline

Returns a reference to the underlying map data.

◆ data() [2/2]

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const OrderedMap& axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::data ( ) const
inline

◆ DefaultSize()

template<typename IntType , IntType INT_VAL>
static constexpr IntType axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::DefaultSize ( )
inlinestaticconstexprinherited

◆ stride()

template<typename IntType , IntType INT_VAL>
AXOM_HOST_DEVICE IntType axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::stride ( ) const
inlineinherited

◆ operator()() [5/5]

template<typename IntType , IntType INT_VAL>
IntType axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::operator() ( ) const
inlineinherited

◆ setStride()

template<typename IntType , IntType INT_VAL>
AXOM_HOST_DEVICE void axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::setStride ( IntType   AXOM_DEBUG_PARAMval)
inlineinherited

References SLIC_ASSERT_MSG.

Member Data Documentation

◆ s_nullSet

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
const NullSet<SetPosition, SetElement> axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::s_nullSet
static

◆ DEFAULT_VALUE

template<typename IntType , IntType INT_VAL>
const IntType axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::DEFAULT_VALUE = INT_VAL
staticinherited

◆ IS_COMPILE_TIME

template<typename IntType , IntType INT_VAL>
const bool axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::IS_COMPILE_TIME = true
staticinherited

◆ NumDims

template<typename IntType , IntType INT_VAL>
constexpr static int axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::NumDims = 1
staticconstexprinherited

The documentation for this class was generated from the following file: