public class LcpMonotoneMinimalPerfectHashFunction<T> extends AbstractHashFunction<T> implements Size64, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
bucketSize
The size of a bucket.
|
protected int |
bucketSizeMask
The mask for
log2BucketSize bits. |
protected MWHCFunction<BitVector> |
lcp2Bucket
A function mapping each longest common prefix to its bucket.
|
protected int |
log2BucketSize
|
protected long |
n
The number of elements.
|
protected MWHCFunction<BitVector> |
offsetLcpLength
A function mapping each element to the offset inside its bucket (lowest
log2BucketSize bits) and
to the length of the longest common prefix of its bucket (remaining bits). |
static long |
serialVersionUID |
protected TransformationStrategy<? super T> |
transform
The transformation strategy.
|
defRetValue| Constructor and Description |
|---|
LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
int numElements,
TransformationStrategy<? super T> transform) |
LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
long numElements,
TransformationStrategy<? super T> transform) |
LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
TransformationStrategy<? super T> transform) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLong(Object o) |
boolean |
hasTerms() |
static void |
main(String[] arg) |
long |
numBits()
Returns the number of bits used by this structure.
|
long |
size64() |
containsKey, sizeclear, defaultReturnValue, defaultReturnValue, get, put, put, remove, removeLongpublic static final long serialVersionUID
protected final long n
protected final int bucketSize
protected final int log2BucketSize
protected final int bucketSizeMask
log2BucketSize bits.protected final MWHCFunction<BitVector> offsetLcpLength
log2BucketSize bits) and
to the length of the longest common prefix of its bucket (remaining bits).protected final MWHCFunction<BitVector> lcp2Bucket
protected final TransformationStrategy<? super T> transform
public LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable, TransformationStrategy<? super T> transform) throws IOException
IOExceptionpublic LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable, int numElements, TransformationStrategy<? super T> transform) throws IOException
IOExceptionpublic LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable, long numElements, TransformationStrategy<? super T> transform) throws IOException
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 boolean hasTerms()
public static void main(String[] arg) throws NoSuchMethodException, IOException, JSAPException