data_structures.kd_tree.nearest_neighbour_search¶
Functions¶
|
Performs a nearest neighbor search in a KD-Tree for a given query point. |
Module Contents¶
- data_structures.kd_tree.nearest_neighbour_search.nearest_neighbour_search(root: data_structures.kd_tree.kd_node.KDNode | None, query_point: list[float]) tuple[list[float] | None, float, int] ¶
Performs a nearest neighbor search in a KD-Tree for a given query point.
- Args:
root (KDNode | None): The root node of the KD-Tree. query_point (list[float]): The point for which the nearest neighbor
is being searched.
- Returns:
- tuple[list[float] | None, float, int]:
The nearest point found in the KD-Tree to the query point, or None if no point is found.
The squared distance to the nearest point.
The number of nodes visited during the search.