#include <tpl_dynSetHash.H>
Clases | |
class | Iterator |
Tipos públicos | |
typedef Base::Hash_Fct | Hash_Fct |
El tipo de función hash. | |
typedef Key | Key_Type |
typedef Key | Item_Type |
Métodos públicos | |
DynHashTable (Hash_Fct hash_fct=Aleph::dft_hash_fct< Key >, const size_t len=Primes::DefaultPrime, const float lower_alpha=hash_default_lower_alpha, const float upper_alpha=hash_default_upper_alpha) | |
DynHashTable (const DynHashTable &other) | |
DynHashTable (DynHashTable &&other) | |
DynHashTable & | operator= (const DynHashTable &other) |
DynHashTable & | operator= (DynHashTable &&other) |
Key * | insert (const Key &key) |
Key * | insert (Key &&key) |
Key * | add (const Key &key) |
Key * | add (Key &&key) |
Key * | search (const Key &key) const |
bool | has (const Key &key) const |
bool | contains (const Key &key) const |
Key & | find (const Key &key) |
Generic_Keys (Key) | |
returns a container with all the keys of the table | |
void | remove (Key *key) |
void | remove (const Key &key) |
Generic_Traverse (Key) | |
Functional_Methods (Key) | |
Equal_To_Method (DynHashTable) | |
Tipos protegidos | |
typedef HashTable< Key, Cmp > | Base |
typedef HashTable< Key, Cmp > ::Bucket | Bucket |
Métodos protegidos | |
Key * | insert_bucket (Bucket *bucket) |
Métodos protegidos estáticos | |
static Bucket * | key_to_bucket (Key *key) |
Tabla hash dinámica autoajustante
DynHashTable<Key> instrumenta una tabla hash lineal y dinámica en la cual no es necesario preocuparse por el tamaño; éste es automáticamente ajustado según unos límites al factor de carga definidos en tiempo de construcción.
Key | el tipo de dato del dominio según el cual se indiza el rango. |
|
inline |
Instancia una tabla hash lineal dinámica.
[in] | hash_fct | la función hash. |
[in] | len | tamaño inicial y mínimo de la tabla hash. El tamaño nunca será más bajo que el este. |
[in] | lower_alpha | umbral inferior de carga; tamaño de la tabla se reducirá si la carga es inferior a este factor. |
[in] | upper_alpha | umbral superior de carga; tamaño de la tabla se expandirá si la carga es superior a este factor. |
|
inline |
Inserta en el conjunto hash la clave key. Retorna un puntero a la clave si fue insertada o NULL si la clave no fue insertada
|
inline |
Elimina de la tabla la clave key cuyo puntero debe ser resultante de una inserción o búsqueda.
|
inline |
Busca la clave key, si se encuentra, entonces retorna un puntero dentro de la tabla a la clave. De lo contrario -no se encuentra la clave-, se retorna NULL: