pub trait KNearestSearch: Default {
    fn build(&mut self, data: Matrix<f64>);
    fn search(
        &self,
        point: &[f64],
        k: usize
    ) -> Result<(Vec<usize>, Vec<f64>), Error>; }
Expand description

Search K-nearest items

Required Methods

build data structure for search optimization

Serch k-nearest items close to the point Returns a tuple of searched item index and its distances

Implementors

Can search K-nearest items