Package org.ddogleg.nn.alg
Class KdTree.Node
java.lang.Object
org.ddogleg.nn.alg.KdTree.Node
- Enclosing class:
- KdTree
Data type for each node in the binary tree. A branch will have two non-null left and right children
and the value for split will be
>= 0
. If any of those conditions are not meet then it is a leaf.-
Field Summary
Modifier and TypeFieldDescriptionint
Optional index that can be associated with the point to an array or look up in a hash table@Nullable KdTree.Node
Branch ≤ point[split]The node's point.@Nullable KdTree.Node
Branch ≥ point[split]int
axis used to split the data. -
Constructor Summary
-
Method Summary
-
Field Details
-
point
The node's point. For branches this is used to split the data. NOTE: This is a reference to the original input data. -
index
public int indexOptional index that can be associated with the point to an array or look up in a hash table -
split
public int splitaxis used to split the data. -1 for leafs -
left
Branch ≤ point[split] -
right
Branch ≥ point[split]
-
-
Constructor Details
-
Node
public Node(double[] point, int index) -
Node
public Node(double[] point) -
Node
public Node()
-
-
Method Details
-
getPoint
public <T> T getPoint() -
isLeaf
public boolean isLeaf()
-