I'm wondering if anyone has implemented/knows of an (preferably javascript) interval-tree algorithm that will handle circular intervals. By circular, I mean intervals with a start > end. Note this also necessitates a cap to how large the intervals can be.
Is this just a subcase of the common interval tree problem?
In response to the questions posed in the comments:
Here's an image (thanks G. Bach and wikipedia) of what I mean by a circular subrange:
And (unrelated to the above image) here's an example json representation of the ranges: [{id: 'range1', start: 3, end: 34}, {id: 'range2circular', start: 30, end:6}]
Hope
Thanks!