View source: R/permutationDistances.r
lexicographicPermutationOrderNumber | R Documentation |
This function returns the position-number that a permutation would receive in a lexicographic ordering. It is used in the lexicographic distance measure.
lexicographicPermutationOrderNumber(x)
x |
permutation (integer vector) |
numeric value giving position in lexicographic order.
distancePermutationLex
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.