public class KDTreeNode extends java.lang.Object implements java.io.Serializable, RevisionHandler
Modifier and Type | Field and Description |
---|---|
int |
m_End
The end index of the portion of the master index array,
which stores indices of the instances/points the node
contains.
|
KDTreeNode |
m_Left
left subtree; contains instances with smaller or equal to split value.
|
int |
m_NodeNumber
node number (only for debug).
|
double[][] |
m_NodeRanges
lowest and highest value and width (= high - low) for each
dimension.
|
double[][] |
m_NodesRectBounds
The lo and high bounds of the hyper rectangle described by the
node.
|
KDTreeNode |
m_Right
right subtree; contains instances with larger than split value.
|
int |
m_SplitDim
attribute to split on.
|
double |
m_SplitValue
value to split on.
|
int |
m_Start
The start index of the portion of the master index array,
which stores the indices of the instances/points the node
contains.
|
Constructor and Description |
---|
KDTreeNode()
Constructor.
|
KDTreeNode(int nodeNum,
int startidx,
int endidx,
double[][] nodeRanges)
Constructor.
|
KDTreeNode(int nodeNum,
int startidx,
int endidx,
double[][] nodeRanges,
double[][] rectBounds) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSplitDim()
Gets the splitting dimension.
|
double |
getSplitValue()
Gets the splitting value.
|
boolean |
isALeaf()
Checks if node is a leaf.
|
int |
numInstances()
Returns the number of Instances
in the rectangular region defined
by this node.
|
public int m_NodeNumber
public KDTreeNode m_Left
public KDTreeNode m_Right
public double m_SplitValue
public int m_SplitDim
public double[][] m_NodeRanges
public double[][] m_NodesRectBounds
public int m_Start
public int m_End
public KDTreeNode()
public KDTreeNode(int nodeNum, int startidx, int endidx, double[][] nodeRanges)
nodeNum
- The node number/id.startidx
- The start index of node's portion
in master index array.endidx
- The start index of node's portion
in master index array.nodeRanges
- The attribute ranges of the
Instances/points contained in this node.public KDTreeNode(int nodeNum, int startidx, int endidx, double[][] nodeRanges, double[][] rectBounds)
nodeNum
- The node number/id.startidx
- The start index of node's portion
in master index array.endidx
- The start index of node's portion
in master index array.nodeRanges
- The attribute ranges of the
Instances/points contained in this node.rectBounds
- The range of the rectangular
region in the point space that this node
represents (points inside this rectangular
region can have different range).public int getSplitDim()
public double getSplitValue()
public boolean isALeaf()
public int numInstances()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler