This PR adds the following operations to data/interval-map:
interval-map-iterate-least
interval-map-iterate-greatest
interval-map-iterate-least/start>?
interval-map-iterate-least/start>=?
interval-map-iterate-greatest/start<?
interval-map-iterate-greatest/start<=?
interval-map-iterate-least/end>?
interval-map-iterate-least/end>=?
interval-map-iterate-greatest/end<?
interval-map-iterate-greatest/end<=?
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).
This PR adds the following operations to
data/interval-map
:interval-map-iterate-least
interval-map-iterate-greatest
interval-map-iterate-least/start>?
interval-map-iterate-least/start>=?
interval-map-iterate-greatest/start<?
interval-map-iterate-greatest/start<=?
interval-map-iterate-least/end>?
interval-map-iterate-least/end>=?
interval-map-iterate-greatest/end<?
interval-map-iterate-greatest/end<=?
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).