|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.mine.subgroupminer.apriori.ArrayPrefixTreeNode
public class ArrayPrefixTreeNode
An ArrayPrefixTreeNode contains an array containing the counter for the items, where the array position serves as the item identifier. Each item may have a child, again, the array position serves as the identifier for that child, that is, the child for item x is in children[x]. Although this implicates a waste of storage the accessing time is linear. Additionally, a link to the parent node and the referring index to the prefix is stored.
| Constructor Summary | |
|---|---|
ArrayPrefixTreeNode(int length,
ArrayPrefixTreeNode parent,
int parentIndex)
Constructs an ArrayPrefixTreeNode with the length specifying the size of the array, that is, the number of countable items in that node. |
|
| Method Summary | |
|---|---|
void |
createChildAt(int pos)
Creates an empty child for the item specified by pos. |
boolean |
createChildren(int minSupport)
Creates emtpy children for all items, whose support is greater or equal to minSupport. |
void |
deleteChild(int pos)
Deletes the child for the item specified by its position pos. |
ArrayPrefixTreeNode |
getChild(int pos)
Returns the child for that given item specified by pos. |
int |
getCounterFor(int pos)
Returns the counter, the support, for the item with identifier pos. |
int |
getLength()
Returns the length of the array, that is, the umber of countable items. |
ArrayPrefixTreeNode |
getParent()
Retuns a link to the parent node. |
int |
getParentIndex()
Returns the parent index, the prefix. |
int |
getSumOfCounter()
Returns the sum of that counter for a pruning heuristic. |
void |
increment(int pos)
Increments the counter for the item with id = pos. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayPrefixTreeNode(int length,
ArrayPrefixTreeNode parent,
int parentIndex)
length - the number of countable items in that nodeparent - the parent nodeparentIndex - the index of the prefix item| Method Detail |
|---|
public int getParentIndex()
public ArrayPrefixTreeNode getParent()
public int getLength()
public void increment(int pos)
pos - the identifier for that item equal to its position in the
arraypublic int getCounterFor(int pos)
pos - the identifier for that item equal to its position in the
array
public int getSumOfCounter()
public void deleteChild(int pos)
pos - the position of the item whose child should be deletedpublic ArrayPrefixTreeNode getChild(int pos)
pos - the identifier, position of the item, whose child should be
returned
public void createChildAt(int pos)
pos - the identifier, position of the item, for which a child should
be createdpublic boolean createChildren(int minSupport)
minSupport - the support which an item should at least have that a
child for is created
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||