Trait NearestNeighborSearch

Source
pub trait NearestNeighborSearch {
    // Required methods
    fn find_k_nearest(&self, query: &Point3f, k: usize) -> Vec<(usize, f32)>;
    fn find_radius_neighbors(
        &self,
        query: &Point3f,
        radius: f32,
    ) -> Vec<(usize, f32)>;
}
Expand description

Trait for nearest neighbor search functionality

Required Methods§

Source

fn find_k_nearest(&self, query: &Point3f, k: usize) -> Vec<(usize, f32)>

Find the k nearest neighbors to a query point

Source

fn find_radius_neighbors( &self, query: &Point3f, radius: f32, ) -> Vec<(usize, f32)>

Find all neighbors within a given radius

Implementors§