Learn R Programming

PerMallows (version 1.1)

decomposition2permutation: Get a permutation consistent with a decomposition vector

Description

Given a distance decomposition vector and a distance name, generate uniformly at random a permutation consistent with the decomposition vector.

Usage

decomposition2permutation(vec, dist.name = "kendall")

Arguments

vec
the permutation
dist.name
optional the name of the distance. One of: kendall (default), cayley, hamming

Value

  • the distance decomposition vector of the given permutation and distance

Examples

Run this code
permutation2decomposition(c(1,2,4,3,5), 'cayley')

Run the code above in your browser using DataLab