|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.mg4j.util.ImmutableBinaryTrie
dsiutils
.
@Deprecated public class ImmutableBinaryTrie
An immutable implementation of binary tries.
Instance of this class are built starting from a lexicographically ordered
list of BitVector
s representing binary words. Each word
is assigned its position (starting from 0) in the list. The words are then organised in a
binary trie with path compression.
Once the trie has been built, it is possible to ask whether a word w is contained in the trie (getting back its position in the list), the interval given by the words extending w and the approximated interval defined by w.
Nested Class Summary | |
---|---|
protected static class |
ImmutableBinaryTrie.Node
Deprecated. A node in the trie. |
Field Summary | |
---|---|
protected ImmutableBinaryTrie.Node |
root
Deprecated. The root of the trie. |
static long |
serialVersionUID
Deprecated. |
Constructor Summary | |
---|---|
ImmutableBinaryTrie(List<BitVector> words)
Deprecated. Creates a trie from a list of binary words. |
Method Summary | |
---|---|
int |
get(BitVector word)
Deprecated. Return the index of the specified word, or -1 if the word is not this trie. |
int |
get(BooleanIterator iterator)
Deprecated. Return the index of the word returned by the given iterator, or -1 if the word is not this trie. |
Interval |
getApproximatedInterval(BitVector word)
Deprecated. Returns an approximated prefix interval around the specified word. |
Interval |
getApproximatedInterval(BooleanIterator iterator)
Deprecated. Returns an approximated prefix interval around the word returned by the specified iterator. |
Interval |
getInterval(BitVector word)
Deprecated. Returns an interval given by the smallest and the largest word in the trie starting with the specified word. |
Interval |
getInterval(BooleanIterator iterator)
Deprecated. Returns an interval given by the smallest and the largest word in the trie starting with the word returned by the given iterator. |
int |
size()
Deprecated. Returns the number of binary words in this trie. |
String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
protected final ImmutableBinaryTrie.Node root
Constructor Detail |
---|
public ImmutableBinaryTrie(List<BitVector> words)
words
- a list of distinct, lexicographically increasing binary words.Method Detail |
---|
public int size()
public int get(BitVector word)
word
- a word.
get(BooleanIterator)
public int get(BooleanIterator iterator)
iterator
- a boolean iterator that will be used to find a word in this trie.
get(BitVector)
public Interval getInterval(BitVector word)
word
- a word.
word
(thus, the empty inteval
if no such words exist).getInterval(BooleanIterator)
public Interval getInterval(BooleanIterator iterator)
iterator
- an iterator.
iterator
(thus, the empty inteval
if no such words exist).getInterval(BitVector)
public Interval getApproximatedInterval(BitVector word)
word
- a word.
word
would be in the word interval given by
the left extreme of the Interval
returned by this method, whereas
the last word extending word
would be in the word
interval given by the right extreme of the Interval
returned by this method.getApproximatedInterval(BooleanIterator)
public Interval getApproximatedInterval(BooleanIterator iterator)
iterator
- an iterator.
word
would be in the word interval given by
the left extreme of the Interval
returned by this method, whereas
the last word extending word
would be in the word
interval given by the right extreme of the Interval
returned by this method.getApproximatedInterval(BitVector)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |