Interface NearestNeighbor<P>
- All Known Implementing Classes:
KdForestBbfNearestNeighbor, KdTreeNearestNeighbor, VpTree, WrapExhaustiveNeighbor
public interface NearestNeighbor<P>
Abstract interface for finding the nearest neighbor to a user specified point inside of a set of points in K-dimensional space. Solution can be exact or approximate, depending on the implementation. The distance metric is intentionally left undefined and is implementation dependent.
WARNING: Do not modify the input lists until after the NN search is no longer needed. If the input lists do need to be modified, then pass in a copy instead. This restriction reduced memory overhead significantly.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn independent search instance. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new search for this data structure.voidSpecifies the set of points which are to be searched.
-
Method Details
-
setPoints
-
createSearch
NearestNeighbor.Search<P> createSearch()Creates a new search for this data structure. This is intended to enabled concurrent searches. AftersetPoints(List, boolean)has been called and returned, each searched can be called independently in separate threads. Do not callsetPoints(List, boolean)which a search is being performed.- Returns:
- A new search object for this instance.
-