Interface NearestNeighborSearch<T>
- All Superinterfaces:
EuclideanSpace
- All Known Subinterfaces:
KNearestNeighborSearch<T>
- All Known Implementing Classes:
KNearestNeighborSearchOnIterableRealInterval, KNearestNeighborSearchOnKDTree, NearestNeighborSearchOnIterableRealInterval, NearestNeighborSearchOnKDTree
Nearest-neighbor search in an Euclidean space. The interface describes
implementations that perform the search for a specified location and provide
access to the data, location and distance of the found nearest neighbor until
the next search is performed. In a multi-threaded application, each thread
will thus need its own
NearestNeighborSearch.-
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy.default doubleAccess the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.Access the position of the nearest neighbor, ordered by square Euclidean distance.Access the data of the nearest neighbor.doubleAccess the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.voidsearch(RealLocalizable reference) Perform nearest-neighbor search for a reference coordinate.Methods inherited from interface EuclideanSpace
numDimensions
-
Method Details
-
search
Perform nearest-neighbor search for a reference coordinate.- Parameters:
reference-
-
getSampler
-
getPosition
RealLocalizable getPosition()Access the position of the nearest neighbor, ordered by square Euclidean distance. -
getSquareDistance
double getSquareDistance()Access the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance. -
getDistance
default double getDistance()Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance. -
copy
NearestNeighborSearch<T> copy()Create a copy.
-