permutation – Permutation class for Ruby
Description
This class has a dual purpose: It can be used to create permutations of a given size and to do some simple computations with/on permutations.
The instances of this class don't require much memory because they don't include the permutation as a data structure. They only save the information necessary to create the permutation if asked to do so.Installation
The library can be installed via rubygems:
# gem install permutation
The gem and the source archive can also be downloaded directly from rubyforge.org.