![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
Collision handling by quadratic probing h(x,i)=h(x)+i*b+i*i*c
More...
Public Member Functions | |
QuadraticProbing () | |
QuadraticProbing (int b, int c) | |
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 quadratic probing h(x,i)=h(x)+i*b+i*i*c
Definition at line 104 of file HashtableExample.java.
Definition at line 107 of file HashtableExample.java.
aud.example.hash.HashtableExample.QuadraticProbing< T >.QuadraticProbing | ( | int | b, |
int | c | ||
) |
Definition at line 108 of file HashtableExample.java.
long aud.example.hash.HashtableExample.QuadraticProbing< 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 116 of file HashtableExample.java.
String aud.example.hash.HashtableExample.QuadraticProbing< T >.toString | ( | ) |
Definition at line 120 of file HashtableExample.java.