Computes the cycle decomposition for a permutation
npm install cycle-decomposition
The main function in this library takes a length n permutation represented as a sequence of integers from 0 to n-1 describing how the permutation acts on a finite set according to the rule
i --> permutation[i].
permutationis a permutation
Returns A list of cycles.
(c) 2013-2014 Mikola Lysenko. MIT License