This function calculates the lexicographic permutation distance. That is the difference of positions
that both positions would receive in a lexicographic ordering. Note, that this distance
measure can quickly become inaccurate if the length of the permutations grows too large, due
to being based on the factorial of the length. In general, permutations longer than 100 elements should
be avoided.
Usage
distancePermutationLex(x, y)
Value
numeric distance value $$d(x,y)$$, scaled to values between 0 and 1 (based on the maximum possible distance between two permutations)