AGX Dynamics  2.35.0.1
agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT > Class Template Reference

#include <LinearProbingHashTable.h>

+ Inheritance diagram for agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >:

Public Types

typedef Implementation::const_iterator const_iterator
 
typedef LinearProbingHashTableImplementation< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT > Implementation
 
typedef Implementation::iterator iterator
 
- Public Types inherited from agx::LinearProbingHashTableImplementation< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >
using bucket_type = PairT
 
enum  ClearPolicy
 
using const_reference = const PairT &
 
using key_type = agx::ref_ptr< KeyT >
 
using reference = PairT &
 
using size_type = size_t
 
using value_type = DataT
 

Public Member Functions

 LinearProbingHashTable ()
 
bool contains (const KeyT *key) const
 
bool erase (const KeyT *key)
 
iterator find (const KeyT *key)
 
const_iterator find (const KeyT *key) const
 
- Public Member Functions inherited from agx::LinearProbingHashTableImplementation< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >
 LinearProbingHashTableImplementation ()=default
 
 LinearProbingHashTableImplementation (const LinearProbingHashTableImplementation &other)
 
 LinearProbingHashTableImplementation (LinearProbingHashTableImplementation &&other)
 
 ~LinearProbingHashTableImplementation ()
 
iterator begin ()
 Iterator to first element in hash table. More...
 
const_iterator begin () const
 Iterator to first element in hash table. More...
 
size_t capacity () const
 
void clear (int=0)
 Remove all elements, keeping full capacity. More...
 
bool contains (const agx::ref_ptr< KeyT > &k) const
 Check if the hash table contains a key/value pair for the given key. More...
 
size_t count (const agx::ref_ptr< KeyT > &k) const
 Count the number of key/value pairs matching the given key. More...
 
bool empty () const
 
iterator end ()
 Iterator marking end of hash table. More...
 
const_iterator end () const
 Iterator marking end of hash table. More...
 
bool erase (const agx::ref_ptr< KeyT > &key)
 Erase an element from the hash table. More...
 
iterator erase (iterator it)
 Erase an element from the hash table. More...
 
iterator find (const agx::ref_ptr< KeyT > &key)
 Find a key/value pair in the hash table given a key. More...
 
const_iterator find (const agx::ref_ptr< KeyT > &key) const
 Find a key/value pair in the hash table given a key. More...
 
const DataT get_or_return_default (const agx::ref_ptr< KeyT > &k) const
 
insert_iterator insert (const agx::ref_ptr< KeyT > &key, const DataT value)
 Insert a key/value pair into the hash table. More...
 
insert_iterator insert (const std::pair< agx::ref_ptr< KeyT >, DataT > &p)
 
void insert (const_iterator begin, const_iterator end)
 Insert all elements in the given range. More...
 
void insert_unique (agx::ref_ptr< KeyT > &&key, DataT &&value)
 Insert a key/value pair into the hash table assuming that the given key does not already exist in the hash table. More...
 
void insert_unique (std::pair< agx::ref_ptr< KeyT >, DataT > &&p)
 
LinearProbingHashTableImplementation & operator= (const LinearProbingHashTableImplementation &other)
 
LinearProbingHashTableImplementation & operator= (LinearProbingHashTableImplementation &&other)
 
DataT & operator[] (const agx::ref_ptr< KeyT > &key)
 Return the value associated with the given key. More...
 
const void * ptr () const
 
void reserve (size_t num_elems)
 Make room for this many elements in the hash table. More...
 
DataT set_get (const agx::ref_ptr< KeyT > &key, const DataT &new_value)
 
size_t size () const
 
void swap (LinearProbingHashTableImplementation &other)
 
DataT * try_get (const agx::ref_ptr< KeyT > &k)
 Find the value associated with the given key. More...
 
const DataT * try_get (const agx::ref_ptr< KeyT > &k) const
 Find the value associated with the given key. More...
 

Additional Inherited Members

- Protected Member Functions inherited from agx::LinearProbingHashTableImplementation< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >
void erase_bucket (size_t bucket)
 
size_t find_filled_bucket (const T2 &key) const
 

Detailed Description

template<typename KeyT, typename DataT, typename HashT, typename AllocatorT>
class agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >

Definition at line 884 of file LinearProbingHashTable.h.

Member Typedef Documentation

◆ const_iterator

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
typedef Implementation::const_iterator agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::const_iterator

Definition at line 889 of file LinearProbingHashTable.h.

◆ Implementation

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
typedef LinearProbingHashTableImplementation<agx::ref_ptr<KeyT>, DataT, HashT, AllocatorT> agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::Implementation

Definition at line 887 of file LinearProbingHashTable.h.

◆ iterator

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
typedef Implementation::iterator agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::iterator

Definition at line 888 of file LinearProbingHashTable.h.

Constructor & Destructor Documentation

◆ LinearProbingHashTable()

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::LinearProbingHashTable ( )
inline

Definition at line 891 of file LinearProbingHashTable.h.

Member Function Documentation

◆ contains()

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
bool agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::contains ( const KeyT *  key) const
inline

◆ erase()

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
bool agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::erase ( const KeyT *  key)
inline

◆ find() [1/2]

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
iterator agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::find ( const KeyT *  key)
inline

◆ find() [2/2]

template<typename KeyT , typename DataT , typename HashT , typename AllocatorT >
const_iterator agx::LinearProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::find ( const KeyT *  key) const
inline

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