|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.associations.classification.CrNode
public class CrNode
Class for nodes in a CrTree. A CrTree(n-ary tree in child-sibling representation) can store classification association rules(CARs) and allows pruning and classification. Tree Structure described at: W. Li, J. Han, J.Pei: CMAR: Accurate and Efficient Classification Based on Multiple Class-Association Rules. In ICDM'01:369-376,2001. The CRrTree is implemented following the child-sibling reperesentation of n-ary trees. Therefore each node has a poinnter to its parent and one pointer to one of its children. Nodes having the same parent node are conneected in an doubly connected list (list of siblings). Each nodes stores an item of an rule's premise. The consequnce and additional information is stored in a FastVector. Therefore rules are stored as a path.
Constructor Summary | |
---|---|
CrNode(int num,
int value,
int i)
Constructor of a CrNode. |
Method Summary | |
---|---|
void |
addContent(java.lang.Object data)
Adds an element to the content FastVector of a node. |
boolean |
equals(int num,
int value)
Method that compares two nodes and returns true if their premise's items are the same. |
FastVector |
getContent()
Gets the FastVector storing possibly a rule's consequence and additional measures |
int |
getHeight()
Gets the height of a node in a CrTree |
CrNode |
getLastListSibling()
Gets the previous node in the associated list. |
CrNode |
getLastSibling()
Gets the previous sibling node. |
CrListElement |
getListSibling()
Gets the CrListElement that the current node is pointing to |
CrNode |
getNextListSibling()
Gets the next node in the associated list. |
CrNode |
getNextSibling()
Gets the next sibling node in a CrTree |
int[] |
getPathInfo()
Gets the item from a rule's premise that is stored in a CrNode. |
CrNode |
getTreeChild()
Gets the child node |
CrNode |
getTreeParent()
Gets the parent node of the actual node. |
void |
setHeight(int i)
Sets the height of a node in a CrTree |
void |
setLastListSibling(CrNode input)
Sets the pointer to the previous node in the associated list. |
void |
setLastSibling(CrNode input)
Sets the pointer to the previous sibling node |
void |
setListSibling(CrListElement input)
Sets the pointer to an element in the associated list. |
void |
setNewContent(FastVector input)
Stores a rule's consequence and its measures in a FastVector |
void |
setNextListSibling(CrNode input)
Sets the pointer to the next node in the associated list. |
void |
setNextSibling(CrNode input)
Sets the pointer to the next sibling node |
void |
setTreeChild(CrNode input)
Sets the pointer to a child node. |
void |
setTreeParent(CrNode input)
Sets the pointer to a parent node |
java.lang.String |
toString()
Method for printing CrNodes |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CrNode(int num, int value, int i)
num
- the attribute of a rule premisevalue
- the attribute value of a rule premisei
- the height of the node in the CrTreeMethod Detail |
---|
public void setTreeChild(CrNode input)
input
- the child nodepublic void setTreeParent(CrNode input)
input
- the parent nodepublic void setNextSibling(CrNode input)
input
- a sibling nodepublic void setLastSibling(CrNode input)
input
- a sibling nodepublic void setListSibling(CrListElement input)
input
- a list element out of the associated listpublic void setNextListSibling(CrNode input)
input
- a nodepublic void setLastListSibling(CrNode input)
input
- a nodepublic CrNode getTreeChild()
public CrNode getTreeParent()
public CrListElement getListSibling()
public CrNode getNextSibling()
public CrNode getLastSibling()
public CrNode getNextListSibling()
public CrNode getLastListSibling()
public int[] getPathInfo()
public FastVector getContent()
public void setNewContent(FastVector input)
input
- a FastVector containing a ruls' consequencepublic void addContent(java.lang.Object data)
data
- an Object that should be added to the FastVectorpublic int getHeight()
public void setHeight(int i)
i
- the heightpublic boolean equals(int num, int value)
num
- the attribute numbervalue
- the attribute value
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |