You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `--algo` option can be used to pick the search algorithm. The default is 'greedy', unless `--brute` was specified, in which
123
+
case it's 'brutedp'. If you specify an invalid name here, you should get a list of valid options back.
124
+
121
125
## Python Superstring Library API
122
126
123
127
`generate_superstring(list) -> str`
@@ -132,6 +136,9 @@ cababababc
132
136
`brutedp(list) -> str`
133
137
: Given a substring-free list of strings, returns an optimal superstring as generated by brute-force dynamic-programming approach.
134
138
139
+
`brutedijkstra(list) -> str`
140
+
: Given a substring-free list of strings, returns an optimal superstring as generated by brute-force graph search using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm).
141
+
135
142
`make_substring_free(list) -> list`
136
143
: For Greedy to work as originally specified, its input must be _substring-free_ (aka _factor-free_), i.e contain no elements that are substrings of one another. This function will process a list to ensure this pre-condition is true.
137
144
@@ -151,7 +158,6 @@ res = ssp.generate_superstring(arr)
151
158
## TODO
152
159
153
160
* Verify that the type-spec in ssp.py is actually correct.
0 commit comments