public final class HashFunction extends Object
| 构造器和说明 |
|---|
HashFunction(int maxValue,
int nbHash,
String hasherName)
Constructor.
|
HashFunction(int maxValue,
int nbHash,
String hasherName,
Object hasherInitParams) |
public HashFunction(int maxValue,
int nbHash,
String hasherName)
Builds a hash function that must obey to a given maximum number of returned values and a highest value.
maxValue - The maximum highest returned value.nbHash - The number of resulting hashed values.hasherName - type of the hashing function (see Hasher).public void clear()
public int[] hash(Key k)
k - The specified key.Copyright © 2022. All rights reserved.