org.ddogleg.nn.alg
Class KdTreeSearchNStandard
- java.lang.Object
-
- org.ddogleg.nn.alg.KdTreeSearchNStandard
-
- All Implemented Interfaces:
- KdTreeSearchN
public class KdTreeSearchNStandard extends java.lang.Object implements KdTreeSearchN
Standard algorithm for searching aKdTreefor the nearest-neighbor of a search. This is an adaptation ofKdTreeSearch1Standardfor N-nearest-neighbors.
-
-
Constructor Summary
Constructors Constructor and Description KdTreeSearchNStandard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidfindNeighbor(double[] target, int searchN, FastQueue<KdTreeResult> results)Finds the nodes which are closest to 'target' and within range of the maximum distance.voidsetMaxDistance(double maxDistance)Specifies the greatest distance it will searchvoidsetTree(KdTree tree)Specifies the tree which is to be searched
-
-
-
Method Detail
-
setTree
public void setTree(KdTree tree)
Description copied from interface:KdTreeSearchNSpecifies the tree which is to be searched- Specified by:
setTreein interfaceKdTreeSearchN
-
setMaxDistance
public void setMaxDistance(double maxDistance)
Specifies the greatest distance it will search- Specified by:
setMaxDistancein interfaceKdTreeSearchN- Parameters:
maxDistance- Maximum distance (Euclidean squared) a closest point can be
-
findNeighbor
public void findNeighbor(double[] target, int searchN, FastQueue<KdTreeResult> results)Finds the nodes which are closest to 'target' and within range of the maximum distance.- Specified by:
findNeighborin interfaceKdTreeSearchN- Parameters:
target- A pointsearchN- Number of nearest-neighbors it will search forresults- Storage for the found neighbors
-
-
DataMelt 3.0 © DataMelt by jWork.ORG