soraismus / morelinq

Automatically exported from code.google.com/p/morelinq
Apache License 2.0
0 stars 0 forks source link

Review: MoreEnumerable.PermutedSubsets() #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of code changes on this branch:

Rev 122: Implementation of the PermutedSubsets() extension method which
efficiently generates the set of all permutations of the set of all subsets
of a sequence. An overload is provided that restricts the results to only
subsets of a given size. The implementation is built by iteratively
composing the Subsets() and Permutations() operators.

When reviewing my code changes, please focus on:

* The public interface of the extension method.
* The effectiveness and clarity of the available XML comment documentation.
* How well this operator fits into the MoreLINQ ecosystem of
extension methods.
* The extent of coverage available from the corresponding unit tests.
* Whether edge cases are correctly identified and handled in the
implementation and tests.

After the review, I'll merge this branch into:
/trunk

Original issue reported on code.google.com by ambientl...@gmail.com on 17 Jan 2010 at 5:09

GoogleCodeExporter commented 9 years ago
Now migrated to Hg and available in clone:
http://code.google.com/r/azizatif-morelinq-evenmore/
This clone is ready to be cloned :O) for further review. It also has the 
main/default branch already merged in to bring it up to date.

Original comment by azizatif on 25 May 2012 at 11:38

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 10 Jun 2012 at 10:36

GoogleCodeExporter commented 9 years ago
This can be implemented too simply as a composition of Subsets and SelectMany 
to warrant a separate operator:
sequence.Subsets(size).SelectMany(subset => subset.Permutations())

Original comment by azizatif on 10 Jun 2012 at 10:38