public class Sequence
extends java.lang.Object
SequenceDatabase
Constructor and Description |
---|
Sequence(int id)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addItemset(java.util.List<java.lang.Integer> itemset)
Add an itemset to this sequence.
|
java.util.List<java.lang.Integer> |
cloneItemsetMinusItems(double relativeMinsup,
java.util.List<java.lang.Integer> itemset,
java.util.Map<java.lang.Integer,java.util.Set<Sequence>> mapSequenceID)
Make a copy of an itemset while removing some items
that are infrequent with respect to a threshold minsup.
|
java.util.List<java.lang.Integer> |
cloneItemsetMinusItems(java.util.List<java.lang.Integer> itemset,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapSequenceID,
double minSupportAbsolute)
Make a copy of an itemset while removing some items
that are infrequent with respect to a threshold minsup.
|
Sequence |
cloneSequenceMinusItems(double relativeMinSup,
java.util.Map<java.lang.Integer,java.util.Set<Sequence>> mapSequenceID)
Make a copy of this sequence while removing some items
that are infrequent with respect to a threshold minsup.
|
Sequence |
cloneSequenceMinusItems(java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapSequenceID,
double relativeMinSup)
Make a copy of this sequence while removing some items
that are infrequent with respect to a threshold minsup.
|
java.util.List<java.lang.Integer> |
get(int index)
Get the itemset at a given position in this sequence.
|
int |
getId()
Get the sequence ID of this sequence.
|
java.util.List<java.util.List<java.lang.Integer>> |
getItemsets()
Get the list of itemsets in this sequence.
|
void |
print()
Print this sequence to System.out.
|
int |
size()
Get the size of this sequence (number of itemsets).
|
java.lang.String |
toString()
Return a string representation of this sequence.
|
public Sequence(int id)
id
- the id of this sequence.public void addItemset(java.util.List<java.lang.Integer> itemset)
itemset
- An itemset (list of integers)public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public int getId()
public java.util.List<java.util.List<java.lang.Integer>> getItemsets()
public java.util.List<java.lang.Integer> get(int index)
index
- the positionpublic int size()
public Sequence cloneSequenceMinusItems(java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapSequenceID, double relativeMinSup)
mapSequenceID
- a map with key = item value = a set of sequence ids containing this itemrelativeMinSup
- the minimum support threshold chosen by the user.public Sequence cloneSequenceMinusItems(double relativeMinSup, java.util.Map<java.lang.Integer,java.util.Set<Sequence>> mapSequenceID)
mapSequenceID
- a map with key = item value = a set of sequence containing this itemrelativeMinSup
- the minimum support threshold chosen by the user.public java.util.List<java.lang.Integer> cloneItemsetMinusItems(double relativeMinsup, java.util.List<java.lang.Integer> itemset, java.util.Map<java.lang.Integer,java.util.Set<Sequence>> mapSequenceID)
mapSequenceID
- a map with key = item value = a set of sequence containing this itemrelativeMinsup
- the minimum support threshold chosen by the user.itemset
- the itemsetpublic java.util.List<java.lang.Integer> cloneItemsetMinusItems(java.util.List<java.lang.Integer> itemset, java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapSequenceID, double minSupportAbsolute)
mapSequenceID
- a map with key = item value = a set of sequence ids containing this itemminSupportAbsolute
- the minimum support threshold chosen by the user.itemset
- the itemset