Inherits HashStats< HashTbl >.
|
|
Cmp & | get_compare () |
| |
|
const Cmp & | get_compare () const |
| |
| | GenLhashTable (size_t table_size=Primes::DefaultPrime, Hash_Fct_Ptr hash_fct=Aleph::dft_hash_fct< Key >, Cmp cmp=Cmp(), float lower_alpha=hash_default_lower_alpha, float upper_alpha=hash_default_upper_alpha, bool remove_all_buckets=true, bool with_resize=true) |
| |
|
void | swap (GenLhashTable &other) noexcept |
| |
|
void | empty () noexcept |
| | VacÃa la tabla hash; libera memoria de todas las cubetas.
|
| |
|
Hash_Fct | get_hash_fct () const noexcept |
| |
|
void | set_hash_fct (Hash_Fct fct) noexcept |
| | Set the internal hash function.
|
| |
|
void | set_hash_fct (Hash_Fct_Ptr fct) noexcept |
| |
|
float | current_alpha () const noexcept |
| | return the current table load
|
| |
| Bucket * | insert (Bucket *bucket) |
| |
|
Bucket * | search_or_insert (Bucket *bucket) |
| |
| Bucket * | search (const Key &key) const noexcept |
| |
| Bucket * | remove (Bucket *bucket) noexcept |
| |
| size_t | resize (size_t new_size) |
| |
| virtual | ~GenLhashTable () |
| |
| Bucket * | search_next (Bucket *bucket) const noexcept |
| |
|
const size_t & | capacity () const noexcept |
| | Retorna el tamaño de la tabla.
|
| |
|
const size_t & | size () const noexcept |
| | Retorna el número de elementos que contiene la tabla.
|
| |
|
const size_t & | get_num_busy_slots () const noexcept |
| | Retorna la cantidad de entradas del arreglo que están ocupadas.
|
| |
|
bool | is_empty () const noexcept |
| |
|
Stats | stats () const |
| |
|
void | print_stats (const Stats &stats) const |
| |
|
void | set_upper_alpha (const float &__upper_alpha) |
| |
|
void | set_lower_alpha (const float &__lower_alpha) |
| |
|
float | get_lower_alpha () const noexcept |
| |
|
float | get_upper_alpha () const noexcept |
| |
template<typename Key, class BucketType, class Cmp>
class Aleph::GenLhashTable< Key, BucketType, Cmp >
Tabla hash genérica con resolución de colisiones por encadenamiento separado.
El tipo GenLhashTable implanta una tabla hash genérica con resolución de colisiones por encadenamiento separado en la cual el tipo de cubeta es un parámetro tipo.
Normalmente, este es destinado como back-end de los tipos LhashTable y LhashTableVtl, los cuales son fundamentalmente lo mismo, a excepción de que éstos ya tienen definidos su clases cubetas sin o con destructor virtual.
- Parameters
-
| Key | clave de indización de la tabla. |
| BucketType | el tipo de cubeta. |
| Cmp | clase de comparación entre las claves. |
- See also
- LhashTable LhashTableVtl