Feature #10726
open[PATCH 4/4] * New methods: Set#power
Description
Hi, there.
Here are 4 patches.
implement_set#power.patch ... Implement Set#power
update_test_set.rb.patch  ... Add tests for Set#power
update_NEWS.patch         ... Update NEWS for Set#power
fix_indent_NEWS.patch     ... Adjustment indent of NEWS
take your time.
gogo.
Files
        
           Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          
          
        
        
      
      ping
        
           Updated by sorah (Sorah Fukumori) almost 11 years ago
          Updated by sorah (Sorah Fukumori) almost 11 years ago
          
          
        
        
      
      - Write description of your proposal in the ticket.
- What is your use 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.
        
           Updated by marcandre (Marc-Andre Lafortune) almost 11 years ago
          Updated by marcandre (Marc-Andre Lafortune) almost 11 years ago
          
          
        
        
      
      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.
        
           Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          
          
        
        
      
      @ 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.
        
           Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          Updated by gogotanaka (Kazuki Tanaka) almost 11 years ago
          
          
        
        
      
      
    
        
           Updated by radan (Radan Skorić) almost 11 years ago
          Updated by radan (Radan Skorić) almost 11 years ago
          
          
        
        
      
      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.