Actions
Feature #10726
open[PATCH 4/4] * New methods: Set#power
Feature #10726:
[PATCH 4/4] * New methods: Set#power
Status:
Open
Assignee:
-
Target version:
-
Description
Files
Actions
Added by gogotanaka (Kazuki Tanaka) over 11 years ago. Updated over 11 years ago.
Description
Files
| implement_set#power.patch (1007 Bytes) implement_set#power.patch | gogotanaka (Kazuki Tanaka), 01/10/2015 01:17 AM | ||
| update_test_set.rb.patch (838 Bytes) update_test_set.rb.patch | gogotanaka (Kazuki Tanaka), 01/10/2015 01:17 AM | ||
| update_NEWS.patch (672 Bytes) update_NEWS.patch | gogotanaka (Kazuki Tanaka), 01/10/2015 01:17 AM | ||
| fix_indent_NEWS.patch (888 Bytes) fix_indent_NEWS.patch | gogotanaka (Kazuki Tanaka), 01/10/2015 01:17 AM | ||
| implement_set_powerset.patch (1.96 KB) implement_set_powerset.patch | gogotanaka (Kazuki Tanaka), 01/27/2015 05:48 PM |
ping
Moreover, the implementation could be improved.
powerset or power_set would be a more appropriate name.
I don't see myself ever using this and also wonder who would and in what circumstances.
@ Shota Fukumori, @Marc-Andre Lafortune
- Write description of your proposal in the ticket.
Implement method which returns set of all subsets of +self+.
- What is your use case?
I don't see myself ever using this and also wonder who would and in what circumstances.
As for me it was necessary for solving some combinational problem or optimization.
I believe power set is essential with collection of unordered values with no duplicates.
But if you guys think It isn't worth it, I'm ok in that case.
- I think there's no need to split patches for same purpose... at this case patch except the last one should be one patch file.
powerset or power_set would be a more appropriate name.
OK I'm gonna resend patch in doing so.
It is a well defined mathematical operation but it seems to me it has a very narrow usage.
IMHO, maybe such functionality would fit better in a separate gem. There are other well defined mathematical set operations and if they all ended up on standard Set, it would get pretty bloated.