38template<
class KeyType,
class ItemType>
class AbaHash;
40template <
class KeyType,
class ItemType>
42template <
class KeyType,
class ItemType>
45template <
class KeyType,
class ItemType>
48template <
class KeyType,
class ItemType>
56template <
class KeyType,
class ItemType>
123template <
class KeyType,
class ItemType>
301 int hf(
int key)
const;
304 int hf(
unsigned key)
const;
int nCollisions_
The number of collisions on calls of insert() and overWrite().
bool find(const KeyType &key, const ItemType &item) const
Checks if a prespecified item with a prespecified key is contained in the hash table.
int remove(const KeyType &key)
Removes the first item with a given key from the hash table.
int size_
The length of the hash table.
int hf(unsigned key) const
This version of hf() implements a Fibonacci hash function for keys of type unsigned.
AbaHashItem< KeyType, ItemType > ** table_
The hash table storing a linked list of hash items in each slot.
int nCollisions() const
Returns the number of collisions which occurred during all previous calls of the functions insert() a...
ItemType * find(const KeyType &key)
Looks for an item in the hash table with a given key.
const ItemType * find(const KeyType &key) const
Looks for an item in the hash table with a given key.
const ItemType * next(const KeyType &key) const
This function can be used to go to the next item in the hash table with key key.
const ItemType * initializeIteration(const KeyType &key) const
This function retrieves the first item.
void insert(const KeyType &newKey, const ItemType &newItem)
Adds an item to the hash table.
ItemType * initializeIteration(const KeyType &key)
This function retrieves the first item.
AbaHash(const AbaHash &rhs)
AbaHash(int size)
Initializes each slot with a 0-pointer to indicate that the linked list of hash items of this slot is...
int hf(const string &str) const
This is a hash function for character strings.
int remove(const KeyType &key, const ItemType &item)
Removes the first item with a given key and a prespecified element from the hash table.
AbaHash & operator=(const AbaHash &rhs)
int hf(int key) const
Computes the hash value of key.
ItemType * next(const KeyType &key)
This function can be used to go to the next item in the hash table with key key.
AbaHashItem< KeyType, ItemType > * iter_
An iterator for all items stored in a slot.
void overWrite(const KeyType &newKey, const ItemType &newItem)
Adds a item to the has table (with overwrite).
int size() const
Returns the length of the hash table.
void resize(int newSize)
Can be used to change the size of the hash table.
~AbaHash()
The destructor.
AbaHashItem< KeyType, ItemType > * next_
AbaHashItem(const KeyType &key, const ItemType &item)
The constructor.
const AbaHashItem< KeyType, ItemType > * next() const
Returns a const pointer to the next hash-item stored in the linked list corresponding to the slot of ...
AbaHashItem< KeyType, ItemType > * next()
Returns a pointer to the next hash-item stored in the linked list corresponding to the slot of this i...
Base class of all other classes of ABACUS.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)