imaginglss.utils.kdtree module

class imaginglss.utils.kdtree.KDtree(point_list, split_dim=0)[source]

Bases: object

KDtree: A pure-Python class to do some simple KD tree construction and search. Everything is manipulated through lists.

class TreeNode[source]

Bases: object

An empty class for the nodes.

kdtree(point_list, split_dim=0)[source]

kdtree(self,point_list,split_dim=0): Does the work of constructing the KD tree in terms of “TreeNode”s.

simplesearch(point_value, depth)[source]

simplesearch(self,point_value,depth): Walks down the tree “depth” steps, then returns all points in that subtree. If depth is a mutiple of the number of dimensions then you get a spatially compact region.

treelist(node)[source]

treelist(self,node): Returns a list of all points in the tree (or subtree).