Classes | |
| struct | HashData |
Public Types | |
| typedef TraitsType::KeyTypeConstRef | KeyTypeConstRef |
| typedef TraitsType::KeyTypeValue | KeyTypeValue |
Public Member Functions | |
| HashTableBaseT (Integer table_size, bool use_prime) | |
| Creates a table of size table_size. | |
| bool | hasKey (KeyTypeConstRef id) const |
| true if a value with the key id is present | |
| void | clear () |
| Clears all elements from the table. | |
| void | resize (Integer new_table_size, bool use_prime=false) |
| Resizes the hash table. | |
| void | rehash () |
| Repositions data after key value change. | |
| Public Member Functions inherited from Arcane::HashTableBase | |
| HashTableBase (Integer table_size, bool use_prime) | |
| Creates a table of size table_size. | |
| Integer | nearestPrimeNumber (Integer n) |
| Returns the nearest prime number greater than n. The nearest prime number greater than n is returned using a pre-determined prime number table. | |
| Integer | count () const |
| Number of elements in the table. | |
Protected Member Functions | |
| Integer | _hash (KeyTypeConstRef id) const |
| HashData * | _baseLookupBucket (Integer bucket, KeyTypeConstRef id) const |
| HashData * | _baseRemoveBucket (Integer bucket, KeyTypeConstRef id) |
| HashData * | _baseLookup (KeyTypeConstRef id) const |
| HashData * | _baseRemove (KeyTypeConstRef id) |
| void | _baseAdd (Integer bucket, KeyTypeConstRef id, HashData *hd) |
| Protected Member Functions inherited from Arcane::HashTableBase | |
| void _throwNotFound | ARCANE_NORETURN () const |
Protected Attributes | |
| UniqueArray< HashData * > | m_buckets |
| Protected Attributes inherited from Arcane::HashTableBase | |
| Integer | m_count |
| Number of elements. | |
| Integer | m_nb_bucket |
| Number of buckets. | |
Definition at line 99 of file HashTable.h.
| typedef TraitsType::KeyTypeConstRef Arcane::HashTableBaseT< KeyType, TraitsType >::KeyTypeConstRef |
Definition at line 104 of file HashTable.h.
| typedef TraitsType::KeyTypeValue Arcane::HashTableBaseT< KeyType, TraitsType >::KeyTypeValue |
Definition at line 105 of file HashTable.h.
|
inline |
Creates a table of size table_size.
If use_prime is true, uses the nearestPrimeNumber() function to have a size that is a prime number.
Definition at line 148 of file HashTable.h.
References Arcane::HashTableBase::HashTableBase(), and Arcane::HashTableBase::m_nb_bucket.
|
inlineprotected |
Definition at line 254 of file HashTable.h.
|
inlineprotected |
Definition at line 246 of file HashTable.h.
|
inlineprotected |
Definition at line 218 of file HashTable.h.
|
inlineprotected |
Definition at line 250 of file HashTable.h.
|
inlineprotected |
Definition at line 226 of file HashTable.h.
|
inlineprotected |
Definition at line 214 of file HashTable.h.
|
inline |
Clears all elements from the table.
Definition at line 169 of file HashTable.h.
References Arcane::HashTableBase::m_count.
Referenced by resize().
|
inline |
true if a value with the key id is present
Definition at line 158 of file HashTable.h.
|
inline |
Repositions data after key value change.
Definition at line 197 of file HashTable.h.
References Arcane::HashTableBaseT< KeyType, TraitsType >::HashData::m_key, and Arcane::AbstractArray< T >::size().
|
inline |
Resizes the hash table.
Definition at line 176 of file HashTable.h.
References clear(), Arcane::HashTableBase::m_nb_bucket, Arcane::HashTableBase::nearestPrimeNumber(), and Arcane::AbstractArray< T >::size().
|
protected |
Definition at line 265 of file HashTable.h.