Interface RadiusNeighborSearch<T>

  • All Superinterfaces:
    EuclideanSpace
    All Known Implementing Classes:
    RadiusNeighborSearchOnKDTree

    public interface RadiusNeighborSearch<T>
    extends EuclideanSpace
    Radius neighbor search in an Euclidean space. The interface describes implementations that perform the search for a specified reference location and radius, and provide access to the data, location, and distance of the found neighbors until the next search is performed. For every search, the user can choose whether the found neighbors are returned in arbitrary order or sorted by distance to the reference location. In a multi-threaded application, each thread will need its own RadiusNeighborSearch.
    Author:
    Tobias Pietzsch
    • Method Detail

      • search

        void search​(RealLocalizable reference,
                    double radius,
                    boolean sortResults)
        Perform neighbor search within a radius about a reference coordinate. A point is considered within radius if its distance to the reference is smaller or equal the radius.
        Parameters:
        reference - the reference coordinate.
        radius - the radius about the reference coordinate that should be searched for neighbors.
        sortResults - whether the results should be ordered by ascending distances to reference.
      • getSampler

        Sampler<T> getSampler​(int i)
        Access the data of the ith neighbor within radius. If sortResults was set to true, neighbors are ordered by square Euclidean distance to the reference. Data is accessed through a Sampler that guarantees write access if the underlying data set is writable.
      • getPosition

        RealLocalizable getPosition​(int i)
        Access the position of the ith neighbor within radius. If sortResults was set to true, neighbors are ordered by square Euclidean distance to the reference.
      • getSquareDistance

        double getSquareDistance​(int i)
        Access the square Euclidean distance between the reference location as used for the last search and the ith neighbor. If sortResults was set to true, neighbors are ordered by square Euclidean distance to the reference.
      • getDistance

        double getDistance​(int i)
        Access the Euclidean distance between the reference location as used for the last search and the ith neighbor.