![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
A recipient for a pair of key value in a gum::HashTableList. More...
#include <agrum/tools/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 197 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 211 of file hashTable.h.
|
inline |
|
inline |
Copy constructor.
from | The gum::HashTableBucket to copy. |
Definition at line 223 of file hashTable.h.
|
inline |
Constructor.
k | The key part of the pair. |
v | The value part of the pair. |
Definition at line 230 of file hashTable.h.
|
inline |
Constructor.
k | The key part of the pair. |
v | The value part of the pair. |
Definition at line 237 of file hashTable.h.
|
inline |
Constructor.
p | The pair to store. |
Definition at line 243 of file hashTable.h.
|
inline |
Constructor.
p | The pair to store. |
Definition at line 249 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 258 of file hashTable.h.
|
inline |
|
inline |
Returns the pair stored in this bucket.
Definition at line 271 of file hashTable.h.
|
inline |
Returns the key part of the pair.
Definition at line 277 of file hashTable.h.
|
inline |
Returns the value part of the pair.
Definition at line 283 of file hashTable.h.
HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::next {nullptr} |
A pointer toward the next bucket in the gum::HashTableList.
Definition at line 205 of file hashTable.h.
std::pair< const Key, Val > gum::HashTableBucket< Key, Val >::pair |
The pair stored in this bucket.
Definition at line 199 of file hashTable.h.
HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::prev {nullptr} |
A pointer toward the previous bucket in the gum::HashTableList.
Definition at line 202 of file hashTable.h.