In file ../include/EST_THash.h:
template<class K, class V> class EST_THash |
An open hash table.
Pair Iteration
| |||||||||||||||||
Key Iteration
|
EST_THash (int size, unsigned int (*hash_function)(const K &key, unsigned int size)= NULL) Create a table with the given number of buckets. | |
EST_THash (const EST_THash<K, V> &from) Create a copy | |
~EST_THash (void) Destroy the table | |
void | clear (void) Empty the table |
unsigned int | num_entries (void) const Return the total number of entries in the table |
int | present (const K &key) const Does the key have an entry? |
V& | val (const K &key, int &found) const Return the value associated with the key. |
V& | val (const K &key) const Return the value associated with the key |
void | copy (const EST_THash<K, V> &from) Copy all entries |
void | map (void (*func)(K&, V&)) Apply <parameter>func</parameter> to each entry in the table |
int | add_item (const K &key, const V &value, int no_search = 0) Add an entry to the table |
int | remove_item (const K &rkey, int quiet = 0) Remove an entry from the table |
EST_THash<K,V> & | operator = (const EST_THash<K, V> &from) Assignment is a copy operation |
void | dump (ostream &stream, int all=0) Print the table to <parameter>stream</parameter> in a human readable format |
An open hash table. The number of buckets should be set to allow enough space that there are relatively few entries per bucket on average.
Alphabetic index HTML hierarchy of classes or Java
This page is part of the
Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact:
speech_tools@cstr.ed.ac.uk