Skip to main content

NearestNeighborIndex

Trait NearestNeighborIndex 

Source
pub trait NearestNeighborIndex: SpatialIndex {
    // Required methods
    fn nearest_one(&self, x: f32, y: f32, z: f32) -> Option<Neighbor>;
    fn nearest_k(&self, x: f32, y: f32, z: f32, k: usize) -> Vec<Neighbor>;
}
Expand description

Exact nearest neighbor queries.

Required Methods§

Source

fn nearest_one(&self, x: f32, y: f32, z: f32) -> Option<Neighbor>

Finds the single nearest neighbor.

Source

fn nearest_k(&self, x: f32, y: f32, z: f32, k: usize) -> Vec<Neighbor>

Finds up to k nearest neighbors sorted by ascending distance.

Implementors§