public class HashFunction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Hash |
hashAlgorithm
Hashing algorithm to use.
|
protected int |
maxValue
The maximum highest returned value.
|
protected int |
nbHash
The number of hashed values.
|
Constructor and Description |
---|
HashFunction(int maxValue,
int nbHash,
int hashAlgorithm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this hash function.
|
int[] |
hash(org.apache.hadoop.util.bloom.Key k)
Hashes a specified key into several integers.
|
protected int nbHash
protected int maxValue
protected Hash hashAlgorithm
public HashFunction(int maxValue, int nbHash, int hashAlgorithm)
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.hashAlgorithm
- type of the hashing algorithm (see Hash
).Copyright © 2007-2025 The Apache Software Foundation