AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::LinearProbingHashSetImplementation< KeyT, HashT > Class Template Reference

A cache-friendly hash set with open addressing, linear probing and power-of-two capacity. More...

#include <LinearProbingHashSet.h>

+ Inheritance diagram for agx::LinearProbingHashSetImplementation< KeyT, HashT >:

Classes

class  const_iterator
 
class  insert_iterator
 
class  iterator
 

Public Types

using const_reference = const KeyT &
 
using reference = KeyT &
 
using size_type = size_t
 
using value_type = KeyT
 

Public Member Functions

 LinearProbingHashSetImplementation ()=default
 
 LinearProbingHashSetImplementation (const LinearProbingHashSetImplementation &other)
 
 LinearProbingHashSetImplementation (LinearProbingHashSetImplementation &&other)
 
 ~LinearProbingHashSetImplementation ()
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
bool contains (const KeyT &k) const
 
size_t count (const KeyT &k) const
 
template<class... Args>
insert_iterator emplace (Args &&...args)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool erase (const KeyT &key)
 
iterator erase (iterator it)
 
iterator find (const KeyT &key)
 
const_iterator find (const KeyT &key) const
 
insert_iterator insert (const KeyT &key)
 
insert_iterator insert (KeyT &&key)
 
void insert (const_iterator begin, const_iterator end)
 
void insert_unique (KeyT &&key)
 
LinearProbingHashSetImplementation & operator= (const LinearProbingHashSetImplementation &other)
 
LinearProbingHashSetImplementation & operator= (LinearProbingHashSetImplementation &&other)
 
void reserve (size_t num_elems)
 
size_t size () const
 
void swap (LinearProbingHashSetImplementation &other)
 

Protected Member Functions

void erase_bucket (size_t bucket)
 
template<typename T2 >
size_t find_filled_bucket (const T2 &key) const
 

Detailed Description

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
class agx::LinearProbingHashSetImplementation< KeyT, HashT >

A cache-friendly hash set with open addressing, linear probing and power-of-two capacity.

Definition at line 43 of file LinearProbingHashSet.h.

Member Typedef Documentation

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
using agx::LinearProbingHashSetImplementation< KeyT, HashT >::const_reference = const KeyT&

Definition at line 58 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
using agx::LinearProbingHashSetImplementation< KeyT, HashT >::reference = KeyT&

Definition at line 57 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
using agx::LinearProbingHashSetImplementation< KeyT, HashT >::size_type = size_t

Definition at line 55 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
using agx::LinearProbingHashSetImplementation< KeyT, HashT >::value_type = KeyT

Definition at line 56 of file LinearProbingHashSet.h.

Constructor & Destructor Documentation

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
agx::LinearProbingHashSetImplementation< KeyT, HashT >::LinearProbingHashSetImplementation ( )
default
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
agx::LinearProbingHashSetImplementation< KeyT, HashT >::LinearProbingHashSetImplementation ( const LinearProbingHashSetImplementation< KeyT, HashT > &  other)
inline

Definition at line 230 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
agx::LinearProbingHashSetImplementation< KeyT, HashT >::LinearProbingHashSetImplementation ( LinearProbingHashSetImplementation< KeyT, HashT > &&  other)
inline

Definition at line 236 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
agx::LinearProbingHashSetImplementation< KeyT, HashT >::~LinearProbingHashSetImplementation ( )
inline

Definition at line 255 of file LinearProbingHashSet.h.

Member Function Documentation

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::begin ( )
inline
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
const_iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::begin ( ) const
inline

Definition at line 288 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::clear ( )
inline
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
bool agx::LinearProbingHashSetImplementation< KeyT, HashT >::contains ( const KeyT &  k) const
inline
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
size_t agx::LinearProbingHashSetImplementation< KeyT, HashT >::count ( const KeyT &  k) const
inline

Definition at line 338 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
template<class... Args>
insert_iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::emplace ( Args &&...  args)
inline

Definition at line 388 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
bool agx::LinearProbingHashSetImplementation< KeyT, HashT >::empty ( ) const
inline
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
const_iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::end ( ) const
inline

Definition at line 300 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
bool agx::LinearProbingHashSetImplementation< KeyT, HashT >::erase ( const KeyT &  key)
inline

Definition at line 415 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::erase ( iterator  it)
inline

Definition at line 428 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::erase_bucket ( size_t  bucket)
inlineprotected
template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::find ( const KeyT &  key)
inline

Definition at line 315 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
const_iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::find ( const KeyT &  key) const
inline

Definition at line 324 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
insert_iterator agx::LinearProbingHashSetImplementation< KeyT, HashT >::insert ( KeyT &&  key)
inline

Definition at line 370 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::insert ( const_iterator  begin,
const_iterator  end 
)
inline

Definition at line 393 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::insert_unique ( KeyT &&  key)
inline

Definition at line 401 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
LinearProbingHashSetImplementation& agx::LinearProbingHashSetImplementation< KeyT, HashT >::operator= ( const LinearProbingHashSetImplementation< KeyT, HashT > &  other)
inline

Definition at line 241 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
LinearProbingHashSetImplementation& agx::LinearProbingHashSetImplementation< KeyT, HashT >::operator= ( LinearProbingHashSetImplementation< KeyT, HashT > &&  other)
inline

Definition at line 249 of file LinearProbingHashSet.h.

template<typename KeyT, typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::swap ( LinearProbingHashSetImplementation< KeyT, HashT > &  other)
inline

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