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

std.algorithm.iteration: Add permutations #3482

Merged
merged 1 commit into from Jul 12, 2015

Conversation

CyberShadow
Copy link
Member

https://issues.dlang.org/show_bug.cgi?id=13596

A range which lazily computes all permutations of its input using Heap's algorithm.

Not sure if this is the best module for it though.

@DmitryOlshansky
Copy link
Member

I swear I've seen it somewhere. nextPermutation or so

@CyberShadow
Copy link
Member Author

Yep, but that's not a range.

Forgot to add See_Also though, fair remark

@MetaLang
Copy link
Member

Wouldn't it make sense to implement this in terms of nextPermutation?

@CyberShadow
Copy link
Member Author

nextPermutation does a lot more work because it does a different thing (next lexicographical permutation).

@DmitryOlshansky
Copy link
Member

Please add "fix issue 13596" to commit message and let's merge it.

@CyberShadow
Copy link
Member Author

Done

@DmitryOlshansky
Copy link
Member

Auto-merge toggled on

DmitryOlshansky added a commit that referenced this pull request Jul 12, 2015
std.algorithm.iteration: Add permutations
@DmitryOlshansky DmitryOlshansky merged commit 6a595fb into dlang:master Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants