From eff620948c6140fea0d15f7e63055550a278a9bf Mon Sep 17 00:00:00 2001 From: akiyamn Date: Thu, 22 Apr 2021 11:23:47 +1000 Subject: Ass 2 - Ukkonen 2: Electric Boogaloo --- ass2/q2/suffix_array.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ass2/q2/suffix_array.py') diff --git a/ass2/q2/suffix_array.py b/ass2/q2/suffix_array.py index db22c3e..eccc99e 100644 --- a/ass2/q2/suffix_array.py +++ b/ass2/q2/suffix_array.py @@ -159,6 +159,7 @@ def suffix_tree(string): Node.global_end += 1 # Rule 1s implicitly for j in range(last_j + 1, i + 1): print(string[0:i + 1], end=": ") + print(active_node, active_edge, active_length) # if 2 or more letter string, just match the last character at the current position (we already went # there) i.e. i i think char = string[i] if i - j <= 1 else string[i] @@ -196,4 +197,4 @@ def suffix_tree(string): print("\n" * 10) -suffix_tree("abacabad$") +suffix_tree("abcabxabcd") -- cgit v1.2.3