Interface Documentation
Version: invalid
Classes | Public Types | Public Member Functions | Friends | List of all members
flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE > Class Template Reference

#include <index_space.hh>

Classes

class  id_range_
 
class  iterator_
 
class  iterator_< S, void >
 
class  iterator_base_
 Iterator base, const be parameterized with 'T' or 'const T'. More...
 

Public Types

using id_t = typename std::remove_pointer< T >::type::id_t
 ID type.
 
using id_storage_t = ID_STORAGE_TYPE< id_t >
 ID storage type.
 
using storage_t = STORAGE_TYPE< T >
 Storage type.
 
using item_t = typename std::remove_pointer< T >::type
 item, e.g. entity type
 
using ref_t = typename index_space_ref_type< T >::type
 Reference type.
 
using cast_t = std::decay_t< ref_t >
 reference casting type
 
using apply_function = std::function< void(T &)>
 apply function signature
 
template<typename S >
using map_function = std::function< S(T &)>
 map function signature
 
template<typename S >
using reduce_function = std::function< void(T &, S &)>
 Reduce function signature.
 

Public Member Functions

 index_space (bool storage=STORAGE)
 
template<class S , bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class ID_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
 index_space (const index_space< S, STORAGE2, OWNED2, SORTED2, F2, ID_STORAGE_TYPE2, STORAGE_TYPE2 > &is, size_t begin, size_t end)
 
 index_space (const index_space &is)
 Constructor to alias an existing index space unless OWNED.
 
 index_space (index_space &&is)
 Move constructor.
 
 ~index_space ()
 Destructor.
 
storage_tstorage ()
 Return the storage object.
 
const storage_tstorage () const
 Return the storage object.
 
void set_storage (storage_t *s)
 Set the storage object.
 
index_spaceoperator= (const index_space &is)
 Assignment operator. Alias an existing index space unless OWNED.
 
index_spaceoperator= (index_space &&is)
 Move assignment operator.
 
template<class S , bool STORAGE2 = STORAGE, bool OWNED2 = OWNED, bool SORTED2 = SORTED, class F2 = F, template< typename, typename... > class ID_STORAGE_TYPE2 = ID_STORAGE_TYPE, template< typename, typename... > class STORAGE_TYPE2 = STORAGE_TYPE>
auto & cast ()
 
template<class S , bool STORAGE2 = STORAGE, bool OWNED2 = OWNED, bool SORTED2 = SORTED, class F2 = F, template< typename, typename... > class ID_STORAGE_TYPE2 = ID_STORAGE_TYPE, template< typename, typename... > class STORAGE_TYPE2 = STORAGE_TYPE>
auto & cast () const
 
auto begin ()
 Return begin iterator.
 
auto begin () const
 Return begin iterator.
 
auto end ()
 Return end iterator.
 
auto end () const
 Return end iterator.
 
size_t begin_offset () const
 Return begin offset.
 
size_t end_offset () const
 Return end offset.
 
ref_t get_offset (size_t offset)
 Get offset.
 
const ref_t get_offset (size_t offset) const
 Get offset.
 
id_range_ ids () const
 Get all IDs in range.
 
id_range_ ids (size_t begin, size_t end) const
 Get all IDs in range.
 
id_range_ ids (const std::pair< size_t, size_t > &p) const
 Get all IDs in range.
 
template<class S = T>
auto slice (size_t begin, size_t end) const
 
template<class S = T>
auto slice (const std::pair< size_t, size_t > &range) const
 
template<class S = T>
auto slice () const
 
ref_t get_ (size_t offset)
 Helper method. Get item at offset.
 
const ref_t get_ (size_t offset) const
 Helper method. Get item at offset.
 
ref_t get_end_ (size_t offset)
 Helper method. Get item at offset from end.
 
const ref_t get_end_ (size_t offset) const
 Helper method. Get item at offset from end.
 
