diff options
| author | akiyamn | 2021-04-30 11:49:04 +1000 |
|---|---|---|
| committer | akiyamn | 2021-04-30 11:49:04 +1000 |
| commit | 8159731e3a51027c44486caaa4458d9214753d43 (patch) | |
| tree | ece3f2119b0691ab4a6824e6de961547de8bf661 /ass2/ukkonen.py | |
| parent | 3ec37656910e3c71569408bd9be2dfa8db06efc2 (diff) | |
| download | fit3155-8159731e3a51027c44486caaa4458d9214753d43.tar.gz fit3155-8159731e3a51027c44486caaa4458d9214753d43.zip | |
Ass 2: Almost done
Diffstat (limited to 'ass2/ukkonen.py')
| -rw-r--r-- | ass2/ukkonen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ass2/ukkonen.py b/ass2/ukkonen.py index 8d536c5..b4b0b98 100644 --- a/ass2/ukkonen.py +++ b/ass2/ukkonen.py @@ -199,8 +199,8 @@ def do_phase(root: Node, active: Point, i, last_j, remainder): active = skip_count(remainder, Point(root), i - remainder) last_j = j j += 1 - print(active) - root.print_tree() + # print(active) + # root.print_tree() return active, remainder, last_j @@ -238,7 +238,7 @@ def skip_count(num_chars, start_point: Point, index): direction = Node.string[index] next_node = head.node.get_child(direction) if next_node is None: - raise Exception(f"Attempted to traverse char\n '{direction}' at point {head}. ({index=})") + raise IndexError(f"Attempted to traverse char\n '{direction}' at point {head}. ({index=})") incoming_length = next_node.edge_length if chars_left < incoming_length: break |
