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
A node of the trie.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract BitVector
extent
(TransformationStrategy<? super U> transform) abstract long
extentLength
(TransformationStrategy<? super U> transform) abstract BitVector
handle
(TransformationStrategy<? super U> transform) long
handleHash
(TransformationStrategy<? super U> transform) long
handleLength
(TransformationStrategy<? super U> transform) abstract boolean
intercepts
(long h) boolean
isExitNodeOf
(long length, long lcpLength, 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
(LongArrayBitVector v, TransformationStrategy<? super U> transform) Returns true if this node is the exit node of a string.boolean
boolean
isLeaf()
abstract BitVector
key
(TransformationStrategy<? super U> transform) leftLeaf()
toString()
toString
(TransformationStrategy<? super U> transform)
-
Field Details
-
nameLength
protected long nameLengthThe length of the name of the node.
-
-
Constructor Details
-
Node
protected Node()
-
-
Method Details
-
isLeaf
public boolean isLeaf() -
isInternal
public boolean isInternal() -
handleLength
-
key
-
handle
-
extentLength
-
extent
-
intercepts
public abstract boolean intercepts(long h) -
handleHash
-
isExitNodeOf
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, 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
-
rightLeaf
-
toString
-
toString
-