AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::PositionSet< P, E > Class Template Reference

Alias template for an OrderedSet whose elements belong to a contiguous range \( \in [0,size) \). More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/slam/RangeSet.hpp>

Inheritance diagram for axom::slam::PositionSet< P, E >:

Public Types

using PositionType = P
 
using ElementType = E
 
using SizePolicyType = policies::RuntimeSize< P >
 
using OffsetPolicyType = policies::ZeroOffset< P >
 
using StridePolicyType = policies::StrideOne< P >
 
using IndirectionPolicyType = policies::NoIndirection< P, E >
 
using SubsettingPolicyType = policies::NoSubset
 
using ModularIntType = ModularInt< policies::RuntimeSize< P > >
 
using PositionSet = OrderedSet< PositionType >
 
using const_iterator = OrderedSetIterator< ElementType, true >
 
using const_iterator_pair = std::pair< const_iterator, const_iterator >
 
using iterator = OrderedSetIterator< ElementType, false >
 
using iterator_pair = std::pair< iterator, iterator >
 
using IndirectionResult = E
 
using ConstIndirectionResult = const E
 
using IndirectionBufferType = struct { }
 
using ParentSetType = const Set<>
 

Public Member Functions

 PositionSet (PositionType size=DEFAULT_SIZE)
 
 PositionSet (const typename OrderedSetType::SetBuilder &builder)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator_pair range ()
 
const_iterator_pair range () const
 
policies::NoIndirection< P, E > ::ConstIndirectionResult operator[] (PositionType pos) const
 Given a position in the Set, return a position in the larger index space. More...
 
policies::NoIndirection< P, E > ::IndirectionResult operator[] (PositionType pos)
 
ElementType at (PositionType pos) const
 Random access to the entities of the set. More...
 
PositionType size () const
 Get the number of entities in the set. More...
 
P & size ()
 
bool empty () const
 Checks if there are any elements in the set – equivalent to: set.size() == 0. More...
 
bool isValid (bool verboseOutput=false) const
 Checks whether the set is valid. More...
 
bool isValid (P, P, P, bool) const
 
template<typename OrderedSetIt >
bool isValid (OrderedSetIt, OrderedSetIt, bool) const
 
bool isSubset () const
 Determines if the Set is a Subset of another set. More...
 
bool isValidIndex (PositionType pos) const
 checks whether the given position (index) is valid. More...
 
PositionSet positions () const
 returns a PositionSet over the set's positions More...
 
operator() () const
 
P & operator() ()
 
operator() () const
 
const P operator() () const
 
IndirectionResult operator() (P pos) const
 
offset () const
 
const P stride () const
 
void setStride (P AXOM_DEBUG_PARAM(val))
 
IndirectionResult indirection (P pos) const
 
IndirectionBufferTypedata ()
 
bool hasIndirection () const
 
const ParentSetTypeparentSet () const
 

Static Public Attributes

static const NullSet s_nullSet
 
OrderedSet_Size_Policies

A few default policies for the size of an OrderedSet

static const P DEFAULT_VALUE
 
OrderedSet_Offset_Policies

A few default policies for the offset of an OrderedSet

static const P DEFAULT_VALUE
 
OrderedSet_Stride_Policies

A few default policies for the stride of an OrderedSet

static const P DEFAULT_VALUE
 

Protected Attributes

m_sz
 

Detailed Description

template<typename P = slam::DefaultPositionType, typename E = slam::DefaultElementType>
class axom::slam::PositionSet< P, E >

Alias template for an OrderedSet whose elements belong to a contiguous range \( \in [0,size) \).

Template Parameters
PThe PositionType
EThe ElementType
See also
OrderedSet

Member Typedef Documentation

◆ PositionType

template<typename P = slam::DefaultPositionType, typename E = slam::DefaultElementType>
using axom::slam::PositionSet< P, E >::PositionType = P

◆ ElementType

template<typename P = slam::DefaultPositionType, typename E = slam::DefaultElementType>
using axom::slam::PositionSet< P, E >::ElementType = E

◆ SizePolicyType

◆ OffsetPolicyType

◆ StridePolicyType

◆ IndirectionPolicyType

◆ SubsettingPolicyType

◆ ModularIntType

◆ PositionSet

◆ const_iterator

◆ const_iterator_pair

◆ iterator

◆ iterator_pair

◆ IndirectionResult

◆ ConstIndirectionResult

using axom::slam::policies::NoIndirection< P , E >::ConstIndirectionResult = const E
inherited

◆ IndirectionBufferType

using axom::slam::policies::NoIndirection< P , E >::IndirectionBufferType = struct { }
inherited

◆ ParentSetType

Constructor & Destructor Documentation

◆ PositionSet() [1/2]

template<typename P = slam::DefaultPositionType, typename E = slam::DefaultElementType>
axom::slam::PositionSet< P, E >::PositionSet ( PositionType  size = DEFAULT_SIZE)
inline

◆ PositionSet() [2/2]

template<typename P = slam::DefaultPositionType, typename E = slam::DefaultElementType>
axom::slam::PositionSet< P, E >::PositionSet ( const typename OrderedSetType::SetBuilder &  builder)
inline

Member Function Documentation

◆ begin() [1/2]

◆ begin() [2/2]

◆ end() [1/2]

