pub trait RangeQuery<'a>: Knn<'a> {
type RangeIter: IntoIterator<Item = (Neighbor<<Self::Metric as Metric<Self::Point>>::Unit, Self::Ix>, &'a Self::Point, &'a Self::Value)>;
// Required method
fn range_query(
&self,
query: &Self::Point,
range: <Self::Metric as Metric<Self::Point>>::Unit,
) -> Self::RangeIter;
}
Expand description
Implement this trait on data structures (or wrappers) which perform range queries. The data structure should maintain a key-value mapping between neighbour points and data values.
The lifetime on the trait will be removed once GATs are stabilized.