public static class LongKDTree.KDTreeNode extends Object
| Modifier and Type | Field and Description |
|---|---|
long |
discriminant
Splitting value
|
int |
discriminantDimension
Splitting dimension
|
int[] |
indices
The leaf only holds the indices of the original data
|
LongKDTree.KDTreeNode |
left
Node to the left
|
long[] |
maxBounds
The maximum bounds of this node
|
long[] |
minBounds
The minimum bounds of this node
|
LongKDTree.KDTreeNode |
right
Node to the right
|
| Constructor and Description |
|---|
KDTreeNode(long[][] pnts,
IntArrayView inds,
LongKDTree.SplitChooser split)
Construct a new node with the given data
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isContainedBy(long[] lowerExtreme,
long[] upperExtreme)
Test whether the bounds of this node are fully contained by the
hyperrectangle described by the given bounds.
|
boolean |
isDisjointFrom(long[] lowerExtreme,
long[] upperExtreme)
Test whether the bounds of this node are disjoint from the
hyperrectangle described by the given bounds.
|
boolean |
isLeaf()
Test to see if this node is a leaf node (i.e.
|
public LongKDTree.KDTreeNode left
public LongKDTree.KDTreeNode right
public long discriminant
public int discriminantDimension
public long[] minBounds
public long[] maxBounds
public int[] indices
public KDTreeNode(long[][] pnts, IntArrayView inds, LongKDTree.SplitChooser split)
pnts - the data for the node and its childreninds - a list of indices that point to the relevant parts of the
pnts array that should be usedsplit - the LongKDTree.SplitChooser to use when constructing
the treepublic boolean isLeaf()
indices != null)public boolean isDisjointFrom(long[] lowerExtreme, long[] upperExtreme)
lowerExtreme - the lower bounds of the hyperrectangleupperExtreme - the upper bounds of the hyperrectanglepublic boolean isContainedBy(long[] lowerExtreme, long[] upperExtreme)
lowerExtreme - the lower bounds of the hyperrectangleupperExtreme - the upper bounds of the hyperrectangle