Trait space::Knn [−][src]
pub trait Knn { type Ix: Copy; type Point; type Metric: Metric<Self::Point>; type KnnIter: IntoIterator<Item = Neighbor<<Self::Metric as Metric<Self::Point>>::Unit, Self::Ix>>; fn knn(&self, query: &Self::Point, num: usize) -> Self::KnnIter; fn nn(
&self,
query: &Self::Point
) -> Option<Neighbor<<Self::Metric as Metric<Self::Point>>::Unit, Self::Ix>> { ... } }
Expand description
Implement this trait on data structures (or wrappers) which perform KNN searches.