Skip to content

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

@CyberShadow CyberShadow force-pushed the pull-20150710-071447 branch from 6284639 to bd053c1 Compare July 10, 2015 07:37
@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 CyberShadow force-pushed the pull-20150710-071447 branch from bd053c1 to 6079e23 Compare July 12, 2015 03:39
@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
Development

Successfully merging this pull request may close these issues.

3 participants