Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

construct "BANANA" returns an incorrect result #4

Open
GregorySchwartz opened this issue Apr 26, 2016 · 3 comments
Open

construct "BANANA" returns an incorrect result #4

GregorySchwartz opened this issue Apr 26, 2016 · 3 comments

Comments

@GregorySchwartz
Copy link

The result of construct "BANANA" returns a different result than the classic example, as shown in https://upload.wikimedia.org/wikipedia/commons/d/d2/Suffix_tree_BANANA.svg on Wikipedia. Is this expected behavior? How would this differ from the classical suffix tree?

@GregorySchwartz
Copy link
Author

Actually, I half take it back. construct "BANANA$" does in fact work, but shouldn't the terminator always be taken into account?

@srhb
Copy link

srhb commented Apr 27, 2016

I think that construct, given a non-unique terminating character, simply ends up constructing the implicit suffix tree.

@xogcox
Copy link

xogcox commented Nov 26, 2020

I think that construct, given a non-unique terminating character, simply ends up constructing the implicit suffix tree.

Yes, the example in examples/UniqueMatch.hs suggests that users are expected to add a terminating character. It would probably be a good idea to either fix this so that the terminating character is added automatically, or document that it is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants