Documentation of 'org.ddogleg.nn.wrap.WrapExhaustiveNeighbor' Java class
WrapExhaustiveNeighbor
org.ddogleg.nn.wrap

Class WrapExhaustiveNeighbor<D>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void findNearest(double[] point, double maxDistance, int numNeighbors, FastQueue<NnData<D>> result)
      Searches for the N nearest neighbor to the specified point.
      boolean findNearest(double[] point, double maxDistance, NnData<D> result)
      Searches for the nearest neighbor to the specified point.
      void init(int N)
      Initializes data structures.
      void setPoints(java.util.List<double[]> points, java.util.List<D> data)
      Specifies the set of points which are to be searched.
      • Methods inherited from class java.lang.Object

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

      • WrapExhaustiveNeighbor

        public WrapExhaustiveNeighbor()
    • Method Detail

      • init

        public void init(int N)
        Description copied from interface: NearestNeighbor
        Initializes data structures.
        Specified by:
        init in interface NearestNeighbor<D>
        Parameters:
        N - Dimension of input data
      • setPoints

        public void setPoints(java.util.List<double[]> points,
                              java.util.List<D> data)
        Description copied from interface: NearestNeighbor
        Specifies the set of points which are to be searched.
        Specified by:
        setPoints in interface NearestNeighbor<D>
        Parameters:
        points - Set of points.
        data - (Optional) Associated data. Can be null.
      • findNearest

        public boolean findNearest(double[] point,
                                   double maxDistance,
                                   NnData<D> result)
        Description copied from interface: NearestNeighbor
        Searches for the nearest neighbor to the specified point. The neighbor must be within maxDistance.

        NOTE: How distance is measured is not specified here. See the implementation's documentation. Euclidean distance squared is common.

        Specified by:
        findNearest in interface NearestNeighbor<D>
        Parameters:
        point - A point being searched for.
        maxDistance - Maximum distance (inclusive, e.g. d ≤ maxDistance) a neighbor can be from point. Values < 0 will be set to the maximum distance.
        result - Storage for the result.
        Returns:
        true if a match within the max distance was found.
      • findNearest

        public void findNearest(double[] point,
                                double maxDistance,
                                int numNeighbors,
                                FastQueue<NnData<D>> result)
        Description copied from interface: NearestNeighbor
        Searches for the N nearest neighbor to the specified point. The neighbors must be within maxDistance.

        NOTE: How distance is measured is not specified here. See the implementation's documentation. Euclidean distance squared is common.

        Specified by:
        findNearest in interface NearestNeighbor<D>
        Parameters:
        point - A point being searched for.
        maxDistance - Maximum distance (inclusive, e.g. d ≤ maxDistance) the neighbor can be from point. Values < 0 will be set to the maximum distance.
        numNeighbors - The number of neighbors it will search for.
        result - Storage for the result. Must be empty before calling. Must support grow() function.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.