Tentative code change to better understand how to add tests to suffix_tree_rewrite branch.
Move howtocpp into its own directory and Makefile for compiling and testing it.
Move the suffix tree tests into the same file as the code to match edit_distance tests (yet to be merged).
Sort child nodes to bring closer to alignment with how Rust suffix trees print out, for testing.
Current unit tests:
[x] create_suffix_trees_1 for the string x
[ ] create_suffix_trees_1 for the string xaccxaca
Differs in child node IDs, I could use some help to know whether we should be changing Rust code to match CPP suffix tree node IDs, or whether it's more productive to instrument the Rust SuffixTree implementation to test the tree structure directly.
Expected CPP suffix tree printout
1 | | Root | Root | No SL | [5, 7, 9]
2 | cxaca | 3 | End | No SL | []
3 | cxaca | 3 | End | No SL | []
4 | cxaca | 3 | End | No SL | []
5 | c | 2 | 3 | 1 | [4, 6, 11]
6 | xaca | 4 | End | No SL | []
7 | xac | 0 | 3 | 9 | [2, 8]
8 | a | 7 | End | No SL | []
9 | ac | 1 | 3 | 5 | [3, 10]
10 | a | 7 | End | No SL | []
11 | a | 7 | End | No SL | []
Current Rust suffix tree printout
Suffix tree for: xaccxaca
1 | | Root | Root | No SL | [7, 9, 11]
2 | cxaca | 3 | End | No SL | []
3 | cxaca | 3 | End | No SL | []
4 | cxaca | 3 | End | No SL | []
5 | | 3 | 2 | No SL | [6, 4]
6 | xaca | 4 | End | No SL | []
7 | xac | 0 | 2 | 9 | [8, 2]
8 | a | 7 | End | No SL | []
9 | ac | 1 | 2 | 11 | [10, 3]
10 | a | 7 | End | No SL | []
11 | c | 2 | 2 | No SL | [12, 5]
12 | a | 7 | End | No SL | []
Tentative code change to better understand how to add tests to
suffix_tree_rewrite
branch.Move howtocpp into its own directory and Makefile for compiling and testing it. Move the suffix tree tests into the same file as the code to match edit_distance tests (yet to be merged).
Sort child nodes to bring closer to alignment with how Rust suffix trees print out, for testing.
Current unit tests:
create_suffix_trees_1
for the stringx
create_suffix_trees_1
for the stringxaccxaca
Differs in child node IDs, I could use some help to know whether we should be changing Rust code to match CPP suffix tree node IDs, or whether it's more productive to instrument the Rust
SuffixTree
implementation to test the tree structure directly.Expected CPP suffix tree printout
Current Rust suffix tree printout