Skip to main content

knn_graph

Function knn_graph 

Source
pub fn knn_graph(cloud: &PointCloud, k: usize) -> SpatialResult<NeighborGraph>
Expand description

Builds a directed k-nearest-neighbor graph: an edge from every point to each of its k nearest neighbors (excluding itself).

Requests exceeding the cloud size search all points. Equal-distance neighbor selection and order follow the KD-tree, including duplicate coordinates.