|
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 |
|
|
| 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 SetType * | set () 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< iterator > | range () const |
|
range_iterator | set_begin () |
|
range_iterator | set_end () |
|
const_range_iterator | set_begin () const |
|
const_range_iterator | set_end () const |
|
RangeAdapter< range_iterator > | set_elements () |
|
OrderedMap & | data () |
| Returns a reference to the underlying map data. More...
|
|
const OrderedMap & | data () const |
|
AXOM_HOST_DEVICE IntType | stride () const |
|
IntType | operator() () const |
|
AXOM_HOST_DEVICE void | setStride (IntType AXOM_DEBUG_PARAM(val)) |
|
|
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 |
|
|
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...
|
|
|
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...
|
|
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
-
T | The data type of each value |
S | The map's set type |
IndPol | The map's indirection policy |
StrPol | A 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
).
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>
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().
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>
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().
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
-
theSet | A reference to the map's set |
data | Pointer 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.
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 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>
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>
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>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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>
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.
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 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 |