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

Feature/Optimize combination helpers #36

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Conversation

jsconan
Copy link
Collaborator

@jsconan jsconan commented Oct 19, 2023

Rewrite the combination helpers in a more efficient way.

They now expect values starting at 0. This will allow using the helpers with indices instead of final values.
The combinations are sorted in lexicographic order but right-to-left instead of left-to-right. This simplifies the signature as the number of possible values is no longer required.

Algorithms have been borrowed and optimized from:

@jsconan jsconan merged commit fce1c34 into develop Oct 19, 2023
@jsconan jsconan deleted the feature/optimize-combinations branch October 19, 2023 20:39
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

Successfully merging this pull request may close these issues.

1 participant