#include <wvscatterhash.h>
Inherited by WvScatterHash< T, K, Accessor, Comparator >, and WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >.
Collaboration diagram for WvScatterHashBase:
Public Member Functions | |
WvScatterHashBase (unsigned _numslots) | |
virtual | ~WvScatterHashBase () |
size_t | count () const |
bool | isempty () const |
size_t | slowcount () const |
Static Public Attributes | |
pair | null_pair |
const unsigned | prime_numbers [] = {2u, 5u, 11u, 17u, 31u, 67u, 127u, 251u, 509u, 1021u, 2039u, 4093u, 8191u, 16381u, 32749u, 65521u, 131071u, 262139u, 524287u, 1048573u, 2097143u, 4194301u, 8388593u, 16777213u, 33554393u, 67108859u, 134217689u, 268435399u, 536870909u, 1073741789u, 2147483647u, 4294967281u} |
Protected Member Functions | |
virtual unsigned | do_hash (const void *data)=0 |
virtual void | do_delete (void *data)=0 |
pair * | genfind (const void *data, unsigned hash) const |
void | _add (void *data, bool auto_free) |
void | _add (void *data, unsigned hash, bool auto_free) |
void | _remove (const void *data, unsigned hash) |
void | _zap () |
void | _set_autofree (const void *data, unsigned hash, bool auto_free) |
bool | _get_autofree (const void *data, unsigned hash) |
virtual bool | compare (const void *key, const void *elem) const =0 |
Protected Attributes | |
pair * | xslots |
int | prime_index |
unsigned | numslots |
|
Definition at line 17 of file wvscatterhash.cc. References numslots, prime_index, prime_numbers, WvScatterHashBase(), and xslots. Referenced by WvScatterHashBase(). |
|
Definition at line 26 of file wvscatterhash.h. References xslots. |
|
Definition at line 77 of file wvscatterhash.cc. References _add(), IS_DELETED, and IS_OCCUPIED. |
|
Definition at line 72 of file wvscatterhash.cc. References _add(), and do_hash(). Referenced by _add(). |
|
Definition at line 134 of file wvscatterhash.cc. References _get_autofree(), genfind(), and IS_AUTO_FREE. Referenced by _get_autofree(). |
|
Definition at line 99 of file wvscatterhash.cc. References _remove(), WvScatterHashBase::pair::data, do_delete(), genfind(), IS_AUTO_FREE, null_pair, and WvScatterHashBase::pair::status. Referenced by _remove(). |
|
Definition at line 125 of file wvscatterhash.cc. References _set_autofree(), genfind(), and WvScatterHashBase::pair::status. Referenced by _set_autofree(). |
|
Definition at line 112 of file wvscatterhash.cc. References do_delete(), and IS_AUTO_FREE. Referenced by WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >::zap(), and WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >::~WvScatterHash(). |
|
Implemented in WvScatterHash< T, K, Accessor, Comparator >, and WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >. |
|
Definition at line 37 of file wvscatterhash.h. Referenced by slowcount(). |
|
Implemented in WvScatterHash< T, K, Accessor, Comparator >, and WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >. |
|
Implemented in WvScatterHash< T, K, Accessor, Comparator >, and WvScatterHash< UniHashTreeBase, UniConfKey, Accessor >. Referenced by _add(). |
|
Definition at line 146 of file wvscatterhash.cc. References IS_OCCUPIED. Referenced by _get_autofree(), _remove(), and _set_autofree(). |
|
Definition at line 38 of file wvscatterhash.h. Referenced by UniHashTreeBase::haschildren(). |
|
Definition at line 36 of file wvscatterhash.cc. References count(), IS_OCCUPIED, numslots, and xslots. |
|
Definition at line 13 of file wvscatterhash.cc. Referenced by _remove(). |
|
Definition at line 90 of file wvscatterhash.h. Referenced by slowcount(), and WvScatterHashBase(). |
|
Definition at line 89 of file wvscatterhash.h. Referenced by WvScatterHashBase(). |
|
Definition at line 11 of file wvscatterhash.cc. Referenced by WvScatterHashBase(). |
|
Definition at line 88 of file wvscatterhash.h. Referenced by slowcount(), WvScatterHashBase(), and ~WvScatterHashBase(). |