data_structures.kd_tree.tests.test_kdtree

Functions

test_build_kdtree(num_points, cube_size, ...)

Test that KD-Tree is built correctly.

test_edge_cases()

Test edge cases such as an empty KD-Tree.

test_nearest_neighbour_search()

Test the nearest neighbor search function.

Module Contents

data_structures.kd_tree.tests.test_kdtree.test_build_kdtree(num_points, cube_size, num_dimensions, depth, expected_result)

Test that KD-Tree is built correctly.

Cases:
  • Empty points list.

  • Positive depth value.

  • Negative depth value.

data_structures.kd_tree.tests.test_kdtree.test_edge_cases()

Test edge cases such as an empty KD-Tree.

Test the nearest neighbor search function.