laur.dm.ar
Class SET

java.lang.Object
  |
  +--laur.dm.ar.SET

public class SET
extends java.lang.Object

Implements a Set Enumeration Tree, which is a prefix tree used for storing and retrieving itemset information.


Constructor Summary
SET()
          Create a new empty SET.
 
Method Summary
 java.util.ArrayList getItemsets()
          Return the itemsets of the SET.
 java.util.ArrayList getLargeItemsets()
          Return the maximal itemsets of the SET.
 double getSupport(Itemset itemset)
          Return the support for a given itemset.
static void initializeSET(SET supports, double minSupport, DBCacheReader cacheReader)
          Fills a SET with all frequent itemsets read from cacheReader that have support greater than min_support
 void insert(Itemset itemset)
          Insert a new itemset in the SET.
static void main(java.lang.String[] args)
          sample usage and testing
 java.lang.String toString()
          Return a string representation of the SET.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SET

public SET()
Create a new empty SET.
Method Detail

insert

public void insert(Itemset 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 double getSupport(Itemset 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.ArrayList getLargeItemsets()
Return the maximal itemsets of the SET.
Returns:
a vector containing the maximal itemsets from the SET

getItemsets

public java.util.ArrayList getItemsets()
Return the itemsets of the SET.
Returns:
a vector containing the itemsets from the SET

initializeSET

public static void initializeSET(SET supports,
                                 double minSupport,
                                 DBCacheReader cacheReader)
Fills a SET with all frequent itemsets read from cacheReader that have support greater than min_support
Parameters:
supports - the SET to be filled
minSupport - the minimum support threshold
cacheReader - a DBCacheReader object from which the itemsets can be read

toString

public java.lang.String toString()
Return a string representation of the SET.
Overrides:
toString in class java.lang.Object
Returns:
string representation of SET

main

public static void main(java.lang.String[] args)
sample usage and testing