public static class ShortKDTree.KDTreeNode extends Object
Modifier and Type | Field and Description |
---|---|
short |
discriminant
Splitting value
|
int |
discriminantDimension
Splitting dimension
|
int[] |
indices
The leaf only holds the indices of the original data
|
ShortKDTree.KDTreeNode |
left
Node to the left
|
short[] |
maxBounds
The maximum bounds of this node
|
short[] |
minBounds
The minimum bounds of this node
|
ShortKDTree.KDTreeNode |
right
Node to the right
|
Constructor and Description |
---|
KDTreeNode(short[][] pnts,
IntArrayView inds,
ShortKDTree.SplitChooser split)
Construct a new node with the given data
|
Modifier and Type | Method and Description |
---|---|
boolean |
isContainedBy(short[] lowerExtreme,
short[] upperExtreme)
Test whether the bounds of this node are fully contained by the
hyperrectangle described by the given bounds.
|
boolean |
isDisjointFrom(short[] lowerExtreme,
short[] 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 ShortKDTree.KDTreeNode left
public ShortKDTree.KDTreeNode right
public short discriminant
public int discriminantDimension
public short[] minBounds
public short[] maxBounds
public int[] indices
public KDTreeNode(short[][] pnts, IntArrayView inds, ShortKDTree.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 ShortKDTree.SplitChooser
to use when constructing
the treepublic boolean isLeaf()
indices
!= null
)public boolean isDisjointFrom(short[] lowerExtreme, short[] upperExtreme)
lowerExtreme
- the lower bounds of the hyperrectangleupperExtreme
- the upper bounds of the hyperrectanglepublic boolean isContainedBy(short[] lowerExtreme, short[] upperExtreme)
lowerExtreme
- the lower bounds of the hyperrectangleupperExtreme
- the upper bounds of the hyperrectangle