|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<K>
it.unimi.dsi.sux4j.mph.AbstractHashFunction<T>
it.unimi.dsi.sux4j.mph.LcpMonotoneMinimalPerfectHashFunction<T>
public class LcpMonotoneMinimalPerfectHashFunction<T>
A monotone minimal perfect hash implementation based on fixed-size bucketing that uses longest common prefixes as distributors.
Field Summary | |
---|---|
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
Fast.ceilLog2(int) of bucketSize . |
protected int |
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. |
Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction |
---|
defRetValue |
Constructor Summary | |
---|---|
LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
int numElements,
TransformationStrategy<? super T> transform)
|
|
LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
TransformationStrategy<? super T> transform)
|
Method Summary | |
---|---|
long |
getLong(Object o)
|
boolean |
hasTerms()
|
static void |
main(String[] arg)
|
long |
numBits()
Returns the number of bits used by this structure. |
int |
size()
Returns the number of terms hashed. |
Methods inherited from class it.unimi.dsi.sux4j.mph.AbstractHashFunction |
---|
containsKey |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction |
---|
clear, defaultReturnValue, defaultReturnValue, get, put, put, remove, removeLong |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
protected final int n
protected final int bucketSize
protected final int log2BucketSize
Fast.ceilLog2(int)
of bucketSize
.
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
Constructor Detail |
---|
public LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable, TransformationStrategy<? super T> transform) throws IOException
IOException
public LcpMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable, int numElements, TransformationStrategy<? super T> transform) throws IOException
IOException
Method Detail |
---|
public long getLong(Object o)
getLong
in interface Object2LongFunction<T>
public int size()
size
in interface Function<T,Long>
size
in class AbstractHashFunction<T>
public long numBits()
public boolean hasTerms()
public static void main(String[] arg) throws NoSuchMethodException, IOException, JSAPException
NoSuchMethodException
IOException
JSAPException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |