Returns array of items (<key,value> pairs) in the ascended keys order
Returns array of sorted keys in the ascending order
Returns number of items stored in the interval tree
Return array of values in the ascending keys order
Clear tree
Returns true if item {key,value} exist in the tree
interval correspondent to keys stored in the tree
value object to be checked
true if item {key, value} exist in the tree, false otherwise
Tree visitor. For each node implement a callback function. Method calls a callback function with two parameters (key, value)
function to be called for each tree item
Insert new item into interval tree
interval object or array of two numbers [low, high]
value representing any object (optional)
returns reference to inserted node
Returns true if intersection between given and any interval stored in the tree found
search interval or tuple [low, high]
Returns true if tree is empty
Iterator
Iterator
optional if the iterator is intended to start from the beginning
Iterator
optional if the iterator is intended to start from the beginning
optional function that maps (value, key) to custom output
Value Mapper. Walk through every node and map node value to another value
function to be called for each tree item
Remove entry {key, value} from the tree
interval correspondent to keys stored in the tree
value object
deleted node or undefined if not found
Returns array of entry values which keys intersect with given interval If no values stored in the tree, returns array of keys which intersect given interval
search interval, or tuple [low, high]
Returns array of entry values which keys intersect with given interval If no values stored in the tree, returns array of keys which intersect given interval
search interval, or tuple [low, high]
optional function that maps (value, key) to custom output
Test red-black tree property: all red nodes have exactly two black child nodes
true if property holds
Implementation of interval binary search tree Interval tree stores items which are couples of {key:interval, value: value} Interval is an object with high and low properties or simply pair [low,high] of numeric values