public class ZFastTrieDistributorMonotoneMinimalPerfectHashFunction<T> extends AbstractHashFunction<T> implements Serializable
See the package overview for a comparison with other implementations.
Similarly to a GOV3Function, an instance of this class may be signed.
| Modifier and Type | Class and Description |
|---|---|
static class |
ZFastTrieDistributorMonotoneMinimalPerfectHashFunction.Builder<T>
A builder class for
ZFastTrieDistributorMonotoneMinimalPerfectHashFunction. |
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
protected long |
signatureMask
The mask to compare signatures, or zero for no signatures.
|
protected LongBigList |
signatures
The signatures.
|
defRetValue| Modifier | Constructor and Description |
|---|---|
protected |
ZFastTrieDistributorMonotoneMinimalPerfectHashFunction(Iterable<? extends T> keys,
TransformationStrategy<? super T> transform,
int log2BucketSize,
int signatureWidth,
File tempDir)
Creates a new monotone minimal perfect hash function based on a z-fast trie distributor using the given
keys, transformation strategy and bucket size.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLong(Object o) |
static void |
main(String[] arg) |
long |
numBits() |
long |
size64() |
containsKey, sizeclear, defaultReturnValue, defaultReturnValue, get, put, put, remove, removeLongpublic static final long serialVersionUID
protected final long signatureMask
protected final LongBigList signatures
protected ZFastTrieDistributorMonotoneMinimalPerfectHashFunction(Iterable<? extends T> keys, TransformationStrategy<? super T> transform, int log2BucketSize, int signatureWidth, File tempDir) throws IOException
keys - the keys among which the trie must be able to rank.transform - a transformation strategy that must turn the keys into a list of
distinct, prefix-free, lexicographically increasing (in iteration order) bit vectors.log2BucketSize - the logarithm of the bucket size, or -1 for the default value.signatureWidth - a signature width, or 0 for no signature.tempDir - a temporary directory for the store files, or null for the standard temporary directory.IOExceptionpublic long getLong(Object o)
getLong in interface Object2LongFunction<T>public long size64()
size64 in interface Size64size64 in class AbstractHashFunction<T>public long numBits()
public static void main(String[] arg) throws NoSuchMethodException, IOException, JSAPException