Arcane  v3.16.0.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
Référence du modèle de la classe Arcane::HashTableBaseT< KeyType, TraitsType >

Classes

struct  HashData
 

Types publics

typedef TraitsType::KeyTypeConstRef KeyTypeConstRef
 
typedef TraitsType::KeyTypeValue KeyTypeValue
 

Fonctions membres publiques

 HashTableBaseT (Integer table_size, bool use_prime)
 Crée une table de taille table_size.
 
bool hasKey (KeyTypeConstRef id) const
 true si une valeur avec la clé id est présente
 
void clear ()
 Supprime tous les éléments de la table.
 
void resize (Integer new_table_size, bool use_prime=false)
 Redimensionne la table de hachage.
 
void rehash ()
 Repositionne les données après changement de valeur des clés.
 
- Fonctions membres publiques hérités de Arcane::HashTableBase
 HashTableBase (Integer table_size, bool use_prime)
 Crée une table de taille table_size.
 
Integer nearestPrimeNumber (Integer n)
 Retourne le nombre premier le plus proche de n par excès. Le nombre premier le plus proche et supérieur à n est renvoyé en utilisant une table de nombre premier déterminée à l'avance.
 
Integer count () const
 Nombre d'éléments dans la table.
 

Fonctions membres protégées

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)
 
- Fonctions membres protégées hérités de Arcane::HashTableBase
void _throwNotFound ARCANE_NORETURN () const
 

Attributs protégés

UniqueArray< HashData * > m_buckets
 
- Attributs protégés hérités de Arcane::HashTableBase
Integer m_count
 Nombre d'éléments.
 
Integer m_nb_bucket
 Nombre de buckets.
 

Description détaillée

template<typename KeyType, typename TraitsType>
class Arcane::HashTableBaseT< KeyType, TraitsType >

Définition à la ligne 97 du fichier HashTable.h.

Documentation des définitions de type membres

◆ KeyTypeConstRef

template<typename KeyType, typename TraitsType>
typedef TraitsType::KeyTypeConstRef Arcane::HashTableBaseT< KeyType, TraitsType >::KeyTypeConstRef

Définition à la ligne 102 du fichier HashTable.h.

◆ KeyTypeValue

template<typename KeyType, typename TraitsType>
typedef TraitsType::KeyTypeValue Arcane::HashTableBaseT< KeyType, TraitsType >::KeyTypeValue

Définition à la ligne 103 du fichier HashTable.h.

Documentation des constructeurs et destructeur

◆ HashTableBaseT()

template<typename KeyType, typename TraitsType>
Arcane::HashTableBaseT< KeyType, TraitsType >::HashTableBaseT ( Integer table_size,
bool use_prime )
inline

Crée une table de taille table_size.

Si use_prime est vrai, utilise la fonction nearestPrimeNumber() pour avoir une taille de taille qui est un nombre premier.

Définition à la ligne 144 du fichier HashTable.h.

Références Arcane::HashTableBase::HashTableBase(), et Arcane::HashTableBase::m_nb_bucket.

Documentation des fonctions membres

◆ _baseAdd()

template<typename KeyType, typename TraitsType>
void Arcane::HashTableBaseT< KeyType, TraitsType >::_baseAdd ( Integer bucket,
KeyTypeConstRef id,
HashData * hd )
inlineprotected

Définition à la ligne 250 du fichier HashTable.h.

◆ _baseLookup()

template<typename KeyType, typename TraitsType>
HashData * Arcane::HashTableBaseT< KeyType, TraitsType >::_baseLookup ( KeyTypeConstRef id) const
inlineprotected

Définition à la ligne 242 du fichier HashTable.h.

◆ _baseLookupBucket()

template<typename KeyType, typename TraitsType>
HashData * Arcane::HashTableBaseT< KeyType, TraitsType >::_baseLookupBucket ( Integer bucket,
KeyTypeConstRef id ) const
inlineprotected

Définition à la ligne 214 du fichier HashTable.h.

◆ _baseRemove()

template<typename KeyType, typename TraitsType>
HashData * Arcane::HashTableBaseT< KeyType, TraitsType >::_baseRemove ( KeyTypeConstRef id)
inlineprotected

Définition à la ligne 246 du fichier HashTable.h.

◆ _baseRemoveBucket()

template<typename KeyType, typename TraitsType>
HashData * Arcane::HashTableBaseT< KeyType, TraitsType >::_baseRemoveBucket ( Integer bucket,
KeyTypeConstRef id )
inlineprotected

Définition à la ligne 222 du fichier HashTable.h.

◆ _hash()

template<typename KeyType, typename TraitsType>
Integer Arcane::HashTableBaseT< KeyType, TraitsType >::_hash ( KeyTypeConstRef id) const
inlineprotected

Définition à la ligne 210 du fichier HashTable.h.

◆ clear()

template<typename KeyType, typename TraitsType>
void Arcane::HashTableBaseT< KeyType, TraitsType >::clear ( )
inline

Supprime tous les éléments de la table.

Définition à la ligne 165 du fichier HashTable.h.

Références Arcane::HashTableBase::m_count.

Référencé par resize().

◆ hasKey()

template<typename KeyType, typename TraitsType>
bool Arcane::HashTableBaseT< KeyType, TraitsType >::hasKey ( KeyTypeConstRef id) const
inline

true si une valeur avec la clé id est présente

Définition à la ligne 154 du fichier HashTable.h.

◆ rehash()

template<typename KeyType, typename TraitsType>
void Arcane::HashTableBaseT< KeyType, TraitsType >::rehash ( )
inline

Repositionne les données après changement de valeur des clés.

Définition à la ligne 193 du fichier HashTable.h.

Références Arcane::HashTableBaseT< KeyType, TraitsType >::HashData::m_key, et Arcane::AbstractArray< T >::size().

◆ resize()

template<typename KeyType, typename TraitsType>
void Arcane::HashTableBaseT< KeyType, TraitsType >::resize ( Integer new_table_size,
bool use_prime = false )
inline

Redimensionne la table de hachage.

Définition à la ligne 172 du fichier HashTable.h.

Références clear(), Arcane::HashTableBase::m_nb_bucket, Arcane::HashTableBase::nearestPrimeNumber(), et Arcane::AbstractArray< T >::size().

Documentation des données membres

◆ m_buckets

template<typename KeyType, typename TraitsType>
UniqueArray<HashData*> Arcane::HashTableBaseT< KeyType, TraitsType >::m_buckets
protected

Définition à la ligne 261 du fichier HashTable.h.


La documentation de cette classe a été générée à partir du fichier suivant :