|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.huguesjohnson.jail.jdt.DecisionTreeNode
JdtDecisionTreeNode, representation for tree node
Field Summary | |
static int |
CHILD_LEFT
left child index |
static int |
CHILD_RIGHT
right child index |
static int |
OP_EQUAL
not used in current project, but could be used for a more advanced project |
static int |
OP_GREATER_THAN
only operation used at present time |
static int |
OP_LESS_THAN
not used in current project, but could be used for a more advanced project |
Constructor Summary | |
DecisionTreeNode()
constructor, creates a node with no parent |
|
DecisionTreeNode(DecisionTreeNode parent)
constructor, creates node with a parent |
Method Summary | |
java.lang.Object |
clone()
clone |
int |
getAttributeIndex()
retrieves attribute index for current node |
DecisionTreeNode |
getChildNode(int direction)
retrieves a child node |
java.lang.String |
getClassification()
retreives classification of node |
int |
getCompareOperator()
retrieves comparision operator for current node |
double |
getCompareValue()
retrieves compare value for current node |
DecisionTreeNode |
getParentNode()
retrieves the parent node |
boolean |
isLeaf()
determines if node is a leaf node |
boolean |
isRoot()
determines if node is a root node |
void |
setAttributeIndex(int attributeIndex)
sets attribute index for node |
void |
setChildNode(int direction,
DecisionTreeNode node)
appends a child to the current node |
void |
setClassification(java.lang.String classification)
sets classification for node |
void |
setCompareOperator(int operator)
sets comparision operator for node |
void |
setCompareValue(double compareValue)
sets compare value for node |
java.lang.String |
toString()
returns a string representation of the node |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CHILD_LEFT
public static final int CHILD_RIGHT
public static final int OP_EQUAL
public static final int OP_GREATER_THAN
public static final int OP_LESS_THAN
Constructor Detail |
public DecisionTreeNode()
public DecisionTreeNode(DecisionTreeNode parent)
parent
- parent nodeMethod Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean isRoot()
public boolean isLeaf()
public void setChildNode(int direction, DecisionTreeNode node)
direction
- CHILD_LEFT or CHILD_RIGHTnode
- the node to attachpublic DecisionTreeNode getParentNode()
public DecisionTreeNode getChildNode(int direction)
direction
- which child to retrievepublic void setClassification(java.lang.String classification)
classification
- new classification for nodepublic java.lang.String getClassification()
public void setAttributeIndex(int attributeIndex)
attributeIndex
- new attribute index for nodepublic int getAttributeIndex()
public void setCompareValue(double compareValue)
compareValue
- new compare value for nodepublic double getCompareValue()
public void setCompareOperator(int operator)
operator
- new comparision operator for nodepublic int getCompareOperator()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |