www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16282] New: Partial permutation/nextPermutation in

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

          Issue ID: 16282
           Summary: Partial permutation/nextPermutation in std.algorithm
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/library/std/algorithm/sorting.html
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: wyatt.epp gmail.com

It'd be nice to have a way to set k for n!/(n - k)!

std.algorithm.sorting.nextPermutation gives unique permutations (which is
nice), but it modifies in-place and returns a boolean. (Also, why is it in
sorting?)

std.algorithm.iteration.permutations actually returns the permutations, but
doesn't look for uniqueness AND has no other settings.

--
Jul 14 2016