ca.pfv.spmf.patterns.itemset_array_integers_with_tids_bitset
Class Itemset
- java.lang.Object
-
- ca.pfv.spmf.patterns.AbstractItemset
-
- ca.pfv.spmf.patterns.AbstractOrderedItemset
-
- ca.pfv.spmf.patterns.itemset_array_integers_with_tids_bitset.Itemset
-
public class Itemset extends AbstractOrderedItemset
This class represents an itemset (a set of items) where the itemset is an array of integers sorted by lexical order, an item should not appear more than once, the ids of transactions/sequences containing this itemset is represented as a bitset.- See Also:
AbstractOrderedItemset
-
-
Field Summary
Fields Modifier and Type Field and Description intcardinalityint[]itemsetThe list of items contained in this itemset, ordered by lexical order
-
Constructor Summary
Constructors Constructor and Description Itemset()Constructor of an empty itemsetItemset(int item)ConstructorItemset(int[] items)ConstructorItemset(int[] itemset, java.util.BitSet bitset, int support)Constructor of an empty itemset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Integerget(int index)Get the item at a given position of this itemsetintgetAbsoluteSupport()Get the support of this itemsetint[]getItems()Get the list of items in this itemsetjava.util.BitSetgetTransactionsIds()Get the list of transactions/sequences containing this itemset.voidsetTIDs(java.util.BitSet listTransactionIds, int cardinality)Set the list of transaction/sequence ids containing this itemset.intsize()Get the size of this itemset.-
Methods inherited from class ca.pfv.spmf.patterns.AbstractOrderedItemset
allTheSameExceptLastItem, allTheSameExceptLastItemV2, contains, containsAll, getLastItem, getRelativeSupport, isEqualTo, isEqualTo, toString
-
Methods inherited from class ca.pfv.spmf.patterns.AbstractItemset
getRelativeSupportAsString, print
-
-
-
-
Field Detail
-
itemset
public int[] itemset
The list of items contained in this itemset, ordered by lexical order
-
cardinality
public int cardinality
-
-
Constructor Detail
-
Itemset
public Itemset()
Constructor of an empty itemset
-
Itemset
public Itemset(int[] itemset, java.util.BitSet bitset, int support)Constructor of an empty itemset- Parameters:
itemset- the itemsetthe- tidset of the itemsetthe- tidset cardinality (support)
-
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
-
-
Method Detail
-
getAbsoluteSupport
public int getAbsoluteSupport()
Get the support of this itemset- Specified by:
getAbsoluteSupportin classAbstractOrderedItemset- Returns:
- the support of this itemset
-
getItems
public int[] getItems()
Get the list of items in this itemset- Returns:
- the list of items
-
get
public java.lang.Integer get(int index)
Get the item at a given position of this itemset- Specified by:
getin classAbstractOrderedItemset- Parameters:
index- the position of the item to be returned- Returns:
- the item
-
setTIDs
public void setTIDs(java.util.BitSet listTransactionIds, int cardinality)Set the list of transaction/sequence ids containing this itemset.- Parameters:
listTransactionIds- the list of transaction/sequence ids.cardinality- the cardinality of the list.
-
size
public int size()
Get the size of this itemset.- Specified by:
sizein classAbstractOrderedItemset- Returns:
- the size of this itemset
-
getTransactionsIds
public java.util.BitSet getTransactionsIds()
Get the list of transactions/sequences containing this itemset.- Returns:
- the list as a bitset.
-
-
DMelt 3.0 © DataMelt by jWork.ORG