Class | Hash |
In: |
multiset.rb
|
Parent: | Object |
selfを多重集合に変換し、その結果を返します。 キーを要素、キーに対応する値をその要素の要素数とします。
(例){:a => 4, :b => 2}.to_multiset # :aを4個、:bを2個含む多重集合
Generates multiset from self. Keys are treated as elements, and values are number of elements in the multiset. for example,
{:a => 4, :b => 2}.to_multiset # Multiset with four :a‘s and two :b‘s