|
Data & | get_data (const Key &key) |
|
const Key & | get_key (Data *data_ptr) |
|
| DynMapHashTable (typename Base::Hash_Fct hash_fct=wrapper< 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) |
|
Key * | insert (const Key &key, const Data &data) |
|
Key * | insert (const Key &key, Data &&data) |
|
Key * | insert (Key &&key, Data &&data) |
|
Key * | insert (Key &&key, const Data &data) |
|
Data * | search (const Key &key) const |
|
bool | has (const Key &key) |
|
Data & | find (const Key &key) |
|
void | remove_by_data (Data &data) |
|
void | remove (const Key &key) |
|
| Map_Sequences_Methods () |
|
| Generate_Proxy_Operator (DynMapHashTable) |
|
| DynHashTable (Hash_Fct hash_fct=Aleph::dft_hash_fct< std::pair< Key, Data > >, 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) |
|
std::pair< Key, Data > * | insert (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | insert (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | add (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | add (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | search (const std::pair< Key, Data > &key) const |
|
bool | has (const std::pair< Key, Data > &key) const |
|
bool | contains (const std::pair< Key, Data > &key) const |
|
std::pair< Key, Data > & | find (const std::pair< Key, Data > &key) |
|
| Generic_Keys (std::pair< Key, Data >) |
| returns a container with all the keys of the table
|
|
void | remove (std::pair< Key, Data > *key) |
|
void | remove (const std::pair< Key, Data > &key) |
|
| Generic_Traverse (std::pair< Key, Data >) |
|
| Functional_Methods (std::pair< Key, Data >) |
|
| Equal_To_Method (DynHashTable) |
|
template<typename Key, typename Data, class Cmp = Dft_Pair_Cmp<Key, Data, Aleph::equal_to<Key>>, template< class, class > class HashTable = LinearHashTable>
Aleph::DynMapHashTable< Key, Data, Cmp, HashTable >::DynMapHashTable |
( |
typename Base::Hash_Fct |
hash_fct = wrapper<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 |
|
) |
| |
|
inline |
Constructor.
Please note that although the hash_fct parameter defines a hash function for std::pair<Key, Data> types, the hash function MUST only compute on the first field of pair. If you do not do so, then the mapping will fail, since it will be a set of pairs.
- Atención
- READ VERY CAREFULLY IF YOU PLAN PASS YOUR OWN HASH FUNCTION
template<typename Key, typename Data, class Cmp = Dft_Pair_Cmp<Key, Data, Aleph::equal_to<Key>>, template< class, class > class HashTable = LinearHashTable>
Inserta en el mapeo hash el par (key,record) indizado por la clave key. Retorna un puntero al registro dentro de la tabla. Dispara la excepción bad_alloc si no hay suficiente memoria.
template<typename Key, typename Data, class Cmp = Dft_Pair_Cmp<Key, Data, Aleph::equal_to<Key>>, template< class, class > class HashTable = LinearHashTable>
Elimina de la tabla la clave key cuyo puntero debe ser resultante de una inserción o búsqueda.
template<typename Key, typename Data, class Cmp = Dft_Pair_Cmp<Key, Data, Aleph::equal_to<Key>>, template< class, class > class HashTable = LinearHashTable>
Busca la clave key y, si se encuentra, entonces retorna un puntero dentro de la tabla al registro asociado. De lo contrario -no se encuentra la clave-, se retorna NULL: