![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
Collision handling by double hashing using h2
More...
Public Member Functions | |
DoubleHashing (HashFunction< T > h2) | |
long | newHash (SimpleHashtable< T > table, T key, long h, int count) |
Handle collision by computing a new hash value. More... | |
String | toString () |
abstract long | newHash (SimpleHashtable< T > table, T key, long h, int count) |
Handle collision by computing a new hash value. More... | |
Collision handling by double hashing using h2
Definition at line 126 of file HashtableExample.java.
aud.example.hash.HashtableExample.DoubleHashing< T >.DoubleHashing | ( | HashFunction< T > | h2 | ) |
Definition at line 129 of file HashtableExample.java.
long aud.example.hash.HashtableExample.DoubleHashing< T >.newHash | ( | SimpleHashtable< T > | table, |
T | key, | ||
long | h, | ||
int | count | ||
) |
Handle collision by computing a new hash value.
table | hash table |
key | new entry that is to be inserted but caused the collision |
h | previously used hash value |
count | iteration count for collision handling starting with 1 (=first collision) |
Reimplemented from aud.example.hash.CollisionHandler< T >.
Definition at line 132 of file HashtableExample.java.
String aud.example.hash.HashtableExample.DoubleHashing< T >.toString | ( | ) |
Definition at line 137 of file HashtableExample.java.