This function searches with policy sp to find the largest right
subrange on which pred(value, x) is true for all x
(e.g., if pred is "less than", returns the portion of the range
with elements strictly greater than value). The search schedule
and its complexity are documented in SearchPolicy.
For ranges that do not offer random access, SearchPolicy.linear
is the only policy allowed (and it must be specified explicitly lest it exposes
user code to unexpected inefficiencies). For random-access searches, all
policies are allowed, and SearchPolicy.binarySearch is the default.
structSortedRange(Range, alias pred = "a < b", SortedRangeOptions opt = SortedRangeOptions.assumeSorted)
This function searches with policy sp to find the largest right subrange on which pred(value, x) is true for all x (e.g., if pred is "less than", returns the portion of the range with elements strictly greater than value). The search schedule and its complexity are documented in SearchPolicy.
For ranges that do not offer random access, SearchPolicy.linear is the only policy allowed (and it must be specified explicitly lest it exposes user code to unexpected inefficiencies). For random-access searches, all policies are allowed, and SearchPolicy.binarySearch is the default.