Interface KdTreeSearch1<P>

All Known Implementing Classes:
KdTreeSearch1Bbf, KdTreeSearch1Standard

public interface KdTreeSearch1<P>
Interface for searching a single tree for the nearest-neighbor
  • Method Summary

    Modifier and Type Method Description
    KdTreeSearch1<P> copy()
    Creates a copy of this search with the same configuration.
    KdTree.Node findNeighbor​(P target)
    Searches for the nearest neighbor to the target.
    double getDistance()
    Returns the distance of the closest node.
    void setMaxDistance​(double maxDistance)
    Specifies the maximum distance a closest-point needs to be to be considered
    void setTree​(Object tree)
    Specifies the tree which will be searched.
  • Method Details

    • setTree

      void setTree​(Object tree)
      Specifies the tree which will be searched. The type of object is implementation specific
      Parameters:
      tree - search tree
    • setMaxDistance

      void setMaxDistance​(double maxDistance)
      Specifies the maximum distance a closest-point needs to be to be considered
      Parameters:
      maxDistance - maximum distance from target
    • findNeighbor

      @Nullable KdTree.Node findNeighbor​(P target)
      Searches for the nearest neighbor to the target. If no point is found that is less than maxDistance then return null.
      Parameters:
      target - Point whose nearest neighbor is being searched for
      Returns:
      The closest point or null if there is none.
    • getDistance

      double getDistance()
      Returns the distance of the closest node.
      Returns:
      distance to closest node.
    • copy

      KdTreeSearch1<P> copy()
      Creates a copy of this search with the same configuration. workspace isn't copied