wpi.associations.arminer
Class SET

java.lang.Object
  extended bywpi.associations.arminer.SET

public class SET
extends java.lang.Object

SET.java

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  int level
           
private  SET.HashNode root
           
 
Constructor Summary
SET()
          Create a new empty SET.
 
Method Summary
 java.util.Vector getItemsets()
          Return the itemsets of the SET.
 java.util.Vector getLargeItemsets()
          Return the maximal itemsets of the SET.
 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)
          for testing purposes only !!!
 java.lang.String toString()
          Return a string representation of the SET.
private  void traverseGatherAll(SET.HashNode node, ARMinerItemset itemset, java.util.Vector vector)
           
private  void traverseGatherLeaves(SET.HashNode node, ARMinerItemset itemset, java.util.Vector vector)
           
private  void traversePrint(SET.HashNode node, java.lang.StringBuffer sb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

root

private SET.HashNode root

level

private int level
Constructor Detail

SET

public SET()
Create a new empty SET.

Method Detail

insert

public void insert(ARMinerItemset itemset)
Insert a new itemset in the SET.

Parameters:
itemset - the itemset to be inserted
Throws:
java.lang.IllegalArgumentException - itemset is null or is empty

getSupport

public float getSupport(ARMinerItemset itemset)
                 throws SETException
Return the support for a given itemset.

Parameters:
itemset - the itemset for which we want to obtain the support
Returns:
support
Throws:
java.lang.IllegalArgumentException - itemset is null or is empty
SETException - itemset not found in SET

getLargeItemsets

public java.util.Vector getLargeItemsets()
Return the maximal itemsets of the SET.

Returns:
a vector containing the maximal itemsets from the SET

getItemsets

public java.util.Vector getItemsets()
Return the itemsets of the SET.

Returns:
a vector containing the itemsets from the SET

traverseGatherLeaves

private void traverseGatherLeaves(SET.HashNode node,
                                  ARMinerItemset itemset,
                                  java.util.Vector vector)

traverseGatherAll

private void traverseGatherAll(SET.HashNode node,
                               ARMinerItemset itemset,
                               java.util.Vector vector)

traversePrint

private void traversePrint(SET.HashNode node,
                           java.lang.StringBuffer sb)

toString

public java.lang.String toString()
Return a string representation of the SET.

Returns:
string representation of SET

main

public static void main(java.lang.String[] args)
for testing purposes only !!!