|
TdZdd
1.1
A top-down/breadth-first decision diagram manipulation framework
|
Closed hash table implementation. More...
#include <MyHashTable.hpp>
Public Member Functions | |
| MyHashTable (Hash const &hash=Hash(), Equal const &equal=Equal()) | |
| Default constructor. | |
| MyHashTable (size_t n, Hash const &hash=Hash(), Equal const &equal=Equal()) | |
| Constructor. More... | |
| MyHashTable (MyHashTable const &o, size_t n=1) | |
| Copy constructor. More... | |
| void | moveAssign (MyHashTable &o) |
| Move constructor. More... | |
| void | clear () |
| Initialize the table to be empty. More... | |
| void | initialize (size_t n) |
| Initialize the table to be empty. More... | |
| void | rehash (size_t n=1) |
| Resize the storage appropriately. More... | |
| Entry & | add (Entry const &elem) |
| Insert an element if no other equivalent element is registered. More... | |
| Entry * | get (Entry const &elem) const |
| Get the element that is already registered. More... | |
Protected Attributes | |
| Hash const | hashFunc |
| Functor for getting hash codes. | |
| Equal const | eqFunc |
| Functor for checking equivalence. | |
| size_t | tableCapacity_ |
| Size of the hash table storage. | |
| size_t | tableSize_ |
| Size of the hash table. | |
| size_t | maxSize_ |
| The maximum number of elements. | |
| size_t | size_ |
| The number of elements. | |
| Entry * | table |
| Pointer to the storage. | |
Closed hash table implementation.
The default value T() cannot be added in the table.
| T | type of elements. |
Definition at line 147 of file MyHashTable.hpp.
|
inline |
Constructor.
| n | initial table size. |
| hash | hash function. |
| equal | equality function |
Definition at line 176 of file MyHashTable.hpp.
|
inline |
Copy constructor.
| o | object to be copied. |
| n | lower bound of initial table size. |
Definition at line 188 of file MyHashTable.hpp.
|
inline |
Insert an element if no other equivalent element is registered.
| elem | the element to be inserted. |
Definition at line 336 of file MyHashTable.hpp.
Referenced by tdzdd::DdBuilderMP< S >::construct(), tdzdd::MyHashTable< MyHashMapEntry< K, V >, MyHashMapHashWrapper< K, V, Hash, Equal >, MyHashMapHashWrapper< K, V, Hash, Equal > >::rehash(), tdzdd::ZddSubsetter< S >::subset(), and tdzdd::ZddSubsetterMP< S >::subset().
|
inline |
Initialize the table to be empty.
The memory is deallocated.
Definition at line 287 of file MyHashTable.hpp.
|
inline |
Get the element that is already registered.
| elem | the element to be searched. |
Definition at line 367 of file MyHashTable.hpp.
|
inline |
Initialize the table to be empty.
| n | initial table size. |
Definition at line 301 of file MyHashTable.hpp.
Referenced by tdzdd::DdBuilderMP< S >::construct(), and tdzdd::ZddSubsetterMP< S >::subset().
|
inline |
Move constructor.
| o | object to be moved. |
| n | lower bound of initial table size. Move constructor. |
| o | object to be moved. |
Definition at line 247 of file MyHashTable.hpp.
|
inline |
Resize the storage appropriately.
| n | hint for the new table size. |
Definition at line 323 of file MyHashTable.hpp.
1.8.13