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

Permutation #285

Closed
binh-vu opened this issue May 28, 2018 · 2 comments · Fixed by #292
Closed

Permutation #285

binh-vu opened this issue May 28, 2018 · 2 comments · Fixed by #292

Comments

@binh-vu
Copy link

binh-vu commented May 28, 2018

Hi,

Thank you for making this awesome library. It would be great if you can support permutate function like in python

Thanks!

@tobz1000
Copy link
Contributor

tobz1000 commented Jun 1, 2018

You should be able to get the same effect with repeat_n(iter, count).multi_cartesian_product().
That would repeat items within an iteration, e.g. "000", which permutations should exclude. So my suggestion is incorrect.

@tobz1000
Copy link
Contributor

I've implemented this function, and will put up a pull request soon, although I have no idea how long it'll be until merge.

In the meantime, you can use my branch in your Cargo.toml (or copy it to your fork) if you need it:

[dependencies]
itertools = { git = "https://github.com/tobz1000/rust-itertools", branch = "permutations" }

@tobz1000 tobz1000 mentioned this issue Jun 10, 2018
@bors bors bot closed this as completed in eb8f01e Sep 17, 2019
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 a pull request may close this issue.

2 participants