|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.indiana.iucbrf.casebase.Node
public class Node
This class defines a single node in a DTreeCaseBase.
Constructor Summary | |
---|---|
protected |
Node()
|
|
Node(java.util.ArrayList children,
FeatureKey featureQuestioned,
Range bounds)
Creates new Node. |
Method Summary | |
---|---|
protected void |
addCase(Case acase)
It is assumed that this is a leaf, and the case does belong here. |
void |
addChild(Node child)
Add a child to this node |
boolean |
doDescendantsHaveCases()
Determine if any of the descendants of this node, or this node itself, have any cases. |
Node |
findLeaf(Problem p)
Find the leaf of this (sub)tree corresponding to the given Problem object. |
java.util.ArrayList |
getAllDescendantCaseBases()
Get references to the case bases of all descendants of this node. |
CaseBase |
getCaseBase()
Obtain a reference to the case base object of this node. |
int |
getCBSizeOfSubtree()
Get the size of the leaf case bases in the tree with this node at the root. |
protected boolean |
isInBounds(Feature value)
Determine if the Feature value given is within the bounds of the partition of this node, for the feature questioned by this node's parent. |
boolean |
isLeaf()
Determine if this node is a leaf node. |
protected boolean |
removeCase(Case acase)
Remove a case from the decision tree. |
void |
setCaseBaseTo(CaseBase toAdd)
The case base of this leaf node is set to toAdd |
java.lang.String |
toString(int depth)
Convert this node (and its children) into a String representation. |
java.lang.String |
toVerboseString(int depth)
Convert this node (and its children) into a verbose String representation, where each Case is shown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Node()
public Node(java.util.ArrayList children, FeatureKey featureQuestioned, Range bounds)
Method Detail |
---|
public void addChild(Node child)
child
- The Node object that will be this node's child.protected void addCase(Case acase)
public void setCaseBaseTo(CaseBase toAdd)
toAdd
- The CaseBase that this node should havepublic CaseBase getCaseBase()
public java.util.ArrayList getAllDescendantCaseBases()
public boolean doDescendantsHaveCases()
protected boolean removeCase(Case acase)
acase
- The case to be removed.public boolean isLeaf()
public int getCBSizeOfSubtree()
protected boolean isInBounds(Feature value)
public Node findLeaf(Problem p)
public java.lang.String toString(int depth)
public java.lang.String toVerboseString(int depth)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |