Documentation of 'org.ddogleg.nn.alg.KdTreeSearch1Standard' Java class
KdTreeSearch1Standard
org.ddogleg.nn.alg

Class KdTreeSearch1Standard

  • All Implemented Interfaces:
    KdTreeSearch1


    public class KdTreeSearch1Standard
    extends java.lang.Object
    implements KdTreeSearch1
    Standard algorithm for searching a KdTree for the nearest-neighbor of a search. This is the algorithm which is typically described in books. At each node it examines distance of the two children and investigates the closer child. After it reaches a leaf it steps back in the search and sees if the other child could produce a better solution, if it can it is also investigated. The search stops when no more nodes can produce a better result.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      KdTree.Node findNeighbor(double[] target)
      Finds the node which is closest to 'target'
      double getDistance()
      Returns the distance of the closest node.
      void setMaxDistance(double maxDistance)
      Specifies the greatest distance it will search
      void setTree(KdTree tree)
      Specifies the tree which is to be searched
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KdTreeSearch1Standard

        public KdTreeSearch1Standard()
    • Method Detail

      • setMaxDistance

        public void setMaxDistance(double maxDistance)
        Specifies the greatest distance it will search
        Specified by:
        setMaxDistance in interface KdTreeSearch1
        Parameters:
        maxDistance - Maximum distance (Euclidean squared) a closest point can be
      • findNeighbor

        public KdTree.Node findNeighbor(double[] target)
        Finds the node which is closest to 'target'
        Specified by:
        findNeighbor in interface KdTreeSearch1
        Parameters:
        target - A point
        Returns:
        Closest node or null if none is within the minimum distance.
      • getDistance

        public double getDistance()
        Description copied from interface: KdTreeSearch1
        Returns the distance of the closest node.
        Specified by:
        getDistance in interface KdTreeSearch1
        Returns:
        distance to closest node.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.