Method: Array#permutation
- Defined in:
- lib/inochi/util/combo.rb
#permutation(sample_size = self.length, &sampler) ⇒ Object
Returns all possible permutations made from sample_size number of items from this list.
Parameters
- sample_size
-
The length of each permutation.
- sampler
-
If given, each permutation is passed to this block.
102 103 104 |
# File 'lib/inochi/util/combo.rb', line 102 def permutation(sample_size = self.length, &sampler) pnk_cnk_impl(sample_size, false, &sampler) end |