#include <hash.h>
Public Types | |
typedef size_t | size_type |
typedef list_elem | list_type |
typedef std::vector< list_elem * > | vector_type |
typedef size_type(* | hashfun_t )(const Key &) |
typedef hash_iterator< list_elem > | iterator |
typedef hash_iterator< const list_elem > | const_iterator |
Public Member Functions | |
basic_hash (size_type size=31, hashfun_t f=hashfun) | |
basic_hash (const basic_hash &S) | |
~basic_hash () | |
basic_hash & | operator= (const basic_hash &S) |
iterator | begin () |
iterator | end () |
const_iterator | const_begin () const |
const_iterator | begin () const |
const_iterator | const_end () const |
const_iterator | end () const |
void | clear () |
list_elem * | find (const Key &k, list_elem ***where=0) |
const list_elem * | find (const Key &k) const |
bool | exists (const Key &k) const |
list_elem * | insert (const Key &k) |
list_elem * | insert (const list_elem *e) |
list_elem * | insert (const iterator &i) |
bool | erase (const Key &k) |
bool | erase (const iterator &i) |
size_type | size () const |
size_type | max_size () const |
bool | empty () const |
void | swap (basic_hash &s) |
void | statistics () |
Protected Attributes | |
vector_type | v |
size_type | vsize |
size_type | n_elements |
size_type | n_buckets |
hashfun_t | hf |
Private Member Functions | |
void | construct (const basic_hash &S) |
void | resize (size_type new_size) |
size_type | next_size () |
bool | resize_if_needed () |
|
|
|
|
|
|
|
Reimplemented in hash< Key, T >. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|