tail = list = NULL;
}
- /** Doesn't work with zero value */
- _Val getRandomValue() {
- while (true) {
- unsigned int index = random() & capacitymask;
- struct Hashlistnode<_Key, _Val> *bin = &table[index];
- if (bin->key != NULL && bin->val != NULL) {
- return bin->val;
- }
- }
- }
-
void resetAndDeleteKeys() {
for (unsigned int i = 0; i < capacity; i++) {
struct Hashlistnode<_Key, _Val> *bin = &table[i];