Package com.irurueta.geometry
Class KDTree2D
Implementation of a k-D tree in 2D.
Once a K-D tree is built for a collection of points, it can later be used to efficiently do certain operations
such as point location, nearest points searches, etc.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.irurueta.geometry.KDTree
KDTree.BoxNode<P extends Point<P>> -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Point2DCopies a point.protected Point2DcreatePoint(double value) Creates a point.intGets number of dimensions supported by this k-D tree implementation on provided list of points.Methods inherited from class com.irurueta.geometry.KDTree
distance, locateBox, locateBoxIndex, locateNear, locateNear, nearestIndex, nearestPoint, nNearest, nNearest, nNearest, nNearest
-
Constructor Details
-
KDTree2D
Constructor.- Parameters:
pts- collection of points to store in the tree.
-
-
Method Details
-
getDimensions
public int getDimensions()Gets number of dimensions supported by this k-D tree implementation on provided list of points.- Specified by:
getDimensionsin classKDTree<Point2D>- Returns:
- number of dimensions.
-
createPoint
Creates a point.- Specified by:
createPointin classKDTree<Point2D>- Parameters:
value- value to be set on point coordinates.- Returns:
- created point.
-
copyPoint
Copies a point.
-