Package org.ddogleg.nn.wrap
Class KdTreeNearestNeighbor<P>
java.lang.Object
org.ddogleg.nn.wrap.KdTreeNearestNeighbor<P>
- All Implemented Interfaces:
NearestNeighbor<P>
Wrapper around
KdTree
for NearestNeighbor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ddogleg.nn.NearestNeighbor
NearestNeighbor.Search<P>
-
Constructor Summary
ConstructorDescriptionKdTreeNearestNeighbor
(KdTreeDistance<P> distance) KdTreeNearestNeighbor
(KdTreeSearch1<P> search1, KdTreeSearchN<P> searchN, AxisSplitter<P> splitter) -
Method Summary
Modifier and TypeMethodDescriptionCreates a new search for this data structure.void
Specifies the set of points which are to be searched.
-
Constructor Details
-
KdTreeNearestNeighbor
public KdTreeNearestNeighbor(KdTreeSearch1<P> search1, KdTreeSearchN<P> searchN, AxisSplitter<P> splitter) -
KdTreeNearestNeighbor
-
-
Method Details
-
setPoints
Description copied from interface:NearestNeighbor
Specifies the set of points which are to be searched.- Specified by:
setPoints
in interfaceNearestNeighbor<P>
- Parameters:
points
- Set of points.trackIndicies
- If true it will keep track of the index. Making it easy to associate data.
-
createSearch
Description copied from interface:NearestNeighbor
Creates a new search for this data structure. This is intended to enabled concurrent searches. AfterNearestNeighbor.setPoints(java.util.List<P>, boolean)
has been called and returned, each searched can be called independently in separate threads. Do not callNearestNeighbor.setPoints(java.util.List<P>, boolean)
which a search is being performed.- Specified by:
createSearch
in interfaceNearestNeighbor<P>
- Returns:
- A new search object for this instance.
-