public final class UniversalHashFunction
extends java.lang.Object
| Constructor and Description |
|---|
UniversalHashFunction(int hashWidth)
This constructor creates a new hash function with the specified hash width and the default
word width (32 bits).
|
UniversalHashFunction(int wordWidth,
int hashWidth)
This constructor creates a new hash function with the specified hash width and the default
word width (32 bits).
|
| Modifier and Type | Method and Description |
|---|---|
int |
hashValue(java.lang.Object object)
This method generates a hash value for the specified object using the universal hash
function parameters specified in the constructor.
|
public UniversalHashFunction(int hashWidth)
hashWidth - The number of bits required of the hash for the index size. In general,
this will be the log base 2 of the number of buckets in the hash table (must be a power of
2).public UniversalHashFunction(int wordWidth,
int hashWidth)
wordWidth - The number of bits in the word size for the environment (32 for Java ints).hashWidth - The number of bits required of the hash for the index size. In general,
this will be the log base 2 of the number of buckets in the hash table (must be a power of
2).public int hashValue(java.lang.Object object)
object - The object to be hashed.Copyright © 2014 Crater Dog Technologies(TM). All rights reserved.