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

Class ExhaustiveNeighbor



  • public class ExhaustiveNeighbor
    extends java.lang.Object
    Exhaustively finds the nearest-neighbor to a n-dimensional point by considering every possibility.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int findClosest(double[] p, double maxDistance)
      Finds the index of the point which has the smallest Euclidean distance to 'p' and is < maxDistance away.
      void findClosestN(double[] p, double maxDistance, int numNeighbors, GrowQueue_I32 outputIndex, GrowQueue_F64 outputDistance)
      Finds the index of the point which has the smallest Euclidean distance to 'p' and is < maxDistance away.
      double getBestDistance() 
      void setN(int n)
      Specifies the point's dimension
      void setPoints(java.util.List<double[]> points)
      The input list which the nearest-neighbor is to be found inside of
      • Methods inherited from class java.lang.Object

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

      • ExhaustiveNeighbor

        public ExhaustiveNeighbor(int n)
      • ExhaustiveNeighbor

        public ExhaustiveNeighbor()
    • Method Detail

      • setN

        public void setN(int n)
        Specifies the point's dimension
        Parameters:
        n - dimension
      • setPoints

        public void setPoints(java.util.List<double[]> points)
        The input list which the nearest-neighbor is to be found inside of
        Parameters:
        points - List od points
      • findClosest

        public int findClosest(double[] p,
                               double maxDistance)
        Finds the index of the point which has the smallest Euclidean distance to 'p' and is < maxDistance away.
        Parameters:
        p - A point.
        maxDistance - The maximum distance (Euclidean squared) the neighbor can be.
        Returns:
        Index of the closest point.
      • findClosestN

        public void findClosestN(double[] p,
                                 double maxDistance,
                                 int numNeighbors,
                                 GrowQueue_I32 outputIndex,
                                 GrowQueue_F64 outputDistance)
        Finds the index of the point which has the smallest Euclidean distance to 'p' and is < maxDistance away.
        Parameters:
        p - A point.
        maxDistance - The maximum distance (Euclidean squared) the neighbor can be.
        numNeighbors - the requested number of nearest neighbors it should search for
        outputIndex - Storage for the index of the closest elements
        outputDistance - Storage for the distance of the closest elements
      • getBestDistance

        public double getBestDistance()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.