33 #ifndef __H__UG__hash__
34 #define __H__UG__hash__
46 template <
class TKey,
class TValue>
59 Hash(
size_t hashSize);
void insert(const key_t &key, const value_t &val)
Definition: hash_impl.hpp:199
TValue value_t
Definition: hash.h:54
size_t m_numEntries
Definition: hash.h:118
std::vector< Entry > m_entries
Definition: hash.h:117
value_t & get_entry(const key_t &key)
Definition: hash_impl.hpp:158
size_t capacity() const
returns the capacity of the container in which key-value-pairs are stored.
Definition: hash_impl.hpp:121
size_t invalid_index() const
Definition: hash.h:104
bool has_entry(const key_t &key) const
Definition: hash_impl.hpp:150
iterator begin(const key_t &key)
Definition: hash_impl.hpp:263
bool empty() const
Definition: hash_impl.hpp:142
TKey key_t
Definition: hash.h:50
size_t hash_size() const
Definition: hash_impl.hpp:105
void erase(const key_t &key)
Definition: hash_impl.hpp:227
size_t hash_index(const key_t &key) const
Definition: hash_impl.hpp:280
iterator end(const key_t &key)
Definition: hash_impl.hpp:273
size_t find_entry(const key_t &key) const
Definition: hash_impl.hpp:287
void reserve(size_t size)
Reserves memory for key-value-pair storage.
Definition: hash_impl.hpp:113
size_t size() const
returns the number of key-value-pairs currently stored in the hash
std::vector< std::pair< size_t, size_t > > m_hashList
Definition: hash.h:123
void resize_hash(size_t size)
Definition: hash_impl.hpp:66
void clear()
Definition: hash_impl.hpp:129
Hash()
Definition: hash_impl.hpp:46
size_t m_firstUnusedEntry
Definition: hash.h:119
hash_iterator< key_t, value_t, Entry > iterator
Definition: hash.h:55
this iterator is used by the hash class to provide access to the elements of a given key
Definition: hash_iterator.h:42
Entry()
Definition: hash.h:111
key_t key
Definition: hash.h:107
size_t next
Definition: hash.h:109
value_t value
Definition: hash.h:108
Entry(const key_t &k, const value_t &v)
Definition: hash.h:112