A package for creating "online generalized suffix trees" for fast retrieval. It creates a tree based index out of a set of strings and then provides methods for fast retrieval.
Main methods are 'Add' and 'Search':
Add
: adds the given string in the generalized suffix tree with a given key, this key is used for identifying the string uniquelySearch
: searches for a input string in the generalized suffix tree and returns all the strings which contains this input string
In particular, after Add(K, V)
, Search(H)
will return a set containing V
for any string H
that is substring of K
.
Time Complexity is O(m)
Remove
method- Test cases