AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
aud.example.hash.CollisionHandler< T > Class Template Referenceabstract

Collision handling strategy in SimpleHashtable. More...

+ Inheritance diagram for aud.example.hash.CollisionHandler< T >:

Public Member Functions

abstract long newHash (SimpleHashtable< T > table, T key, long h, int count)
 Handle collision by computing a new hash value. More...
 

Detailed Description

Collision handling strategy in SimpleHashtable.

Definition at line 6 of file CollisionHandler.java.

Member Function Documentation

◆ newHash()

abstract long aud.example.hash.CollisionHandler< T >.newHash ( SimpleHashtable< T >  table,
key,
long  h,
int  count 
)
abstract

Handle collision by computing a new hash value.

Parameters
tablehash table
keynew entry that is to be inserted but caused the collision
hpreviously used hash value
countiteration count for collision handling starting with 1 (=first collision)
Returns
new hash value

Reimplemented in aud.example.hash.HashtableExample.LinearProbing< T >, aud.example.hash.HashtableExample.QuadraticProbing< T >, and aud.example.hash.HashtableExample.DoubleHashing< T >.


The documentation for this class was generated from the following file: