class MoreMath::Permutation
def self.from_value(indices)
in the range of
0
and indices.size - 1
. This isindices
, that should consist of a permutation of FixnumsCreates a new Permutation instance from the Array
def self.from_value(indices) obj = new(indices.size) obj.instance_eval do self.rank = rank_indices(indices) end obj end