PermutationToInversions Method |
Construct a sequence of inversions from the permutation.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public int[] ToInversions()
Return Value
Int32A sequence of inversions.
Example
From wikipedia: the permutation 12043 has the inversions (0,2), (1,2) and (3,4). This would be
encoded using the array [22244].
See Also