RegionQuery

Trait RegionQuery 

Source
pub trait RegionQuery: Points {
    type Neighbours: Iterator<Item = (f64, Self::Point)>;

    // Required method
    fn neighbours(&self, point: &Self::Point, epsilon: f64) -> Self::Neighbours;
}
Expand description

Collections of points that can be queried to find nearby points.

Required Associated Types§

Source

type Neighbours: Iterator<Item = (f64, Self::Point)>

An iterator over the nearby points and their distances of a given one.

Required Methods§

Source

fn neighbours(&self, point: &Self::Point, epsilon: f64) -> Self::Neighbours

Return an iterator over points in self with distance from point less than or equal to epsilon.

It is expected that this includes point itself if `epsilon

= 0`.

The behaviour is unspecified if point is not in self, and if epsilon < 0 (although it is strongly recommended that the iterator is empty in this case).

Implementors§