
intervaltree
"an interval tree is an ordered tree data structure to hold intervals. Specifically, it allows one to efficiently find all intervals that overlap with any given interval or point.." (wikipedia)
implementation is based on an augmented self balancing avl tree ( http://code.google.com/p/self-balancing-avl-tree/ )
Downloads: Text-Indexing v1.0 ( http://code.google.com/p/text-indexing/ ) project's downloads are also hosted here!