Skip to content

Data structure for efficiently finding overlapping intervals

License

Notifications You must be signed in to change notification settings

gsharma/interval-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Licence

Interval Tree

Interval tree is a tree designed to hold intervals with the goal of quickly finding overlapping intervals (with any given interval or point). It is typically used for windowing queries.

Interval Tree API

Insert an interval into the tree

void insert(final Interval interval);

Delete an interval, if it exists, from the tree

boolean delete(final Interval interval);

Determine if this interval exists in the tree

boolean findExactMatch(final Interval interval);

Find all overlapping intervals for this interval

List findOverlaps(final Interval interval);

Get total node count in the tree

int nodeCount();

Get the root node of this tree

IntervalTreeNode getRoot();

Get number of levels in the tree

int levelCount();

Print tree level-ordered

String printTree();

About

Data structure for efficiently finding overlapping intervals

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages