|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--MADMethodHashFunction
IHashFunction implementation using the MAD method.
| Field Summary | |
protected int |
a
Multiplier for the MAD method. |
protected int |
b
Addend for the MAD method. |
protected int |
N
Length of the array for hashtable using this. |
| Constructor Summary | |
MADMethodHashFunction(int aLength,
int anA,
int aB)
Constructs a new hash function with the given array length. |
|
| Method Summary | |
int |
hash(Object aKey)
Returns the hash index for the given key object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int N
protected int a
protected int b
| Constructor Detail |
public MADMethodHashFunction(int aLength,
int anA,
int aB)
aLength - length of the arrayanA - multiplier for the MAD methodaB - addend for the MAD method| Method Detail |
public int hash(Object aKey)
hash in interface IHashFunctionaKey - key to hash
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||