Python-Suffix-Tree icon indicating copy to clipboard operation
Python-Suffix-Tree copied to clipboard

suffix link question in split_edge function

Open zhangliyong opened this issue 12 years ago • 1 comments

Hello,

I read your code and Mark Nelson's C++ implementation, and find that you both have the line: self.nodes[e.dest_node_index].suffix_node = suffix.source_node_index ### need to add node for each edge in _split_edge function, as you mentioned your implementation is based on Mark Nelson's one,

I don't understand why this line is needed, this line seems that a node have a suffix link pointing to its parent node, and this seams not the suffix link meaning.

zhangliyong avatar May 26 '13 10:05 zhangliyong

this can be delete ?

because , in while loop , self.nodes[last_parent_node].suffix_node = parent_node And I don't find a string to make test failed after delelte this line.

jiamo avatar Jul 26 '14 16:07 jiamo