class MoreMath::Permutation

def invert!

(See Permutation#compose for an example.)
Switchtes this Permutation instance to the inverted permutation.
def invert!
  indices = unrank_indices(rank)
  inverted = Array.new(size)
  for i in 0...size
    inverted[indices[i]] = i
  end
  self.rank = rank_indices(inverted)
  self
end