5. Search
The basic algorithms binarySearchMatching and binary
SearchOverlappingperform binary search of the linear kd-tree with
a location code as search key (the search routines are not listed here
since they are straightforward to implement). Given a search key, it is
translated to a linear index which is used for comparisons in the binary
search, whereas the search key itself is used to indicate a search hit. In
binarySearchMatching an identical match to the search key is
looked for, whereas binarySearchOverlapping returns the first
node that is found that overlaps the search key.When an atom is passed
as search key, binarySearchOverlapping is guaranteed to find a
unique node due to Property 1.