Class AbstractOrderedItemset
- java.lang.Object
-
- org.processmining.logfiltering.algorithms.SPMF.RuleGrowth.AbstractItemset
-
- org.processmining.logfiltering.algorithms.SPMF.RuleGrowth.AbstractOrderedItemset
-
- Direct Known Subclasses:
Itemset
public abstract class AbstractOrderedItemset extends AbstractItemset
This is an abstract class indicating general methods that an ordered itemset should have, and is designed for ordered itemsets where items are sorted by lexical order and no item can appear twice.- Author:
- Philippe Fournier-Viger
- See Also:
AbstractItemset
-
-
Constructor Summary
Constructors Constructor Description AbstractOrderedItemset()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.IntegerallTheSameExceptLastItem(AbstractOrderedItemset itemset2)Check if the items from this itemset are all the same as those of another itemset except the last item and that itemset2 is lexically smaller than this itemset.booleanallTheSameExceptLastItemV2(AbstractOrderedItemset itemset2)This method checks if this itemset is the same as another itemset except for the last item.booleancontains(java.lang.Integer item)Check if this itemset contains a given item.booleancontainsAll(AbstractOrderedItemset itemset2)This methods checks if another itemset is contained in this one.abstract java.lang.Integerget(int position)Get the item at a given position of this itemsetabstract intgetAbsoluteSupport()Get the support of this itemsetjava.lang.IntegergetLastItem()Get the last item.doublegetRelativeSupport(int nbObject)Get the relative support of this itemset (a percentage) as a doublebooleanisEqualTo(int[] itemset)This method compare this itemset with another itemset to see if they are equal.booleanisEqualTo(AbstractOrderedItemset itemset2)This method compare this itemset with another itemset to see if they are equal.abstract intsize()Get the size of this itemsetjava.lang.StringtoString()Get this itemset as a string-
Methods inherited from class org.processmining.logfiltering.algorithms.SPMF.RuleGrowth.AbstractItemset
getRelativeSupportAsString, print
-
-
-
-
Method Detail
-
getAbsoluteSupport
public abstract int getAbsoluteSupport()
Get the support of this itemset- Specified by:
getAbsoluteSupportin classAbstractItemset- Returns:
- the support of this itemset
-
size
public abstract int size()
Get the size of this itemset- Specified by:
sizein classAbstractItemset- Returns:
- the size of this itemset
-
get
public abstract java.lang.Integer get(int position)
Get the item at a given position of this itemset- Parameters:
position- the position of the item to be returned- Returns:
- the item
-
getLastItem
public java.lang.Integer getLastItem()
Get the last item.- Returns:
- the last item.
-
toString
public java.lang.String toString()
Get this itemset as a string- Specified by:
toStringin classAbstractItemset- Returns:
- a string representation of this itemset
-
getRelativeSupport
public double getRelativeSupport(int nbObject)
Get the relative support of this itemset (a percentage) as a double- Specified by:
getRelativeSupportin classAbstractItemset- Parameters:
nbObject- the number of transactions in the database where this itemset was found- Returns:
- the relative support of the itemset as a double
-
contains
public boolean contains(java.lang.Integer item)
Check if this itemset contains a given item.- Specified by:
containsin classAbstractItemset- Parameters:
item- the item- Returns:
- true if the item is contained in this itemset
-
containsAll
public boolean containsAll(AbstractOrderedItemset itemset2)
This methods checks if another itemset is contained in this one.- Parameters:
itemset2- the other itemset- Returns:
- true if it is contained
-
isEqualTo
public boolean isEqualTo(AbstractOrderedItemset itemset2)
This method compare this itemset with another itemset to see if they are equal. The method assume that the two itemsets are lexically ordered.- Parameters:
itemset2- an itemset- Returns:
- true or false
-
isEqualTo
public boolean isEqualTo(int[] itemset)
This method compare this itemset with another itemset to see if they are equal. The method assume that the two itemsets are lexically ordered.- Parameters:
an- itemset- Returns:
- true or false
-
allTheSameExceptLastItemV2
public boolean allTheSameExceptLastItemV2(AbstractOrderedItemset itemset2)
This method checks if this itemset is the same as another itemset except for the last item.- Parameters:
itemset2- the second itemset- Returns:
- true if they are the same except for the last item
-
allTheSameExceptLastItem
public java.lang.Integer allTheSameExceptLastItem(AbstractOrderedItemset itemset2)
Check if the items from this itemset are all the same as those of another itemset except the last item and that itemset2 is lexically smaller than this itemset. If all these conditions are satisfied, this method return the last item of itemset2. Otherwise it returns null.- Returns:
- the last item of itemset2, otherwise, null.
-
-