-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Despite an early attempt at making probe::exc
handle values that compare equivalent (#143), and a more recent fix for the specific case where the first and elements of a cycle compare equivalent (#230), it appears that the measure of presortedness still does not fully handle them.
Case in point, once again courtesy of RapidCheck, though with manual reduction: we have probe::exc({1, 1, 1, 0, 0}) == 3
when the expected result is
I still need to analyze that case in detail, but my guess is that we end up with two cycles:
- One that handles the lone
$1$ in the middle. - Another one that handles the four remaining values.
And that's not an incorrect way to make cycles, but the issue is that we need three cycles so that
I need to find a way to either maximize the number of cycles, or to take into account such scenarios specifically.