rust-lapper icon indicating copy to clipboard operation
rust-lapper copied to clipboard

An API to find the closest interval to a value

Open XVilka opened this issue 2 years ago • 0 comments

It would be great to extend Lapper's modus operandi to also perform the "fuzzy" search - instead of the exact match inside one of the intervals, allow to search for the closest interval when there is no exact match.

The API could be similar to find:

pub fn closest(&self, start: I, stop: I) -> IterFind<'_, I, T>ⓘ

XVilka avatar Dec 13 '23 15:12 XVilka