it.unimi.dsi.sux4j.mph
Class HollowTrieMonotoneMinimalPerfectHashFunction<T>
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<K>
it.unimi.dsi.sux4j.mph.AbstractHashFunction<T>
it.unimi.dsi.sux4j.mph.HollowTrieMonotoneMinimalPerfectHashFunction<T>
- All Implemented Interfaces:
- Function<T,Long>, Object2LongFunction<T>, Serializable
public class HollowTrieMonotoneMinimalPerfectHashFunction<T>
- extends AbstractHashFunction<T>
- implements Serializable
A hollow trie, that is, a compacted trie recording just the length of the paths associated to the internal nodes.
Instances of this class can be used to compute a monotone minimal perfect hashing of the keys.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
skips
protected EliasFanoLongBigList skips
trie
protected final LongArrayBitVector trie
- The bit vector containing Jacobson's representation of the trie.
balParen
protected JacobsonBalancedParentheses balParen
- A balanced parentheses structure over
trie
.
HollowTrieMonotoneMinimalPerfectHashFunction
public HollowTrieMonotoneMinimalPerfectHashFunction(Iterable<? extends T> iterable,
TransformationStrategy<? super T> transform)
HollowTrieMonotoneMinimalPerfectHashFunction
public HollowTrieMonotoneMinimalPerfectHashFunction(Iterator<? extends T> iterator,
TransformationStrategy<? super T> transform)
getLong
public long getLong(Object object)
- Specified by:
getLong
in interface Object2LongFunction<T>
size
public int size()
- Specified by:
size
in interface Function<T,Long>
- Overrides:
size
in class AbstractHashFunction<T>
numBits
public long numBits()
main
public static void main(String[] arg)
throws NoSuchMethodException,
IOException,
JSAPException
- Throws:
NoSuchMethodException
IOException
JSAPException