Page
Library
Module
Module type
Parameter
Class
Class type
Source
Bisec_tree.MakeSourceA Bisector Tree (BST).
create points create the BST containing all points.
sample_distances n points get distances found in n pairs of randomly-chosen points. The result is sorted.
nearest_neighbor q bst return the distance along with the nearest neighbor to query point q in bst. Warning: there may be several points at this distance from q in bst, but a single (arbitrary) one is returned. If you are not happy with this, use a point type that is deduplicated (i.e. a point that holds the info for all points with the same coordinates).
neighbors q tol bst return all points in bst within tol distance from query point q. I.e. all points returned are within (d <= tol) distance from q.
to_list bst return the list of points inside bst, in an unspecified order.
length bst return the number of elements inside bst. I.e. how many points are indexed by this bst.
root bst return the first point found in bst (either a bucket's vantage point or a node's left vantage point).
check bst test the invariant of bst. Should always be true. If invariant doesn't hold, then this library has a bug or your P.dist function is not a proper metric.
inspect bst extract the vantage points of bst in an unspecified order.