ref_t operator[] (size_t offset)
 Get item at offset.
 
const ref_t operator[] (size_t i) const
 Get item at offset.
 
const id_toperator() (size_t i) const
 
id_toperator() (size_t i)
 
ref_t front ()
 Get the entity at the front of the index space.
 
const ref_t front () const
 Get the entity at the front of the index space.
 
ref_t back ()
 Get the entity at the back of the index space.
 
const ref_t back () const
 Get the entity at the back of the index space.
 
size_t size () const
 Get the size of the index space.
 
bool empty () const
 Return if the index space is empty, i.e. has no indices.
 
void clear ()
 Clear all indices and entities.
 
template<bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class INDEX_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
void set_master (const index_space< T, STORAGE2, OWNED2, SORTED2, F2, INDEX_STORAGE_TYPE2, STORAGE_TYPE2 > &master)
 
template<bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class INDEX_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
void set_master (index_space< T, STORAGE2, OWNED2, SORTED2, F2, INDEX_STORAGE_TYPE2, STORAGE_TYPE2 > &master)
 
std::vector< const T > to_vec () const
 
std::vector< T > to_vec ()
 
template<class S >
std::vector< S > to_vec_ ()
 
const id_storage_tid_storage () const
 Return the index storage object.
 
id_storage_tid_storage ()
 Return the index storage object.
 
void set_id_storage (id_storage_t *v)
 Set the index storage object.
 
const id_tid_array () const
 Return the index space IDs as an array.
 
id_tid_array ()
 
template<typename Predicate >
auto filter (Predicate &&f) const
 
void apply (apply_function f) const
 
template<class S >
auto map (map_function< S > f) const
 
template<typename S >
reduce (T start, reduce_function< T > f) const
 
template<typename Predicate >
auto bin (Predicate &&f) const
 Bin entities using a predicate function. More...
 
template<typename Predicate >
auto bin_as_map (Predicate &&f) const
 Bin entities using a predicate function. More...
 
template<typename Predicate >
auto bin_as_vector (Predicate &&f) const
 Bin entities using a predicate function. More...
 
void prepare_ ()
 
index_spaceoperator &= (const index_space &r)
 
index_space operator & (const index_space &r) const
 Return r-value of set intersection of passed index spaces.
 
index_spaceoperator|= (const index_space &r)
 
index_space operator| (const index_space &r) const
 Return r-value of set union of passed index spaces.
 
index_spaceoperator-= (const index_space &r)
 
index_space operator- (const index_space &r) const
 Return r-value of set difference of passed index spaces.
 
void push_back (const T &item)
 
void push_back (id_t index)
 
void pushed ()
 Called if an index was added to storage internally.
 
void append (const index_space &is)
 
index_spaceoperator<< (T item)
 Shortcut for push_back()
 
void append_ (const std::vector< T > &ents, const std::vector< id_t > &ids)
 Append helper method. Do not call directly.
 
id_t id_ (const item_t &item)
 Helper method to get ID.
 
id_t id_ (const item_t *item)
 Helper method to get ID.
 
void set_begin (size_t begin)
 Set to begin index of contained IDs.
 
void set_end (size_t end)
 Set the end index of contained IDs.
 

Friends

template<class , bool , bool , bool , class , template< class, class... > class, template< class, class... > class>
class index_space
 
class connectivity_t
 

Detailed Description

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
class flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >

index_space provides a compile-time configurable and iterable container of objects, e.g. mesh/tree topology entities and their id's. Index space defines the concept of STORAGE - whether the actual entities referenced are stored within this index space OR contained in a 'master' index space. OWNERSHIP - whether its set of id's are owned by this index space or aliased to another index space and then must be copied before this index space can then modify them. SORTED - refers to if the id's are sorted and can then have set operations directly applied to them, else the index space must first be sorted. To make operations on index spaces faster, the index space is parameterized on a number of these parameters and can be efficiently recast depending on how it is to be used.

Template Parameters
STORAGEif true then this is a 'master' index space with its own storage.
OWNEDif true then id ownership is definitely true, else must check owned_ at runtime
SORTEDif true then id's are definitely sorted and shall be maintained in sorted order.
Fiterator predicate/filter function

Constructor & Destructor Documentation

◆ index_space() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::index_space ( bool  storage = STORAGE)
inline

Constructor. If storage is true then allocate storage type, else this index space will index into a separate storage.

◆ index_space() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S , bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class ID_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::index_space ( const index_space< S, STORAGE2, OWNED2, SORTED2, F2, ID_STORAGE_TYPE2, STORAGE_TYPE2 > &  is,
size_t  begin,
size_t  end 
)
inline

Slice constructor. A slice is a view on existing index space and narrower range.

Member Function Documentation

◆ append()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::append ( const index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE > &  is)
inline

Append another index space's entities to the index space. If the index space does not have storage then only the indices are appended. It will create a copy of its aliased indices if OWNED is false.

◆ apply()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::apply ( apply_function  f) const
inline

Apply a function f to each indexed entity in the index space, mutating its state.

◆ bin()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<typename Predicate >
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::bin ( Predicate &&  f) const
inline

Bin entities using a predicate function.

The predicate function returns some sortable key that is used to bin entities.

Predicate The type of the predicate function.

Parameters
fThe predicate function. Should return a sortable bin key that determines the order of the result.
Returns
a vector of index_space's, with each element corresponding to a specific bin.
Remarks
This version returns a map

◆ bin_as_map()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<typename Predicate >
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::bin_as_map ( Predicate &&  f) const
inline

Bin entities using a predicate function.

The predicate function returns some sortable key that is used to bin entities.

Predicate The type of the predicate function.

Parameters
fThe predicate function. Should return a sortable bin key that determines the order of the result.
Returns
a vector of index_space's, with each element corresponding to a specific bin.
Remarks
This version returns a map, and is less costly to bin, but more costly to access.

◆ bin_as_vector()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<typename Predicate >
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::bin_as_vector ( Predicate &&  f) const
inline

Bin entities using a predicate function.

The predicate function returns some sortable key that is used to bin entities.

Predicate The type of the predicate function.

Parameters
fThe predicate function. Should return a sortable bin key that determines the order of the result.
Returns
a vector of index_space's, with each element corresponding to a specific bin.
Remarks
This version returns a vector.

◆ cast() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S , bool STORAGE2 = STORAGE, bool OWNED2 = OWNED, bool SORTED2 = SORTED, class F2 = F, template< typename, typename... > class ID_STORAGE_TYPE2 = ID_STORAGE_TYPE, template< typename, typename... > class STORAGE_TYPE2 = STORAGE_TYPE>
auto& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::cast ( )
inline

Cast an index space by re-specifying template parameters such as OWNED or SORTED.

◆ cast() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S , bool STORAGE2 = STORAGE, bool OWNED2 = OWNED, bool SORTED2 = SORTED, class F2 = F, template< typename, typename... > class ID_STORAGE_TYPE2 = ID_STORAGE_TYPE, template< typename, typename... > class STORAGE_TYPE2 = STORAGE_TYPE>
auto& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::cast ( ) const
inline

Cast an index space by re-specifying template parameters such as OWNED or SORTED.

◆ filter()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<typename Predicate >
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::filter ( Predicate &&  f) const
inline

Walk the index space and apply the predicate f, returning a new index space of those entities for which the predicate returned true.

Template Parameters
Predicatepredicate callable object type

◆ map()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S >
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::map ( map_function< S >  f) const
inline

Non mutating method to apply a function f over each entity an index face, returning a new index space in the process

◆ operator &=()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
index_space& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::operator&= ( const index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE > &  r)
inline

In-place set intersection operation. This method will sort the ID storage if not already sorted and will create a copy of its aliased indices if OWNED is false.

◆ operator()() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
const id_t& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::operator() ( size_t  i) const
inline

Index into the index space and return reference to the entity id at index

◆ operator()() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
id_t& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::operator() ( size_t  i)
inline

Index into the index space and return reference to the entity id at index

◆ operator-=()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
index_space& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::operator-= ( const index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE > &  r)
inline

In-place set complement operator. This method will sort the ID storage if not already sorted and will create a copy of its aliased indices if OWNED is false.

◆ operator|=()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
index_space& flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::operator|= ( const index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE > &  r)
inline

In-place set union operation. This method will sort the ID storage if not already sorted and will create a copy of its aliased indices if OWNED is false.

◆ prepare_()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::prepare_ ( )
inline

Helper method, for write operations. If the containers are not owned then make a copy of them internally and set ownership.

◆ push_back() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::push_back ( const T &  item)
inline

Add an entity to the index space. If the index space does not have storage then only the index is pushed. It will create a copy of its aliased indices if OWNED is false.

◆ push_back() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::push_back ( id_t  index)
inline

Add an entity to the index space. If the index space does not have storage then only the index is pushed. It will create a copy of its aliased indices if OWNED is false.

◆ reduce()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<typename S >
S flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::reduce ( start,
reduce_function< T >  f 
) const
inline

Apply a reduction function to each entity in the index space and return the reduced result.

Parameters
startstart value, e.g. 0 for sum, 1 for product

◆ set_master() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class INDEX_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::set_master ( const index_space< T, STORAGE2, OWNED2, SORTED2, F2, INDEX_STORAGE_TYPE2, STORAGE_TYPE2 > &  master)
inline

Set the master entity storage. The master owns the actual entities that the index space references.

◆ set_master() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<bool STORAGE2, bool OWNED2, bool SORTED2, class F2 , template< typename, typename... > class INDEX_STORAGE_TYPE2, template< typename, typename... > class STORAGE_TYPE2>
void flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::set_master ( index_space< T, STORAGE2, OWNED2, SORTED2, F2, INDEX_STORAGE_TYPE2, STORAGE_TYPE2 > &  master)
inline

Set the master entity storage. The master owns the actual entities that the index space references.

◆ slice() [1/3]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S = T>
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::slice ( size_t  begin,
size_t  end 
) const
inline

Slice and cast an index space. A slice aliases the current index space, definining a new iteration range of offsets to indices.

Parameters
beginbegin offset
endend offset

◆ slice() [2/3]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S = T>
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::slice ( const std::pair< size_t, size_t > &  range) const
inline

Slice and cast an index space. A slice aliases the current index space, definining a new iteration range of offsets to indices.

Template Parameters
Sclass to cast to
Parameters
roffset range

◆ slice() [3/3]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S = T>
auto flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::slice ( ) const
inline

Cast an index space to use a new entity type. The entity type must be binary compatible with the cast type, i.e. an entity wrapper or derived pointer type.

Template Parameters
Sclass to cast to

◆ to_vec() [1/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
std::vector<const T> flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::to_vec ( ) const
inline

Construct and return a vector containing the entities associated with this index space

◆ to_vec() [2/2]

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
std::vector<T> flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::to_vec ( )
inline

Construct and return a vector containing the entities associated with this index space

◆ to_vec_()

template<class T, bool STORAGE = false, bool OWNED = true, bool SORTED = false, class F = void, template< typename, typename... > class ID_STORAGE_TYPE = std::vector, template< typename, typename... > class STORAGE_TYPE = ID_STORAGE_TYPE>
template<class S >
std::vector<S> flecsi::topo::index_space< T, STORAGE, OWNED, SORTED, F, ID_STORAGE_TYPE, STORAGE_TYPE >::to_vec_ ( )
inline

Helper method. Construct and return a vector containing the entities associated with this index space.

Template Parameters
Sentity type

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