Class RadiusNeighborSearchOnKDTree<T>

    • Field Detail

      • n

        protected final int n
      • pos

        protected final double[] pos
      • resultPoints

        protected java.util.ArrayList<ValuePair<KDTreeNode<T>,​java.lang.Double>> resultPoints
    • Constructor Detail

      • RadiusNeighborSearchOnKDTree

        public RadiusNeighborSearchOnKDTree​(KDTree<T> tree)
    • Method Detail

      • search

        public void search​(RealLocalizable reference,
                           double radius,
                           boolean sortResults)
        Description copied from interface: RadiusNeighborSearch
        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.
        Specified by:
        search in interface RadiusNeighborSearch<T>
        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.
      • searchNode

        protected void searchNode​(KDTreeNode<T> current,
                                  double squRadius)
      • getSampler

        public Sampler<T> getSampler​(int i)
        Description copied from interface: RadiusNeighborSearch
        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.
        Specified by:
        getSampler in interface RadiusNeighborSearch<T>
      • getPosition

        public RealLocalizable getPosition​(int i)
        Description copied from interface: RadiusNeighborSearch
        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.
        Specified by:
        getPosition in interface RadiusNeighborSearch<T>
      • getSquareDistance

        public double getSquareDistance​(int i)
        Description copied from interface: RadiusNeighborSearch
        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.
        Specified by:
        getSquareDistance in interface RadiusNeighborSearch<T>
      • getDistance

        public double getDistance​(int i)
        Description copied from interface: RadiusNeighborSearch
        Access the Euclidean distance between the reference location as used for the last search and the ith neighbor.
        Specified by:
        getDistance in interface RadiusNeighborSearch<T>