Package org.ddogleg.nn.alg.searches
Class KdTreeSearchNStandard<P>
java.lang.Object
org.ddogleg.nn.alg.searches.KdTreeSearchNStandard<P>
- All Implemented Interfaces:
KdTreeSearchN<P>
Standard algorithm for searching a
KdTree for the nearest-neighbor of a search.
This is an adaptation of KdTreeSearch1Standard for N-nearest-neighbors.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this search with the same configuration.voidfindNeighbor(P target, int searchN, DogArray<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 searchvoidSpecifies the tree which will be searched.
-
Constructor Details
-
KdTreeSearchNStandard
-
-
Method Details
-
setTree
Description copied from interface:KdTreeSearchNSpecifies the tree which will be searched. The type of object is implementation specific- Specified by:
setTreein interfaceKdTreeSearchN<P>- Parameters:
tree- search tree
-
setMaxDistance
public void setMaxDistance(double maxDistance) Specifies the greatest distance it will search- Specified by:
setMaxDistancein interfaceKdTreeSearchN<P>- Parameters:
maxDistance- Maximum distance (Euclidean squared) a closest point can be
-
findNeighbor
Finds the nodes which are closest to 'target' and within range of the maximum distance.- Specified by:
findNeighborin interfaceKdTreeSearchN<P>- Parameters:
target- A pointsearchN- Number of nearest-neighbors it will search forresults- Storage for the found neighbors
-
copy
Description copied from interface:KdTreeSearchNCreates a copy of this search with the same configuration. workspace isn't copied- Specified by:
copyin interfaceKdTreeSearchN<P>
-