Trait space::RangeQuery[][src]

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)>;
    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.

Associated Types

Required methods

Get all the points in the data structure that lie within a specified range of the query point. The points may or may not be sorted by distance.

Implementors