Class Argos::KDTree
Simple kd-tree for nearest-neighbour queries on a static point set. More...
#include <KDTree.h>
Public Functions
| Type | Name |
|---|---|
| KDTree (const std::vector< Argos::Vector3D< double > > & points) Build a kd-tree from a set of points. |
|
| double | nearestDistance (const Argos::Vector3D< double > & query) const Squared distance to the nearest point in the tree. |
| ~KDTree () Destructor — frees all nodes. |
Detailed Description
Builds a balanced binary tree by splitting on the median along alternating axes. Supports squared-distance nearest-point lookup.
Public Functions Documentation
function KDTree
Build a kd-tree from a set of points.
Parameters:
pointsThe reference point cloud (must outlive the tree).
function nearestDistance
Squared distance to the nearest point in the tree.
Parameters:
queryQuery point.
Returns:
Squared Euclidean distance to the closest stored point.
function ~KDTree
Destructor — frees all nodes.
The documentation for this class was generated from the following file include/structure/KDTree.h