ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim
Class Itemset
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.Itemset
-
public class Itemset extends java.lang.ObjectThis class represents an itemset as used by the SeqDim and Fournier-Viger 2008 algorithm.
An itemset is a set of items and an optional timestamp.- See Also:
AlgoSeqDim,AlgoFournierViger08
-
-
Constructor Summary
Constructors Constructor and Description Itemset()Default constructorItemset(ItemSimple item, long timestamp)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddItem(ItemSimple item)Add an item to this itemset.ItemsetcloneItemSet()Make an exact copy of this itemset.ItemsetcloneItemSetMinusItems(java.util.Map<ItemSimple,java.util.Set<java.lang.Integer>> mapSequenceID, double relativeMinsup)Make a copy of this itemset but without infrequent itemsItemSimpleget(int index)Get the i-th item in this itemsetjava.util.List<ItemSimple>getItems()Get the List of items contained in this Itemset.longgetTimestamp()Get the timestampvoidprint()Print this item to System.out.voidsetTimestamp(long timestamp)Set the timestamp of this itemset.intsize()Get the number of items.java.lang.StringtoString()Get a String representation of this item.
-
-
-
Constructor Detail
-
Itemset
public Itemset(ItemSimple item, long timestamp)
Constructor- Parameters:
item- an itemtimestamp- a timestamp
-
Itemset
public Itemset()
Default constructor
-
-
Method Detail
-
addItem
public void addItem(ItemSimple item)
Add an item to this itemset.- Parameters:
item- an Item
-
getItems
public java.util.List<ItemSimple> getItems()
Get the List of items contained in this Itemset.- Returns:
- a List of items
-
get
public ItemSimple get(int index)
Get the i-th item in this itemset- Parameters:
index- the position i- Returns:
- the Item
-
print
public void print()
Print this item to System.out.
-
toString
public java.lang.String toString()
Get a String representation of this item.- Overrides:
toStringin classjava.lang.Object- Returns:
- a String
-
cloneItemSetMinusItems
public Itemset cloneItemSetMinusItems(java.util.Map<ItemSimple,java.util.Set<java.lang.Integer>> mapSequenceID, double relativeMinsup)
Make a copy of this itemset but without infrequent items- Parameters:
mapSequenceID- a map indicating the IDs of sequence (value) containing each item (key).relativeMinsup- a relative minimum support (integer)- Returns:
- a new Itemset
-
cloneItemSet
public Itemset cloneItemSet()
Make an exact copy of this itemset.- Returns:
- a new Itemset.
-
getTimestamp
public long getTimestamp()
Get the timestamp- Returns:
- the timestamp
-
setTimestamp
public void setTimestamp(long timestamp)
Set the timestamp of this itemset.- Parameters:
timestamp- the timestamp.
-
size
public int size()
Get the number of items.- Returns:
- an integer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG