STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::identity_container< T > Struct Template Reference

Generator container whose value for the element at an index is the index itself. More...

Public Member Functions

reference operator[] (index_type const &idx) const
 Retrieve the value associated with a particular index (i.e., return the index.) More...
 
reference get_element (index_type const &idx) const
 Retrieve the value associated with a particular index (i.e., return the index.) More...
 

Public Types

typedef T value_type
 
typedef value_type reference
 
typedef value_type const_reference
 
typedef value_type index_type
 
typedef index_type gid_type
 

Detailed Description

template<typename T>
struct stapl::identity_container< T >

Generator container whose value for the element at an index is the index itself.

That is, if we have an identity_container ic, then ic[i] == i must be true.

Template Parameters
TType of the index

Member Function Documentation

◆ operator[]()

template<typename T >
reference stapl::identity_container< T >::operator[] ( index_type const &  idx) const

Retrieve the value associated with a particular index (i.e., return the index.)

Parameters
idxThe index of the element to retrieve
Returns
Copy of the index.

◆ get_element()

template<typename T >
reference stapl::identity_container< T >::get_element ( index_type const &  idx) const

Retrieve the value associated with a particular index (i.e., return the index.)

Parameters
idxThe index of the element to retrieve
Returns
Copy of the index.

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