protected static class FPGrowth.FPTreeNode
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<BinaryItem,FPGrowth.FPTreeNode> |
m_children
the children of this node
|
protected int |
m_ID
ID (for graphing the tree)
|
protected BinaryItem |
m_item
item at this node
|
protected FPGrowth.FPTreeNode |
m_levelSibling
link to another sibling at this level in the tree
|
protected FPGrowth.FPTreeNode |
m_parent
link to the parent node
|
protected FPGrowth.ShadowCounts |
m_projectedCounts
counts associated with projected versions of this node
|
| Constructor and Description |
|---|
FPTreeNode(FPGrowth.FPTreeNode parent,
BinaryItem item)
Construct a new node with the given parent link and item.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItemSet(java.util.Collection<BinaryItem> itemSet,
java.util.Map<BinaryItem,weka.associations.FPGrowth.FPTreeRoot.Header> headerTable,
int incr)
Insert an item set into the tree at this node.
|
protected int |
assignIDs(int lastID) |
BinaryItem |
getItem()
Get the item at this node.
|
FPGrowth.FPTreeNode |
getParent()
Get the parent node.
|
int |
getProjectedCount(int recursionLevel)
Get the projected count at the given recursion level for this node.
|
void |
graphFPTree(java.lang.StringBuffer text)
Generate a dot graph description string for the tree.
|
void |
increaseProjectedCount(int recursionLevel,
int incr)
Increase the projected count at the given recursion level at this node
|
void |
removeProjectedCount(int recursionLevel)
Remove the projected count at the given recursion level for this node.
|
java.lang.String |
toString(int recursionLevel)
Return a textual description of this node for a given recursion level.
|
java.lang.String |
toString(java.lang.String prefix,
int recursionLevel)
Return a textual description of this node for a given recursion level.
|
protected FPGrowth.FPTreeNode m_levelSibling
protected FPGrowth.FPTreeNode m_parent
protected BinaryItem m_item
protected int m_ID
protected java.util.Map<BinaryItem,FPGrowth.FPTreeNode> m_children
protected FPGrowth.ShadowCounts m_projectedCounts
public FPTreeNode(FPGrowth.FPTreeNode parent, BinaryItem item)
parent - a pointer to the parent of this node.item - the item at this node.public void addItemSet(java.util.Collection<BinaryItem> itemSet, java.util.Map<BinaryItem,weka.associations.FPGrowth.FPTreeRoot.Header> headerTable, int incr)
itemSet - the item set to insert.headerTable - the header table for the tree.incr - the amount by which to increase counts.public void increaseProjectedCount(int recursionLevel,
int incr)
recursionLevel - the recursion level to increase the node count at.incr - the amount by which to increase the count.public void removeProjectedCount(int recursionLevel)
recursionLevel - the recursion level at which to remove the count.public int getProjectedCount(int recursionLevel)
recursionLevel - the recursion level at which to get the count.public FPGrowth.FPTreeNode getParent()
public BinaryItem getItem()
public java.lang.String toString(int recursionLevel)
recursionLevel - the recursion depth to use.public java.lang.String toString(java.lang.String prefix,
int recursionLevel)
prefix - a prefix string to prepend.recursionLevel - the recursion level to use.protected int assignIDs(int lastID)
public void graphFPTree(java.lang.StringBuffer text)
text - a StringBuffer to store the graph description in.