Class NearestNeighborSearchOnKDTree<T>
java.lang.Object
net.imglib2.neighborsearch.NearestNeighborSearchOnKDTree<T>
- All Implemented Interfaces:
EuclideanSpace, NearestNeighborSearch<T>
Implementation of
NearestNeighborSearch search for kd-trees.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final KDTreeNode<T> private final NearestNeighborSearchImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy.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.intGets the space's number of dimensions.voidPerform nearest-neighbor search for a reference coordinate.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NearestNeighborSearch
getDistance
-
Field Details
-
tree
-
impl
-
bestPoint
-
-
Constructor Details
-
NearestNeighborSearchOnKDTree
-
NearestNeighborSearchOnKDTree
-
-
Method Details
-
numDimensions
public int numDimensions()Description copied from interface:EuclideanSpaceGets the space's number of dimensions.- Specified by:
numDimensionsin interfaceEuclideanSpace
-
search
Description copied from interface:NearestNeighborSearchPerform nearest-neighbor search for a reference coordinate.- Specified by:
searchin interfaceNearestNeighborSearch<T>- Parameters:
p-
-
getSampler
Description copied from interface:NearestNeighborSearchAccess the data of the nearest neighbor. Data is accessed through aSamplerthat guarantees write access if the underlying data set is writable.- Specified by:
getSamplerin interfaceNearestNeighborSearch<T>
-
getPosition
Description copied from interface:NearestNeighborSearchAccess the position of the nearest neighbor, ordered by square Euclidean distance.- Specified by:
getPositionin interfaceNearestNeighborSearch<T>
-
getSquareDistance
public double getSquareDistance()Description copied from interface:NearestNeighborSearchAccess the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.- Specified by:
getSquareDistancein interfaceNearestNeighborSearch<T>
-
copy
Description copied from interface:NearestNeighborSearchCreate a copy.- Specified by:
copyin interfaceNearestNeighborSearch<T>
-