Class Occurence
- java.lang.Object
-
- org.processmining.logfiltering.algorithms.SPMF.Occurence
-
public class Occurence extends java.lang.ObjectThis class represent a set of occurences in a sequence, as defined in the TRuleGrowth algorithm. Note that unlike the RuleGrowth algorithms, all occurences in a sequence are kept instead of just the first and last one. This is the main difference between the two implementations of "Occurence".- Author:
- Philippe Fournier-Viger
- See Also:
AlgoTRuleGrowth,Sequence,SequenceDatabase
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.lang.Short>occurencesa list of occurences (position in this sequence)intsequenceIDthe sequenceID (a.k.a transaction id)
-
Constructor Summary
Constructors Constructor Description Occurence(int sequenceID)Contructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(short occurence)Add an occurence.booleanequals(java.lang.Object obj)Check if a given Occurence is the same as this one (used to store occurence in Collections).shortgetFirst()Get the first occurence in this sequence.shortgetLast()Get the last occurence in this sequence.inthashCode()Get the hashcode.
-
-
-
Method Detail
-
add
public void add(short occurence)
Add an occurence.- Parameters:
occurence- the position of an itemset
-
getFirst
public short getFirst()
Get the first occurence in this sequence.- Returns:
- the position of an itemset
-
getLast
public short getLast()
Get the last occurence in this sequence.- Returns:
- the position of an itemset
-
equals
public boolean equals(java.lang.Object obj)
Check if a given Occurence is the same as this one (used to store occurence in Collections).- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- another Occurence- Returns:
- true if they both have the same sequence ID.
-
hashCode
public int hashCode()
Get the hashcode.- Overrides:
hashCodein classjava.lang.Object- Returns:
- an hashcode
-
-