public class OpenHashFunctionDouble<E> extends java.lang.Object implements OpenHashFunction<E>
Constructor and Description |
---|
OpenHashFunctionDouble(int tableSize)
Provides a hash function for hash table with open addressing, for a given
table size.
|
Modifier and Type | Method and Description |
---|---|
int |
hashValue(E e,
int i)
Reports the hash value for a given value and probe index
|
public OpenHashFunctionDouble(int tableSize) throws java.lang.IllegalArgumentException
tableSize
- the size of the hash table being supportedjava.lang.IllegalArgumentException
- if the input table size is not psitive
public int hashValue(E e, int i)
OpenHashFunction
hashValue
in interface OpenHashFunction<E>
e
- the element whose has value is to be providedi
- the index of probe for which a has value is being returned