org.ddogleg.nn.alg
Class KdTreeSearch1Bbf
- java.lang.Object
-
- org.ddogleg.nn.alg.KdTreeSearchBestBinFirst
-
- org.ddogleg.nn.alg.KdTreeSearch1Bbf
-
- All Implemented Interfaces:
- KdTreeSearch1
public class KdTreeSearch1Bbf extends KdTreeSearchBestBinFirst implements KdTreeSearch1
Implementation of
KdTreeSearchBestBinFirstwhich searches for the single best nearest-neighbor.
-
-
Constructor Summary
Constructors Constructor and Description KdTreeSearch1Bbf(int maxNodesSearched)Configures the search
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description KdTree.NodefindNeighbor(double[] target)Searches for the nearest neighbor to the target.doublegetDistance()Returns the distance of the closest node.-
Methods inherited from class org.ddogleg.nn.alg.KdTreeSearchBestBinFirst
_findClosest, setMaxDistance, setTree, setTrees
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ddogleg.nn.alg.KdTreeSearch1
setMaxDistance, setTree
-
-
-
-
Constructor Detail
-
KdTreeSearch1Bbf
public KdTreeSearch1Bbf(int maxNodesSearched)
Configures the search- Parameters:
maxNodesSearched- Maximum number of nodes it will search. Used to limit CPU time.
-
-
Method Detail
-
findNeighbor
public KdTree.Node findNeighbor(double[] target)
Description copied from interface:KdTreeSearch1Searches for the nearest neighbor to the target. If no point is found that is less than maxDistance then return null.- Specified by:
findNeighborin interfaceKdTreeSearch1- Parameters:
target- Point whose nearest neighbor is being searched for- Returns:
- The closest point or null if there is none.
-
getDistance
public double getDistance()
Description copied from interface:KdTreeSearch1Returns the distance of the closest node.- Specified by:
getDistancein interfaceKdTreeSearch1- Returns:
- distance to closest node.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG