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