class SuffixTree::ActivePoint
Active point rules 1) If rule 3 extension is applied then active length will increment by 1 if active length is
not greater then length of path on edge.
2) If rule 3 extension is applied and if active length gets greater than length path of edge
then change active node, active edge and active length
3) If active length is 0 then always start looking for the character from root. 4) If rule 2 extension is applied and if active node is root then active edge is active edge + 1
and active length is active lenght -1
5) If rule 2 extension is applied and if active node is not root then follow suffix link and
make active node as suffix link and do no change anything.
Attributes
edge[RW]
length[RW]
node[RW]
Public Class Methods
new(node)
click to toggle source
# File lib/suffix_tree/active_point.rb, line 25 def initialize(node) @length = 0 @edge = -1 @node = node end