MoreLINQ icon indicating copy to clipboard operation
MoreLINQ copied to clipboard

All possible combinations of N size

Open Kareltje1980 opened this issue 7 years ago • 4 comments

I actually downloaded morelinq for this, but found it did not include this.

Solution and example: https://stackoverflow.com/questions/33336540/how-to-use-linq-to-find-all-combinations-of-n-items-from-a-set-of-numbers

Kareltje1980 avatar Jan 18 '18 14:01 Kareltje1980

Best would be to nudge user109260 on stackoverflow.com to contribute here with tests.

atifaziz avatar Jan 19 '18 17:01 atifaziz

It would be useful to do this for permutations. Perhaps the methods are Combine and Permute with any overloads.

kcragin avatar Jul 13 '18 21:07 kcragin

@atifaziz Is this issue dead? I actually implemented this and a version with permutations only by hand and would gladly switch to a solid MoreLINQ implementation, or contribute my implementation here, but it seems there is a PR already only that it's stale.

V0ldek avatar May 07 '21 16:05 V0ldek

@V0ldek If you're talking about PR #647, it's not stale. It's blocked on bug fix for #645 that won't ship until the next major version where we can afford breaking changes. That said, there's nothing stopping from making the fix internal that later exposed through Subsets(0).

atifaziz avatar May 07 '21 17:05 atifaziz