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

IdConverter size #25

Open
faassen opened this issue Jan 10, 2025 · 1 comment
Open

IdConverter size #25

faassen opened this issue Jan 10, 2025 · 1 comment

Comments

@faassen
Copy link
Collaborator

faassen commented Jan 10, 2025

IdConverter takes a size argument, but since the id converter doesn't restrict the alphabet, cannot size be automatically determined from the size of T?

If IdConverter is restricted to take a character T and Character is expanded to take num_traits::Bounded we could use T::max_value(), I think.

Since FmIndex already is restricted by Character I think it's fine to restrict IdConverter with it too (it isn't currently).

I don't think it's likely people will implement their own implementation of the Character trait that isn't bounded, right? (or at all)

@ajalab
Copy link
Owner

ajalab commented Jan 11, 2025

I agree, we should be able to assume that the size of the character T is always bounded.

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

2 participants