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

Specialize CombinationsWithReplacement::nth #923

Commits on Apr 25, 2024

  1. CombinationsWithReplacement::increment_indices

    Steal how `next` increment indices, a bit improved.
    It will soon be used in `nth` (and more later).
    Philippe-Cholet committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    8459f93 View commit details
    Browse the repository at this point in the history
  2. Update CombinationsWithReplacement::next (1)

    Use the new `increment_indices`. This is done in a different commit because the git difference was difficult to read.
    Philippe-Cholet committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    271b55f View commit details
    Browse the repository at this point in the history
  3. Update CombinationsWithReplacement::next (2)

    Use `pool.get_at` once! That way, `next` and `nth` will ressemble each other.
    Philippe-Cholet committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    a04e0bc View commit details
    Browse the repository at this point in the history
  4. Specialize CombinationsWithReplacement::nth

    Similar to `next` except we increment indices n times before generating the vector item.
    Philippe-Cholet committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    a250651 View commit details
    Browse the repository at this point in the history