◆ end() [2/2]

◆ range() [1/2]

◆ range() [2/2]

◆ operator[]() [1/2]

Given a position in the Set, return a position in the larger index space.

◆ operator[]() [2/2]

◆ at()

Random access to the entities of the set.

Parameters
Theindex of the desired element
Returns
The value of the element at the given position
Precondition
The position must be less than the number of elements in the set ( size() )
Note
Concrete realizations of Set also support subscript operator – operator[].
How are we planning to handle indexes that are out or range (accidentally)? Are we planning to handle indexes that are intentionally out of range (e.g. to indicate a problem, or a missing element etc..)?

Implements axom::slam::Set< P, E >.

◆ size() [1/2]

Get the number of entities in the set.

Returns
The number of entities in the set.

Implements axom::slam::Set< P, E >.

◆ size() [2/2]

P & axom::slam::policies::RuntimeSize< P >::size ( )
inlineinherited

◆ empty()

bool axom::slam::OrderedSet< P , E , policies::RuntimeSize<P > , policies::ZeroOffset<P > , policies::StrideOne<P > , policies::NoIndirection<P , E > , policies::NoSubset >::empty ( ) const
inlinevirtualinherited

Checks if there are any elements in the set – equivalent to: set.size() == 0.

Implements axom::slam::Set< P, E >.

◆ isValid() [1/3]

bool axom::slam::OrderedSet< P , E , policies::RuntimeSize<P > , policies::ZeroOffset<P > , policies::StrideOne<P > , policies::NoIndirection<P , E > , policies::NoSubset >::isValid ( bool  verboseOutput = false) const
virtualinherited

Checks whether the set is valid.

Returns
true if the underlying indices are valid, false otherwise.

Implements axom::slam::Set< P, E >.

◆ isValid() [2/3]

bool axom::slam::policies::NoIndirection< P , E >::isValid ( ,
,
,
bool   
) const
inlineinherited

◆ isValid() [3/3]

template<typename OrderedSetIt >
bool axom::slam::policies::NoSubset::isValid ( OrderedSetIt  ,
OrderedSetIt  ,
bool   
) const
inlineinherited

◆ isSubset()

bool axom::slam::OrderedSet< P , E , policies::RuntimeSize<P > , policies::ZeroOffset<P > , policies::StrideOne<P > , policies::NoIndirection<P , E > , policies::NoSubset >::isSubset ( ) const
inlinevirtualinherited

Determines if the Set is a Subset of another set.

Returns
true if the set is a subset of another set, otherwise false.

Implements axom::slam::Set< P, E >.

◆ isValidIndex()

bool axom::slam::OrderedSet< P , E , policies::RuntimeSize<P > , policies::ZeroOffset<P > , policies::StrideOne<P > , policies::NoIndirection<P , E > , policies::NoSubset >::isValidIndex ( PositionType  pos) const
inlineinherited

checks whether the given position (index) is valid.

An index pos is valid when \( 0 \le pos < size() \)

Returns
true if the position is valid, false otherwise

◆ positions()

returns a PositionSet over the set's positions

This can be used to simplify code to loop through the elements of a set.

◆ operator()() [1/5]

P axom::slam::policies::RuntimeSize< P >::operator() ( ) const
inlineinherited

◆ operator()() [2/5]

P & axom::slam::policies::RuntimeSize< P >::operator() ( )
inlineinherited

◆ operator()() [3/5]

P axom::slam::policies::ZeroOffset< P >::operator() ( ) const
inlineinherited

◆ operator()() [4/5]

const P axom::slam::policies::StrideOne< P >::operator() ( ) const
inlineinherited

◆ operator()() [5/5]

IndirectionResult axom::slam::policies::NoIndirection< P , E >::operator() ( pos) const
inlineinherited

◆ offset()

P axom::slam::policies::ZeroOffset< P >::offset ( ) const
inlineinherited

◆ stride()

const P axom::slam::policies::StrideOne< P >::stride ( ) const
inlineinherited

◆ setStride()

void axom::slam::policies::StrideOne< P >::setStride ( AXOM_DEBUG_PARAMval)
inlineinherited

◆ indirection()

IndirectionResult axom::slam::policies::NoIndirection< P , E >::indirection ( pos) const
inlineinherited

◆ data()

IndirectionBufferType* axom::slam::policies::NoIndirection< P , E >::data ( )
inlineinherited

◆ hasIndirection()

bool axom::slam::policies::NoIndirection< P , E >::hasIndirection ( ) const
inlineinherited

◆ parentSet()

const ParentSetType* axom::slam::policies::NoSubset::parentSet ( ) const
inlineinherited

Member Data Documentation

◆ DEFAULT_VALUE [1/3]

const P axom::slam::policies::RuntimeSize< P >::DEFAULT_VALUE
staticinherited

◆ DEFAULT_VALUE [2/3]

const P axom::slam::policies::ZeroOffset< P >::DEFAULT_VALUE
staticinherited

◆ DEFAULT_VALUE [3/3]

const P axom::slam::policies::StrideOne< P >::DEFAULT_VALUE
staticinherited

◆ m_sz

P axom::slam::policies::RuntimeSize< P >::m_sz
protectedinherited

◆ s_nullSet

const NullSet axom::slam::policies::NoSubset::s_nullSet
staticinherited

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