lexicographicPermutationOrderNumber: Lexicographic order number

View source: R/permutationDistances.r

lexicographicPermutationOrderNumberR Documentation

Lexicographic order number

Description

This function returns the position-number that a permutation would receive in a lexicographic ordering. It is used in the lexicographic distance measure.

Usage

lexicographicPermutationOrderNumber(x)

Arguments

x

permutation (integer vector)

Value

numeric value giving position in lexicographic order.

See Also

distancePermutationLex

Examples

lexicographicPermutationOrderNumber(1:5)
lexicographicPermutationOrderNumber(c(1,2,3,5,4))
lexicographicPermutationOrderNumber(c(1,2,4,3,5))
lexicographicPermutationOrderNumber(c(1,2,4,5,3))
lexicographicPermutationOrderNumber(c(1,2,5,3,4))
lexicographicPermutationOrderNumber(c(1,2,5,4,3))
lexicographicPermutationOrderNumber(c(1,3,2,4,5))
lexicographicPermutationOrderNumber(5:1)
lexicographicPermutationOrderNumber(1:7)
lexicographicPermutationOrderNumber(7:1)


CEGO documentation built on May 29, 2024, 3:35 a.m.