inverse method
Returns the permutation that restores this permutation's input order.
Implementation
PermutationDescriptor inverse() {
final inverseSources = List<int>.filled(length, 0);
for (var outputIndex = 0; outputIndex < length; outputIndex++) {
inverseSources[_sourceIndices[outputIndex]] = outputIndex;
}
return PermutationDescriptor(inverseSources);
}