inversion: Inversion operator

Description Usage Arguments Value Examples

View source: R/PerMallows.R

Description

Given a permutation and a position, swap positions i and i+1

Usage

1
inversion(perm, i)

Arguments

perm

a permutation

i

position of the permutation

Value

The permutation in the input with an inversion at the specified position

Examples

1
inversion(c(1,2,3,4,5),2)

PerMallows documentation built on May 2, 2019, 6:14 a.m.