inversion {PerMallows} | R Documentation |
Given a permutation and a position, swap positions i and i+1
inversion(perm, i)
perm |
a permutation |
i |
position of the permutation |
The permutation in the input with an inversion at the specified position
inversion(c(1,2,3,4,5),2)