38 template<
class KeyType,
class ItemType>
class AbaHash;
40 template <
class KeyType,
class ItemType>
42 template <
class KeyType,
class ItemType>
45 template <
class KeyType,
class ItemType>
46 ostream &operator<< (ostream &out, const AbaHashItem<KeyType, ItemType> &rhs);
48 template <
class KeyType,
class ItemType>
49 ostream &operator<< (ostream &out, const AbaHash<KeyType, ItemType> &
hash);
56 template <
class KeyType,
class ItemType>
67 AbaHashItem(
const KeyType &key,
const ItemType &item);
74 friend ostream &operator<< <> (ostream &,
123 template <
class KeyType,
class ItemType>
151 friend ostream &operator<< <> (ostream &out,
163 void insert(
const KeyType &newKey,
const ItemType &newItem);
173 void overWrite(
const KeyType &newKey,
const ItemType &newItem);
184 const ItemType *
find(
const KeyType &key)
const;
195 ItemType *
find(
const KeyType &key);
204 bool find(
const KeyType &key,
const ItemType &item)
const;
219 ItemType *initializeIteration(
const KeyType &key);
228 const ItemType *initializeIteration(
const KeyType &key)
const;
243 ItemType *
next(
const KeyType &key);
259 const ItemType *
next(
const KeyType &key)
const;
269 int remove(
const KeyType &key);
279 int remove(
const KeyType &key,
const ItemType &item);
285 int nCollisions()
const;
291 void resize(
int newSize);
302 int hf(
int key)
const;
305 int hf(
unsigned key)
const;
311 int hf(
const string &str)
const;
Base class of all other classes of ABACUS.
AbaHashItem< KeyType, ItemType > * next_
int size_
The length of the hash table.
AbaHashItem< KeyType, ItemType > * next()
Returns a pointer to the next hash-item stored in the linked list corresponding to the slot of this i...
AbaHashItem< KeyType, ItemType > * iter_
An iterator for all items stored in a slot.
static uint32_t hash(uint32_t x)
AbaHashItem(const KeyType &key, const ItemType &item)
The constructor.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
static bool find(V &ts, const T &t)
AbaHashItem< KeyType, ItemType > ** table_
The hash table storing a linked list of hash items in each slot.
int nCollisions_
The number of collisions on calls of insert() and overWrite().