AGX Dynamics 2.38.0.0
Loading...
Searching...
No Matches
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  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>
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
 
iterator insert (const KeyT &key)
 
void insert (const_iterator begin, const_iterator end)
 
iterator insert (KeyT &&key)
 
void insert_unique (KeyT &&key)
 
LinearProbingHashSetImplementationoperator= (const LinearProbingHashSetImplementation &other)
 
LinearProbingHashSetImplementationoperator= (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

◆ const_reference

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.

◆ reference

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

Definition at line 57 of file LinearProbingHashSet.h.

◆ size_type

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.

◆ value_type

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

◆ LinearProbingHashSetImplementation() [1/3]

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

◆ LinearProbingHashSetImplementation() [2/3]

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

◆ LinearProbingHashSetImplementation() [3/3]

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

Definition at line 210 of file LinearProbingHashSet.h.

◆ ~LinearProbingHashSetImplementation()

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

Definition at line 233 of file LinearProbingHashSet.h.

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

Definition at line 266 of file LinearProbingHashSet.h.

◆ clear()

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

◆ contains()

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

◆ count()

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

◆ emplace()

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

◆ empty()

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

◆ end() [1/2]

◆ end() [2/2]

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

Definition at line 278 of file LinearProbingHashSet.h.

◆ erase() [1/2]

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

◆ erase() [2/2]

◆ erase_bucket()

template<typename KeyT , typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::erase_bucket ( size_t  bucket)
inlineprotected

◆ find() [1/2]

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

◆ find() [2/2]

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

◆ find_filled_bucket()

◆ insert() [1/3]

◆ insert() [2/3]

◆ insert() [3/3]

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

Definition at line 348 of file LinearProbingHashSet.h.

◆ insert_unique()

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

◆ operator=() [1/2]

◆ operator=() [2/2]

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

◆ reserve()

template<typename KeyT , typename HashT = agx::HashFn<KeyT>>
void agx::LinearProbingHashSetImplementation< KeyT, HashT >::reserve ( size_t  num_elems)
inline

◆ size()

template<typename KeyT , typename HashT = agx::HashFn<KeyT>>
size_t agx::LinearProbingHashSetImplementation< KeyT, HashT >::size ( ) const
inline

◆ swap()

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: