Interface KdTreeSearchN<P>

All Known Implementing Classes:
KdTreeSearchNBbf, KdTreeSearchNStandard

public interface KdTreeSearchN<P>
Interface for searching a single tree for the N nearest-neighbors.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a copy of this search with the same configuration.
    void
    findNeighbor(P target, int searchN, DogArray<KdTreeResult> results)
    Searches for the N nearest-neighbors to the target.
    void
    setMaxDistance(double maxDistance)
    Specifies the maximum distance a closest-point needs to be to be considered
    void
    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

      void findNeighbor(P target, int searchN, DogArray<KdTreeResult> results)
      Searches for the N nearest-neighbors to the target. The results are added to the 'results' list.
      Parameters:
      target - Point whose nearest neighbor is being searched for
      searchN - Number of closest points it will find. Must be >= 1
      results - Storage for the found neighbors.
    • copy

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