Skip to main content

NeighborhoodProvider

Trait NeighborhoodProvider 

Source
pub trait NeighborhoodProvider {
    // Required methods
    fn query_k(
        &self,
        index: usize,
        k: usize,
    ) -> Result<Vec<usize>, SpatialError>;
    fn query_radius(
        &self,
        index: usize,
        radius: f32,
    ) -> Result<Vec<usize>, SpatialError>;
}
Expand description

Neighborhood query abstraction for feature estimation.

Required Methods§

Source

fn query_k(&self, index: usize, k: usize) -> Result<Vec<usize>, SpatialError>

Returns up to k neighbor indices excluding the query point itself.

Source

fn query_radius( &self, index: usize, radius: f32, ) -> Result<Vec<usize>, SpatialError>

Returns all neighbor indices within radius, excluding the query point.

Implementors§