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

Adding support for partial permutations #3523

Merged
merged 2 commits into from
Jun 3, 2023

Commits on Jun 1, 2023

  1. Adding support for partial permutations

    Adding length parameter (defaults to list size) to the permutations function, providing the opportunity of creating exhaustives of partial permutations/k-permutations.
    
    Also, changed the assertion of the full permutations test from shouldBe to shouldContainExactlyInAnyOrder, as the order in which the permutations come are not (should not be) relevant. This also makes the test less dependent on the underlying implementation.
    
    The empty list check was removed, as an empty list will result in a list of an empty list (as with all permutations of length 0).
    
    This commit does break binary compatibility, due to adding the length parameter.
    mickeelm committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    e7610ef View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2023

  1. Configuration menu
    Copy the full SHA
    f1affd4 View commit details
    Browse the repository at this point in the history