protected static class FPGrowth.FrequentItemSets
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_numberOfTransactions
The total number of transactions in the data
|
protected java.util.ArrayList<FPGrowth.FrequentBinaryItemSet> |
m_sets
The list of frequent item sets
|
| Constructor and Description |
|---|
FrequentItemSets(int numTransactions)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItemSet(FPGrowth.FrequentBinaryItemSet setToAdd)
Add an item set.
|
FPGrowth.FrequentBinaryItemSet |
getItemSet(int index)
Get an item set.
|
int |
getNumberOfTransactions()
Get the total number of transactions in the data that the item sets were
derived from.
|
java.util.Iterator<FPGrowth.FrequentBinaryItemSet> |
iterator()
Get an iterator that can be used to access all the item sets.
|
int |
size()
Get the number of item sets.
|
void |
sort()
Sort the item sets.
|
void |
sort(java.util.Comparator<FPGrowth.FrequentBinaryItemSet> comp)
Sort the item sets according to the supplied comparator.
|
java.lang.String |
toString(int numSets)
Get a textual description of this list of item sets.
|
protected java.util.ArrayList<FPGrowth.FrequentBinaryItemSet> m_sets
protected int m_numberOfTransactions
public FrequentItemSets(int numTransactions)
numTransactions - the total number of transactions in the data.public FPGrowth.FrequentBinaryItemSet getItemSet(int index)
index - the index of the item set to get.public java.util.Iterator<FPGrowth.FrequentBinaryItemSet> iterator()
public int getNumberOfTransactions()
public void addItemSet(FPGrowth.FrequentBinaryItemSet setToAdd)
setToAdd - the item set to add.public void sort(java.util.Comparator<FPGrowth.FrequentBinaryItemSet> comp)
comp - the comparator to use.public int size()
public void sort()
public java.lang.String toString(int numSets)
numSets - the number of item sets to display.