#include <FastHash.h>
Inheritance diagram for hudson::FastHashBase< Key, Value, hasher, NeedsDelete, collectStats >:

Public Member Functions | |
| FastHashBase (size_t size_hint) | |
| Build a table of size 'size_hint'. | |
| FastHashBase () | |
| Build an empty table. | |
| void | reserve (size_t capacity) |
| Reserve a table of appropriate size. | |
| ~FastHashBase () | |
| Destructor. | |
| void | clear (bool free_table=false) |
| Remove all items from the table. | |
| void | collectstats (FHS_Stats &s) |
| pair< iterator, bool > | insert (const Key &key) |
| template<class key_iterator> | |
| void | insert (key_iterator begin, const key_iterator &end) |
| bool | erase (const Key &key) |
| size_t | size () const |
| Return the number of entries in the table. | |
| size_t | capacity () const |
| const_iterator | find (const Key &key) const |
| iterator | find (const Key &key) |
| iterator | end () |
| const_iterator | end () const |
Classes | |
| struct | const_iterator |
| struct | iterator |
| struct | link |
TODO: use the boost package to automatically figure out NeedsDelete.
|
||||||||||
|
Build a table of size 'size_hint'. I round the hint up to the next power of two. There will be no further memory allocation until the size is used up. |
|
|||||||||
|
Build an empty table.
|
|
|||||||||
|
Destructor. If collectStats is true, call collectstats() to dump the current table stats (load, histogram, and so on) into hudson::global_stats. If NeedsDelete is true, I iterate over the table entries and destroy them all properly. If not (that is, the destructors are trivial), I skip that step and simply deallocate en masse. TODO - that's no longer true: the links themselves need to be deleted. |
|
|||||||||
|
|
|
||||||||||
|
Remove all items from the table. Normally, we follow the STL convention of keeping our storage. An optional argument allows overriding that decision. |
|
||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||||||||
|
Insert a range of keys. key_iterator must be a ForwardIterator. |
|
||||||||||
|
Reimplemented in hudson::FastHashMap< Key, Value, hasher, NeedsDelete, collectStats >. |
|
||||||||||
|
Reserve a table of appropriate size. The table size is rounded up to the nearest power of two. If the requested size is smaller than is currently in use, nothing happens. |
|
|||||||||
|
Return the number of entries in the table.
|
1.4.6