Implementation of a 2-dimensional kd-Tree data structure in Python.
- Run the
main.py
. - Uncomment the test cases and run the file to see the results.
tree = KDTree()
- creates an instance of a kd-tree from the KDTree classtree.insert((a,b))
- inserts the tuple (a,b), where a and b are real numbers, into the kd-treetree.visualize()
- prints the kd-tree to show its tree structuretree.delete((a,b))
- deletes the node (a,b), where a and b are real numbers, from the kd-tree