Class KdTree.Node

java.lang.Object
org.ddogleg.nn.alg.KdTree.Node
Enclosing class:
KdTree

public static class KdTree.Node extends Object
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 Details

    • point

      public Object 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 index
      Optional index that can be associated with the point to an array or look up in a hash table
    • split

      public int split
      axis used to split the data. -1 for leafs
    • left

      @Nullable public @Nullable KdTree.Node left
      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()