|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwpi.associations.arminerSequence.SET
Implements a Set Enumeration Tree, which is a prefix tree used for storing and retrieving itemset information.
Nested Class Summary | |
private class |
SET.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
|
private java.util.Hashtable |
numberHash
Used to look up actual value of an item using its integer representation. |
private SET.HashNode |
root
|
Constructor Summary | |
SET()
Create a new empty SET. |
Method Summary | |
long |
getEventWeight(ARMinerItemset itemset)
Return the event weight for a given itemset. |
java.util.Vector |
getItemsets()
Return the itemsets of the SET. |
java.util.Vector |
getMaximalItemsets()
Return the maximal itemsets of the SET. |
private SET.HashNode |
getNode(ARMinerItemset itemset)
Return the node for a given itemset. |
java.util.Hashtable |
getNumberHash()
Returns the number hash used for looking up values in this itemset. |
float |
getSupport(ARMinerItemset itemset)
Return the support for a given itemset. |
void |
insert(ARMinerItemset itemset)
Insert a new itemset in the SET. |
static void |
main(java.lang.String[] args)
Main method for testing purposes. |
void |
setNumberHash(java.util.Hashtable h)
Sets the number hash to use for looking up values in this itemset |
java.lang.String |
toString()
Return a string representation of the SET. |
private void |
traverseGatherAll(SET.HashNode node,
ARMinerItemset itemset,
java.util.Vector vector)
A private method which gets called recursively to retrieve itemsets from all the nodes of the SET. |
private void |
traverseGatherLeaves(SET.HashNode node,
ARMinerItemset itemset,
java.util.Vector vector)
A private method which gets called recursively to retrieve itemsets from the leaf nodes of the SET. |
private void |
traversePrint(SET.HashNode node,
java.lang.StringBuffer sb)
A private method which gets called recursively to retrieve itemsets from each node of the SET 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 SET.HashNode root
private int level
private java.util.Hashtable numberHash
private static final int debug
Constructor Detail |
public SET()
Method Detail |
public void setNumberHash(java.util.Hashtable h)
h
- the number hashpublic java.util.Hashtable getNumberHash()
public void insert(ARMinerItemset itemset)
itemset
- the itemset to be inserted
java.lang.IllegalArgumentException
- itemset
is null or is emptypublic float getSupport(ARMinerItemset itemset) throws SETException
itemset
- the itemset for which we want to obtain the support
java.lang.IllegalArgumentException
- itemset
is null or is empty
SETException
- itemset
not found in SETpublic long getEventWeight(ARMinerItemset itemset) throws SETException
itemset
- the itemset for which we want to obtain the event weight
java.lang.IllegalArgumentException
- itemset
is null or is empty
SETException
- itemset
not found in SETprivate SET.HashNode getNode(ARMinerItemset itemset) throws SETException
itemset
- the itemset for which we want to obtain the node
java.lang.IllegalArgumentException
- itemset
is null or is empty
SETException
- itemset
not found in SETpublic java.util.Vector getMaximalItemsets()
public java.util.Vector getItemsets()
private void traverseGatherLeaves(SET.HashNode node, ARMinerItemset itemset, java.util.Vector vector)
node
- node starts from the root node of the SET.itemset
- for storing hashtable keys as it traverses node by
node to the leaf.vector
- for storing itemsets .private void traverseGatherAll(SET.HashNode node, ARMinerItemset itemset, java.util.Vector vector)
node
- node starts from the root node of the SET.itemset
- for storing hashtable keys as it traverses node by
node to the leaf.vector
- for storing itemsets .private void traversePrint(SET.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 |