- All Known Implementing Classes:
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 Classes Modifier and Type Interface Description
static interfaceAn independent search instance.
setPointsSpecifies the set of points which are to be searched.
points- Set of points.
trackIndices- If true it will keep track of the index. Making it easy to associate data.
createSearchCreates a new search for this data structure. This is intended to enabled concurrent searches. After
setPoints(java.util.List<P>, boolean)has been called and returned, each searched can be called independently in separate threads. Do not call
setPoints(java.util.List<P>, boolean)which a search is being performed.
- A new search object for this instance.