Click or drag to resize

PermutationToInversions Method

Construct a sequence of inversions from the permutation.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public int[] ToInversions()

Return Value

Int32
A 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