Class Itemset
- java.lang.Object
-
- org.processmining.logfiltering.algorithms.SPMF.PatternMining.AbstractItemset
-
- org.processmining.logfiltering.algorithms.SPMF.PatternMining.AbstractOrderedItemset
-
- org.processmining.logfiltering.algorithms.SPMF.PatternMining.Itemset
-
public class Itemset extends AbstractOrderedItemset
This class represents an itemset (a set of items) implemented as an array of integers with a variable to store the support count of the itemset.- Author:
- Philippe Fournier-Viger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTrace(int i)ItemsetcloneItemSetMinusAnItemset(Itemset itemsetToNotKeep)Make a copy of this itemset but exclude a set of itemsItemsetcloneItemSetMinusOneItem(java.lang.Integer itemToRemove)Make a copy of this itemset but exclude a given itemjava.lang.Integerget(int position)Get the item at a given position in this itemsetintgetAbsoluteSupport()Get the support of this itemsetint[]getItems()Get the items as arrayjava.util.List<java.lang.Integer>getTraceList()inthashCode()voidincreaseTransactionCount()Increase the support of this itemset by 1Itemsetintersection(Itemset itemset2)This method return an itemset containing items that are included in this itemset and in a given itemsetvoidsetAbsoluteSupport(java.lang.Integer support)Set the support of this itemsetvoidsetTraceList(java.util.List<java.lang.Integer> traces)intsize()Get the size of this itemset-
Methods inherited from class org.processmining.logfiltering.algorithms.SPMF.PatternMining.AbstractOrderedItemset
allTheSameExceptLastItem, allTheSameExceptLastItemV2, contains, containsAll, getLastItem, getRelativeSupport, isEqualTo, isEqualTo, toString
-
Methods inherited from class org.processmining.logfiltering.algorithms.SPMF.PatternMining.AbstractItemset
getRelativeSupportAsString, print
-
-
-
-
Constructor Detail
-
Itemset
public Itemset()
Constructor
-
Itemset
public Itemset(int item)
Constructor- Parameters:
item- an item that should be added to the new itemset
-
Itemset
public Itemset(int[] items)
Constructor- Parameters:
items- an array of items that should be added to the new itemset
-
Itemset
public Itemset(java.util.List<java.lang.Integer> itemset, int support, java.util.List<java.lang.Integer> tracelist)Constructor- Parameters:
items- a list of Integer representing items in the itemsetsupport- the support of the itemset
-
-
Method Detail
-
getItems
public int[] getItems()
Get the items as array- Returns:
- the items
-
getAbsoluteSupport
public int getAbsoluteSupport()
Get the support of this itemset- Specified by:
getAbsoluteSupportin classAbstractOrderedItemset- Returns:
- the support of this itemset
-
getTraceList
public java.util.List<java.lang.Integer> getTraceList()
-
size
public int size()
Get the size of this itemset- Specified by:
sizein classAbstractOrderedItemset- Returns:
- the size of this itemset
-
get
public java.lang.Integer get(int position)
Get the item at a given position in this itemset- Specified by:
getin classAbstractOrderedItemset- Parameters:
position- the position of the item to be returned- Returns:
- the item
-
setAbsoluteSupport
public void setAbsoluteSupport(java.lang.Integer support)
Set the support of this itemset- Parameters:
support- the support
-
increaseTransactionCount
public void increaseTransactionCount()
Increase the support of this itemset by 1
-
setTraceList
public void setTraceList(java.util.List<java.lang.Integer> traces)
-
addTrace
public void addTrace(int i)
-
cloneItemSetMinusOneItem
public Itemset cloneItemSetMinusOneItem(java.lang.Integer itemToRemove)
Make a copy of this itemset but exclude a given item- Parameters:
itemToRemove- the given item- Returns:
- the copy
-
cloneItemSetMinusAnItemset
public Itemset cloneItemSetMinusAnItemset(Itemset itemsetToNotKeep)
Make a copy of this itemset but exclude a set of items- Parameters:
itemsetToNotKeep- the set of items to be excluded- Returns:
- the copy
-
intersection
public Itemset intersection(Itemset itemset2)
This method return an itemset containing items that are included in this itemset and in a given itemset- Parameters:
itemset2- the given itemset- Returns:
- the new itemset
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-