![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
A recipient for a pair of key value in a gum::HashTableList. More...
#include <agrum/base/core/hashTable.h>
Public Types | |
| enum class | Emplace { EMPLACE } |
| A dummy type for the emplace constructor. More... | |
Public Member Functions | |
| HashTableBucket () | |
| Class constructor. | |
| HashTableBucket (const HashTableBucket< Key, Val > &from) | |
| Copy constructor. | |
| HashTableBucket (const Key &k, const Val &v) | |
| Constructor. | |
| HashTableBucket (Key &&k, Val &&v) | |
| Constructor. | |
| HashTableBucket (const std::pair< const Key, Val > &p) | |
| Constructor. | |
| HashTableBucket (std::pair< const Key, Val > &&p) | |
| Constructor. | |
| template<typename... Args> | |
| HashTableBucket (Emplace e, Args &&... args) | |
| The emplace constructor. | |
| ~HashTableBucket () | |
| Class destructor. | |
| std::pair< const Key, Val > & | elt () |
| Returns the pair stored in this bucket. | |
| Key & | key () |
| Returns the key part of the pair. | |
| Val & | val () |
| Returns the value part of the pair. | |
Public Attributes | |
| std::pair< const Key, Val > | pair |
| The pair stored in this bucket. | |
| HashTableBucket< Key, Val > * | prev {nullptr} |
| A pointer toward the previous bucket in the gum::HashTableList. | |
| HashTableBucket< Key, Val > * | next {nullptr} |
| A pointer toward the next bucket in the gum::HashTableList. | |
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 215 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 229 of file hashTable.h.
|
inline |
Class constructor.
Definition at line 234 of file hashTable.h.
Referenced by HashTableBucket().
|
inline |
Copy constructor.
| from | The gum::HashTableBucket to copy. |
Definition at line 240 of file hashTable.h.
References HashTableBucket(), and pair.
|
inline |
|
inline |
|
inline |
Constructor.
| p | The pair to store. |
Definition at line 260 of file hashTable.h.
References pair.
|
inline |
|
inline |
The emplace constructor.
| e | The emplace. |
| args | A construction list. |
| args | The types in the construction list. |
Definition at line 275 of file hashTable.h.
References pair.
|
inline |
|
inline |
Returns the pair stored in this bucket.
Definition at line 288 of file hashTable.h.
References pair.
Referenced by gum::HashTableList< Key, Val >::at(), and gum::HashTableList< Key, Val >::at().
|
inline |
Returns the key part of the pair.
Definition at line 294 of file hashTable.h.
References pair.
Referenced by gum::HashTable< Key, Val >::_insert_(), gum::HashTable< Key, Val >::key(), and gum::HashTable< Key, Val >::resize().
|
inline |
Returns the value part of the pair.
Definition at line 300 of file hashTable.h.
References pair.
Referenced by gum::HashTable< Key, Val >::getWithDefault(), gum::HashTable< Key, Val >::getWithDefault(), and gum::HashTable< Key, Val >::set().
| HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::next {nullptr} |
A pointer toward the next bucket in the gum::HashTableList.
Definition at line 223 of file hashTable.h.
Referenced by gum::HashTableList< Key, Val >::~HashTableList(), gum::HashTableList< Key, Val >::_copy_(), gum::HashTableList< Key, Val >::at(), gum::HashTableList< Key, Val >::at(), gum::HashTableList< Key, Val >::clear(), gum::HashTableList< Key, Val >::erase(), and gum::HashTable< Key, Val >::resize().
| std::pair< const Key, Val > gum::HashTableBucket< Key, Val >::pair |
The pair stored in this bucket.
Definition at line 217 of file hashTable.h.
Referenced by HashTableBucket(), HashTableBucket(), HashTableBucket(), HashTableBucket(), HashTableBucket(), HashTableBucket(), elt(), key(), and val().
| HashTableBucket< Key, Val >* gum::HashTableBucket< Key, Val >::prev {nullptr} |
A pointer toward the previous bucket in the gum::HashTableList.
Definition at line 220 of file hashTable.h.
Referenced by gum::HashTableList< Key, Val >::erase().