protected static class FPGrowth.FPTreeNode extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<FPGrowth.BinaryItem,FPGrowth.FPTreeNode> |
m_children
the children of this node
|
protected int |
m_ID
ID (for graphing the tree)
|
protected FPGrowth.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,
FPGrowth.BinaryItem item)
Construct a new node with the given parent link and item.
|
Modifier and Type | Method and Description |
---|---|
void |
addItemSet(Collection<FPGrowth.BinaryItem> itemSet,
Map<FPGrowth.BinaryItem,FPGrowth.FPTreeRoot.Header> headerTable,
int incr)
Insert an item set into the tree at this node.
|
protected int |
assignIDs(int lastID) |
FPGrowth.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(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.
|
String |
toString(int recursionLevel)
Return a textual description of this node for a given recursion
level.
|
String |
toString(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 FPGrowth.BinaryItem m_item
protected int m_ID
protected Map<FPGrowth.BinaryItem,FPGrowth.FPTreeNode> m_children
protected FPGrowth.ShadowCounts m_projectedCounts
public FPTreeNode(FPGrowth.FPTreeNode parent, FPGrowth.BinaryItem item)
parent
- a pointer to the parent of this node.item
- the item at this node.public void addItemSet(Collection<FPGrowth.BinaryItem> itemSet, Map<FPGrowth.BinaryItem,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 FPGrowth.BinaryItem getItem()
public String toString(int recursionLevel)
recursionLevel
- the recursion depth to use.public String toString(String prefix, int recursionLevel)
prefix
- a prefix string to prepend.recursionLevel
- the recursion level to use.protected int assignIDs(int lastID)
public void graphFPTree(StringBuffer text)
text
- a StringBuffer to store the graph description
in.Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.