Computes the path label as a list of NonRootNode
Computes the path label as a list of NonRootNode
Beware, labels of these nodes might include special upper limits such as the END constant.
Computes the path label as a list of definitive labels given a function to get the length of a sequence from its ID
Walks down the tree following the sequence until a mismatch occurs
Walks down the tree following the sequence until a mismatch occurs
It dissociates the following cases:
the searched sequence
the first index of search in the sequence (inclusive)
the last index of search in the sequence (inclusive)
retrieves efficiently the first item in the edge label to the given node
retrieves efficiently the ith item in the edge label to the given node
computes efficiently the length of the edge label to the given node
None if the sequence is not partially in the tree, else a triple containing 1) the non-root node at or below the unmatch or the end of the sequence happened, 2) the number of character left in the given sequence and 3) the number of character left to reach the non-root node (0 means "perfect match")
Computes the child node of this node which edge-label starts with the given item
Depth-first number
Finds the path end following a sequence (given as a global sequence, the starting and end indexes of the subsequence to search) from the root node if it exists
Finds the path end following a sequence (given as a global sequence, the starting and end indexes of the subsequence to search) from the root node if it exists
the global sequence that contains the searched subsequence
the start index in the global sequence of the first character of the searched subsequence
the end index in the global sequence of the last character of the searched subsequence
a function that given a NonRootNode retrieves efficiently the first item of the edge-label conducting to the given node in the tree
a function that retrieves efficiently the ith item in the edge label to the given node
a function that given a NonRootNode computes the length of the edge-label conducting to this node in the tree
an optional pair containing the NonRootNode which path-label includes the searched subsequence along with the number of item that are in the path-label and not in the searched subsequence (i.e., the gap between the end of the search subsequence in the path-label to reach the node)
Walks down from this node following the given sequence
Walks down from this node following the given sequence
the searched sequence
the first index of search in the sequence (inclusive)
the last index of search in the sequence (inclusive)
current index of the end (i in suffix S[j..i] of phase i)
computes the first item of a label
a pair (node, length) containing the node which path label contains sequence s, and the number of items left in the path to arrive to the node (0 means a perfect match)
walkDown is overriden by 'NonRootNode'
A node of a tree.