Expand description
§Bifurcate
This is a small crate with the only purpose to provide and efficient and really general
implementation of bisect_left
, bisect_right
and equal_range
for some obvious types,
while also giving the possibility of other types using the implementation.
The main trait, Bisectable
, is implemented for Range
, slice
and array
as a convenience.
Also, the slice
implementation can serve as a simple implementation blueprint for other types.
§Note
This crate polyfills the Step
trait, as it’s unstable see #42168.
This can be disabled via the nightly_step
feature flag.
Related to the above, there’s the nightly_ascii
feature flag, which enables the implementation for Step
for the nightly only AsciiChar
, see #110998,
which also implements the nightly only trait Step
.
Traits§
- Bisectable
- Types that can be searched via bisection either directly or indirectly.
- MidPoint
- Types that have a notion of mid point between two objects.
- Step
- Objects that have a notion of successor and predecessor operations.