OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const > Class Template Reference

Detailed Description

template<class ValueType, class KeySelect, class ValueSelect, class Hash, class KeyEqual, class Allocator, unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy, class OverflowContainer>
template<bool is_const>
class tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >

The 'operator*()' and 'operator->()' methods return a const reference and const pointer respectively to the stored value type.

In case of a map, to get a modifiable reference to the value associated to a key (the '.second' in the stored pair), you have to call 'value()'.

Definition at line 688 of file hopscotch_hash.h.

#include <hopscotch_hash.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = const typename hopscotch_hash::value_type
 
using difference_type = std::ptrdiff_t
 
using reference = value_type &
 
using pointer = value_type *
 

Public Member Functions

 hopscotch_iterator (const hopscotch_iterator< false > &other) noexcept
 
const hopscotch_hash::key_type & key () const
 
template<class U = ValueSelect, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr>
std::conditional< is_const, consttypenameU::value_type &, typenameU::value_type & >::type value () const
 
reference operator* () const
 
pointer operator-> () const
 
hopscotch_iteratoroperator++ ()
 
hopscotch_iterator operator++ (int)
 

Private Types

using iterator_bucket = typename std::conditional< is_const, typename hopscotch_hash::const_iterator_buckets, typename hopscotch_hash::iterator_buckets >::type
 
using iterator_overflow = typename std::conditional< is_const, typename hopscotch_hash::const_iterator_overflow, typename hopscotch_hash::iterator_overflow >::type
 

Private Member Functions

 hopscotch_iterator (iterator_bucket buckets_iterator, iterator_bucket buckets_end_iterator, iterator_overflow overflow_iterator) noexcept
 

Private Attributes

iterator_bucket m_buckets_iterator
 
iterator_bucket m_buckets_end_iterator
 
iterator_overflow m_overflow_iterator
 

Friends

class hopscotch_hash
 
bool operator== (const hopscotch_iterator &lhs, const hopscotch_iterator &rhs)
 
bool operator!= (const hopscotch_iterator &lhs, const hopscotch_iterator &rhs)
 

Member Typedef Documentation

◆ difference_type

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::difference_type = std::ptrdiff_t

Definition at line 709 of file hopscotch_hash.h.

◆ iterator_bucket

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::iterator_bucket = typename std::conditional<is_const, typename hopscotch_hash::const_iterator_buckets, typename hopscotch_hash::iterator_buckets>::type
private

Definition at line 691 of file hopscotch_hash.h.

◆ iterator_category

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::iterator_category = std::forward_iterator_tag

Definition at line 707 of file hopscotch_hash.h.

◆ iterator_overflow

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::iterator_overflow = typename std::conditional<is_const, typename hopscotch_hash::const_iterator_overflow, typename hopscotch_hash::iterator_overflow>::type
private

Definition at line 694 of file hopscotch_hash.h.

◆ pointer

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::pointer = value_type*

Definition at line 711 of file hopscotch_hash.h.

◆ reference

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::reference = value_type&

Definition at line 710 of file hopscotch_hash.h.

◆ value_type

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
using tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::value_type = const typename hopscotch_hash::value_type

Definition at line 708 of file hopscotch_hash.h.

Constructor & Destructor Documentation

◆ hopscotch_iterator() [1/3]

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::hopscotch_iterator ( iterator_bucket  buckets_iterator,
iterator_bucket  buckets_end_iterator,
iterator_overflow  overflow_iterator 
)
inlineprivatenoexcept

Definition at line 699 of file hopscotch_hash.h.

◆ hopscotch_iterator() [2/3]

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::hopscotch_iterator ( )
inlinenoexcept

Definition at line 714 of file hopscotch_hash.h.

◆ hopscotch_iterator() [3/3]

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::hopscotch_iterator ( const hopscotch_iterator< false > &  other)
inlinenoexcept

Definition at line 717 of file hopscotch_hash.h.

Member Function Documentation

◆ key()

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
const hopscotch_hash::key_type & tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::key ( ) const
inline

Definition at line 723 of file hopscotch_hash.h.

◆ operator*()

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
reference tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::operator* ( ) const
inline

Definition at line 744 of file hopscotch_hash.h.

◆ operator++() [1/2]

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
hopscotch_iterator & tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::operator++ ( )
inline

Definition at line 760 of file hopscotch_hash.h.

◆ operator++() [2/2]

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
hopscotch_iterator tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::operator++ ( int  )
inline

Definition at line 773 of file hopscotch_hash.h.

◆ operator->()

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
pointer tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::operator-> ( ) const
inline

Definition at line 752 of file hopscotch_hash.h.

◆ value()

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
template<class U = ValueSelect, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr>
std::conditional< is_const, consttypenameU::value_type &, typenameU::value_type & >::type tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::value ( ) const
inline

Definition at line 735 of file hopscotch_hash.h.

Friends And Related Symbol Documentation

◆ hopscotch_hash

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
friend class hopscotch_hash
friend

Definition at line 689 of file hopscotch_hash.h.

◆ operator!=

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
bool operator!= ( const hopscotch_iterator< is_const > &  lhs,
const hopscotch_iterator< is_const > &  rhs 
)
friend

Definition at line 785 of file hopscotch_hash.h.

◆ operator==

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
bool operator== ( const hopscotch_iterator< is_const > &  lhs,
const hopscotch_iterator< is_const > &  rhs 
)
friend

Definition at line 780 of file hopscotch_hash.h.

Field Documentation

◆ m_buckets_end_iterator

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
iterator_bucket tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::m_buckets_end_iterator
private

Definition at line 791 of file hopscotch_hash.h.

◆ m_buckets_iterator

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
iterator_bucket tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::m_buckets_iterator
private

Definition at line 790 of file hopscotch_hash.h.

◆ m_overflow_iterator

template<class ValueType , class KeySelect , class ValueSelect , class Hash , class KeyEqual , class Allocator , unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy , class OverflowContainer >
template<bool is_const>
iterator_overflow tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >::m_overflow_iterator
private

Definition at line 792 of file hopscotch_hash.h.


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