|
|
void | swap (DynLhashTable &table) |
| |
| | DynLhashTable (size_t len=DefaultPrime, Hash_Fct_Ptr hash_fct=dft_hash_fct< Key >) |
| |
|
| DynLhashTable (const DynLhashTable &table) |
| |
|
| DynLhashTable (DynLhashTable &&table) |
| |
|
DynLhashTable & | operator= (const DynLhashTable &table) |
| |
|
DynLhashTable & | operator= (DynLhashTable &&table) |
| |
| Record * | insert (const Key &key, const Record &record) |
| |
|
Record * | insert (const Key &key, Record &&record=Record()) |
| |
|
Record * | insert (Key &&key, const Record &record) |
| |
|
Record * | insert (Key &&key, Record &&record) |
| |
| Record * | search (const Key &key) |
| |
| void | remove (Record *record) |
| |
|
DLProxy | operator[] (const Key &key) const |
| |
|
DLProxy | operator[] (const Key &key) |
| |
|
Aleph::equal_to< Key > & | get_compare () |
| |
|
const Aleph::equal_to< Key > & | get_compare () const |
| |
|
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) |
| |
| 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, typename Record, class Cmp = Aleph::equal_to<Key>>
class Aleph::DynLhashTable< Key, Record, Cmp >
Mapeo dinámico clave-rango instrumentado mediante una tabla hash con resolución de colisiones por encadenamiento separado.
El tipo DynLhashTable<Key,Record> instrumenta un mapeo mediante una tabla hash con resolución de colisiones por encadenamiento separado. El tipo exporta observadores para conocer el radio de uso y, eventualmente, reajustar el tamaño de la tabla, de modo que ésta exhiba un mejor desempeño.
Pueden usarse de manera segura punteros a registros dentro de la tabla.
Aparte los métodos tradicionales de inserción y búsqueda, el operador [] funge a la vez como consulta e inserción. La asignación tabla[key]=record se corresponde con una inserción; mientras que cualquier expresión del tipo table[key] que involucre lectura se corresponde con una búsqueda.
- Parameters
-
| Key | el tipo de clave de indización |
| Record | el tipo de rango asociado a las claves. |
| Cmp | clase de comparación entre las claves. |