powered by
A ranking is compatible with a set of intervals if we can pick a point from each interval such that the ranking of those points is the ranking in question.
isCompatible(intervals, ranking)
data frame (see generateIntervals for the required format)
permutation of 1:nrow(intervals)
1:nrow(intervals)
TRUE if the ranking is compatible and FALSE otherwise
See section 4.1 of Rising (2021).
Rising, Justin (2021). Uncertainty in Ranking. arXiv:2107.03459.
# NOT RUN { left <- 0:2 * 0.5 + 1 right <- left + 0.75 intervals <- data.frame(left = left, right = right) isCompatible(intervals, 1:3) isCompatible(intervals, c(3, 2, 1)) # }
Run the code above in your browser using DataLab