![]() |
aGrUM
0.16.0
|
A recipient for a pair of key value in a gum::HashTableList. More...
#include <agrum/core/hashTable.h>
Public Attributes | |
std::pair< const Key, Val > | pair |
The pair stored in this bucket. More... | |
HashTableBucket< Key, Val > * | prev {nullptr} |
A pointer toward the previous bucket in the gum::HashTableList. More... | |
HashTableBucket< Key, Val > * | next {nullptr} |
A pointer toward the next bucket in the gum::HashTableList. More... | |
Public Member Functions | |
HashTableBucket () | |
Class constructor. More... | |
HashTableBucket (const HashTableBucket< Key, Val > &from) | |
Copy constructor. More... | |
HashTableBucket (const Key &k, const Val &v) | |
Constructor. More... | |
HashTableBucket (Key &&k, Val &&v) | |
Constructor. More... | |
HashTableBucket (const std::pair< const Key, Val > &p) | |
Constructor. More... | |
HashTableBucket (std::pair< const Key, Val > &&p) | |
Constructor. More... | |
template<typename... Args> | |
HashTableBucket (Emplace e, Args &&... args) | |
The emplace constructor. More... | |
~HashTableBucket () | |
Class destructor. More... | |
std::pair< const Key, Val > & | elt () |
Returns the pair stored in this bucket. More... | |
Key & | key () |
Returns the key part of the pair. More... | |
Val & | val () |
Returns the value part of the pair. More... | |
Public Types | |
enum | Emplace { Emplace::EMPLACE } |
A dummy type for the emplace constructor. More... | |
A recipient for a pair of key value in a gum::HashTableList.
In aGrUM, hashtables are vectors of chained lists. Each list corresponds to the pairs (key,val) the keys of which have the same hashed value. Each box of the list is called a bucket. Lists are doubly linked so as to enable efficient begin/end iterators and efficient insert/erase operations.
Key | The type for keys in a gum::HashTable. |
Val | The type for values in a gum::HashTable. |
Definition at line 202 of file hashTable.h.
|
strong |
A dummy type for the emplace constructor.
This type is used to prevent the Bucket emplace (int,...) to compile.
Enumerator | |
---|---|
EMPLACE |
Definition at line 216 of file hashTable.h.
|
inline |
|
inline |
Copy constructor.
from | The gum::HashTableBucket to copy. |
Definition at line 227 of file hashTable.h.
|
inline |
Constructor.
k | The key part of the pair. |
v | The value part of the pair. |
Definition at line 234 of file hashTable.h.
|
inline |
Constructor.
k | The key part of the pair. |
v | The value part of the pair. |
Definition at line 241 of file hashTable.h.
|
inline |
Constructor.
p | The pair to store. |
Definition at line 247 of file hashTable.h.
|
inline |
Constructor.
p | The pair to store. |
Definition at line 253 of file hashTable.h.
|
inline |
The emplace constructor.
e | The emplace. |
args | A construction list. |
args | The types in the construction list. |
Definition at line 262 of file hashTable.h.
|
inline |
|
inline |
Returns the pair stored in this bucket.
Definition at line 275 of file hashTable.h.
Referenced by gum::HashTableList< Val, Size, IndexAllocator >::at(), gum::HashTable< Val, Size, IndexAllocator >::emplace(), and gum::HashTable< Val, Size, IndexAllocator >::insert().
|
inline |
Returns the key part of the pair.
Definition at line 281 of file hashTable.h.
Referenced by gum::HashTable< Val, Size, IndexAllocator >::__insert(), gum::HashTable< Val, Size, IndexAllocator >::key(), and gum::HashTable< Val, Size, IndexAllocator >::resize().
|
inline |
Returns the value part of the pair.
Definition at line 287 of file hashTable.h.
Referenced by gum::HashTable< Val, Size, IndexAllocator >::getWithDefault(), and gum::HashTable< Val, Size, IndexAllocator >::set().
HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::next {nullptr} |
A pointer toward the next bucket in the gum::HashTableList.
Definition at line 210 of file hashTable.h.
Referenced by gum::HashTableList< Val, Size, IndexAllocator >::__copy(), gum::HashTableList< Val, Size, IndexAllocator >::at(), gum::HashTableList< Val, Size, IndexAllocator >::bucket(), gum::HashTableList< Val, Size, IndexAllocator >::clear(), gum::HashTableList< Val, Size, IndexAllocator >::erase(), gum::HashTableList< Val, Size, IndexAllocator >::exists(), gum::HashTableList< Val, Size, IndexAllocator >::operator[](), gum::HashTable< Val, Size, IndexAllocator >::resize(), and gum::HashTableList< Val, Size, IndexAllocator >::~HashTableList().
std::pair< const Key, Val > gum::HashTableBucket< Key, Val >::pair |
The pair stored in this bucket.
Definition at line 204 of file hashTable.h.
Referenced by gum::HashTableBucket< const gum::DiscreteVariable *, Idx >::HashTableBucket().
HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::prev {nullptr} |
A pointer toward the previous bucket in the gum::HashTableList.
Definition at line 207 of file hashTable.h.
Referenced by gum::HashTableList< Val, Size, IndexAllocator >::__copy(), and gum::HashTableList< Val, Size, IndexAllocator >::erase().