Package it.unimi.dsi.sux4j.util
Class ZFastTrie.Node<U>
- java.lang.Object
-
- it.unimi.dsi.sux4j.util.ZFastTrie.Node<U>
-
- Direct Known Subclasses:
ZFastTrie.InternalNode
,ZFastTrie.Leaf
protected abstract static class ZFastTrie.Node<U> extends java.lang.Object
A node of the trie.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
nameLength
The length of the name of the node.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Node()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract it.unimi.dsi.bits.BitVector
extent(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
abstract long
extentLength(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
abstract it.unimi.dsi.bits.BitVector
handle(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
long
handleHash(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
long
handleLength(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
abstract boolean
intercepts(long h)
boolean
isExitNodeOf(long length, long lcpLength, it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
Returns true if this node is the exit node of a string given its length and the length of the longest common prefix with the node extent.boolean
isExitNodeOf(it.unimi.dsi.bits.LongArrayBitVector v, it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
Returns true if this node is the exit node of a string.boolean
isInternal()
boolean
isLeaf()
abstract it.unimi.dsi.bits.BitVector
key(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
ZFastTrie.Leaf<U>
leftLeaf()
ZFastTrie.Leaf<U>
rightLeaf()
java.lang.String
toString()
java.lang.String
toString(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
-
-
Method Detail
-
isLeaf
public boolean isLeaf()
-
isInternal
public boolean isInternal()
-
handleLength
public long handleLength(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
key
public abstract it.unimi.dsi.bits.BitVector key(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
handle
public abstract it.unimi.dsi.bits.BitVector handle(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
extentLength
public abstract long extentLength(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
extent
public abstract it.unimi.dsi.bits.BitVector extent(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
intercepts
public abstract boolean intercepts(long h)
-
handleHash
public long handleHash(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
isExitNodeOf
public boolean isExitNodeOf(it.unimi.dsi.bits.LongArrayBitVector v, it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
Returns true if this node is the exit node of a string.- Parameters:
v
- the string.transform
- the transformation strategy used to build the trie this node belongs to.- Returns:
- true if the string exits at this node.
-
isExitNodeOf
public boolean isExitNodeOf(long length, long lcpLength, it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
Returns true if this node is the exit node of a string given its length and the length of the longest common prefix with the node extent.- Parameters:
length
- the length of a string.lcpLength
- the length of the longest common prefix between the string and the extent of this node.transform
- the transformation strategy used to build the trie this node belongs to.- Returns:
- true if the string exits at this node.
-
leftLeaf
public ZFastTrie.Leaf<U> leftLeaf()
-
rightLeaf
public ZFastTrie.Leaf<U> rightLeaf()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(it.unimi.dsi.bits.TransformationStrategy<? super U> transform)
-
-