Package com.jackmeng.stl
Class stl_KDTree
java.lang.Object
com.jackmeng.stl.stl_KDTree
public class stl_KDTree
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
stl_KDTree.KDNode
-
Field Summary
Fields Modifier and Type Field Description private stl_KDTree.KDNode
root
-
Constructor Summary
Constructors Constructor Description stl_KDTree(java.util.List<double[]> points)
-
Method Summary
Modifier and Type Method Description private stl_KDTree.KDNode
buildTree(java.util.List<double[]> points, int depth)
private double
distance(double[] a, double[] b)
stl_KDTree.KDNode
nearestNeighbor(double[] queryPoint)
private stl_KDTree.KDNode
nearestNeighbor(stl_KDTree.KDNode currentNode, double[] queryPoint, stl_KDTree.KDNode bestNode, int depth)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
root
-
-
Constructor Details
-
stl_KDTree
public stl_KDTree(java.util.List<double[]> points)
-
-
Method Details
-
buildTree
-
nearestNeighbor
-
nearestNeighbor
private stl_KDTree.KDNode nearestNeighbor(stl_KDTree.KDNode currentNode, double[] queryPoint, stl_KDTree.KDNode bestNode, int depth) -
distance
private double distance(double[] a, double[] b)
-