Skip to content

Implementation of a 2-dimensional kd-Tree data structure in Python.

Notifications You must be signed in to change notification settings

nardienapratama/kd-tree-implementation

Repository files navigation

kd-Tree-implementation

Implementation of a 2-dimensional kd-Tree data structure in Python.

Execution

  1. Run the main.py.
  2. Uncomment the test cases and run the file to see the results.

kd-Tree Methods

  • tree = KDTree() - creates an instance of a kd-tree from the KDTree class
  • tree.insert((a,b)) - inserts the tuple (a,b), where a and b are real numbers, into the kd-tree
  • tree.visualize() - prints the kd-tree to show its tree structure
  • tree.delete((a,b)) - deletes the node (a,b), where a and b are real numbers, from the kd-tree

About

Implementation of a 2-dimensional kd-Tree data structure in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages