![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
Collision handling by linear probing h(x,i)=h(x)+i*b
More...
Public Member Functions | |
LinearProbing () | |
LinearProbing (int b) | |
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 linear probing h(x,i)=h(x)+i*b
Definition at line 84 of file HashtableExample.java.
Definition at line 86 of file HashtableExample.java.
aud.example.hash.HashtableExample.LinearProbing< T >.LinearProbing | ( | int | b | ) |
Definition at line 87 of file HashtableExample.java.
long aud.example.hash.HashtableExample.LinearProbing< 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 94 of file HashtableExample.java.
String aud.example.hash.HashtableExample.LinearProbing< T >.toString | ( | ) |
Definition at line 98 of file HashtableExample.java.