Package org.ddogleg.nn.alg
Interface KdTreeSearchN<P>
- All Known Implementing Classes:
KdTreeSearchNBbf,KdTreeSearchNStandard
public interface KdTreeSearchN<P>
Interface for searching a single tree for the N nearest-neighbors.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this search with the same configuration.voidfindNeighbor(P target, int searchN, DogArray<KdTreeResult> results) Searches for the N nearest-neighbors to the target.voidsetMaxDistance(double maxDistance) Specifies the maximum distance a closest-point needs to be to be consideredvoidSpecifies the tree which will be searched.
-
Method Details
-
setTree
Specifies the tree which will be searched. The type of object is implementation specific- Parameters:
tree- search tree
-
setMaxDistance
void setMaxDistance(double maxDistance) Specifies the maximum distance a closest-point needs to be to be considered- Parameters:
maxDistance- maximum distance from target
-
findNeighbor
Searches for the N nearest-neighbors to the target. The results are added to the 'results' list.- Parameters:
target- Point whose nearest neighbor is being searched forsearchN- Number of closest points it will find. Must be>=1results- Storage for the found neighbors.
-
copy
KdTreeSearchN<P> copy()Creates a copy of this search with the same configuration. workspace isn't copied
-