racket / data

Other
16 stars 23 forks source link

interval-map: Add iterator functions in the style of gen:ordered-dict #31

Closed lexi-lambda closed 10 months ago

lexi-lambda commented 1 year ago

This PR adds the following operations to data/interval-map:

These allow efficiently finding intervals that appear near a given index, even if it they do not actually contain the index. However, note that this PR does not make interval maps implement the gen:ordered-dict interface, as the arguments to these functions accept individual bounds, not entire intervals (which are morally the keys of the interval map).