Package com.jml.classifiers
Class KDTree
java.lang.Object
com.jml.classifiers.KDTree
A k-dimensional tree or K-d tree is a binary tree which partitions a space by organizing points in a K-dimensional
space. K-d trees can be used to solve generalized N-point problems e.g. K-nearest neighbors.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
KDTree
public KDTree(int k)- Parameters:
k
- Dimension of each point in the k dimensional tree.
-
-
Method Details
-
insert
public void insert(double[] point)Inserts a point into this K-d tree.- Parameters:
point
- Point to insert.
-
inOrder
Traverses this K-d tree in order.- Returns:
- Returns an arraylist containing the points from the in-order traversal of the tree.
-