|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwpi.associations.arminerSequence.ItemsetPrefixTree
A prefix tree used for indexing itemsets. This implementation assumes that all event items of the same name will be numbered consecutively. If the code that generates the first level of candidate itemsets is changed this condition must be ensured.
Nested Class Summary | |
private class |
ItemsetPrefixTree.HashNode
|
Field Summary | |
private static int |
debug
Specifies debug info level 0: no debug info 1: input to methods 2: and out from methods 3: and all sorts of stuff |
private int |
level
Tracks the current level for pretty printing of tree |
private ItemsetPrefixTree.HashNode |
root
The root node of the tree |
private int |
size
The number of itemsets indexed |
Constructor Summary | |
ItemsetPrefixTree()
Create a new empty SET. |
Method Summary | |
void |
add(ARMinerItemset itemset)
Add a new itemset in the itemset prefix tree. |
ARMinerItemset |
getItemset(ARMinerItemset itemset)
Returns the itemset contained in the prefix tree for a given itemset. |
java.util.Vector |
getItemsets()
Return the itemsets of the ItemsetPrefixTree. |
void |
getItemsets(ItemsetPrefixTree.HashNode node,
java.util.Vector vector)
Return the itemsets of the ItemsetPrefixTree starting from the specified node. |
private ItemsetPrefixTree.HashNode |
getNode(ARMinerItemset itemset)
Return the node for a given itemset. |
static void |
main(java.lang.String[] args)
Main method for testing purposes. |
int |
size()
Returns the number of itemsets indexed. |
java.lang.String |
toString()
Return a string representation of the ItemsetPrefixTree. |
private void |
traversePrint(ItemsetPrefixTree.HashNode node,
java.lang.StringBuffer sb)
A private method which gets called recursively to retrieve itemsets from each node of the ItemsetPrefixTree and print them to a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ItemsetPrefixTree.HashNode root
private int level
private int size
private static final int debug
Constructor Detail |
public ItemsetPrefixTree()
Method Detail |
public int size()
public void add(ARMinerItemset itemset)
itemset
- the itemset to be added
java.lang.IllegalArgumentException
- itemset
is null or is emptypublic ARMinerItemset getItemset(ARMinerItemset itemset)
itemset
- the itemset to use to find the indexed itemset in
the prefix tree
private ItemsetPrefixTree.HashNode getNode(ARMinerItemset itemset)
itemset
- the itemset for which we want to obtain the node
java.lang.IllegalArgumentException
- itemset
is null or is emptypublic java.util.Vector getItemsets()
public void getItemsets(ItemsetPrefixTree.HashNode node, java.util.Vector vector)
node
- the node to start collecting itemsets fromvector
- the vector to add itemsets toprivate void traversePrint(ItemsetPrefixTree.HashNode node, java.lang.StringBuffer sb)
node
- node to traversepublic java.lang.String toString()
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |