ca.pfv.spmf.algorithms.sequential_rules.trulegrowth_with_strings
Class Occurence
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequential_rules.trulegrowth_with_strings.Occurence
-
public class Occurence extends java.lang.ObjectThis class represent the first and last occurences of an itemset in a sequence, as defined in the RuleGrowth algorithm.- See Also:
AlgoTRuleGrowth_withStrings,Sequence,SequenceDatabase
-
-
Constructor Summary
Constructors Constructor and Description Occurence(int sequenceID)Contructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and 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()Hashcode method.
-
-
-
Constructor Detail
-
Occurence
public Occurence(int sequenceID)
Contructor- Parameters:
sequenceID- a sequence ID
-
-
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()
Hashcode method.- Overrides:
hashCodein classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG