public static class FPGrowth.BinaryItem extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<FPGrowth.BinaryItem>
Constructor and Description |
---|
BinaryItem(Attribute att,
int valueIndex) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FPGrowth.BinaryItem comp)
Ensures that items will be sorted in descending order of frequency.
|
void |
decreaseFrequency()
Decrement the frequency of this item.
|
void |
decreaseFrequency(int f)
Decrease the frequency of this item.
|
boolean |
equals(java.lang.Object compareTo) |
Attribute |
getAttribute()
Get the attribute that this item corresponds to.
|
int |
getFrequency()
Get the frequency of this item.
|
int |
getValueIndex()
Get the value index for this item.
|
int |
hashCode() |
void |
increaseFrequency()
Increment the frequency of this item.
|
void |
increaseFrequency(int f)
Increase the frequency of this item.
|
java.lang.String |
toString()
A string representation of this item.
|
java.lang.String |
toString(boolean freq)
A string representation of this item.
|
java.lang.String |
toXML() |
public BinaryItem(Attribute att, int valueIndex) throws java.lang.Exception
java.lang.Exception
public void increaseFrequency(int f)
f
- the amount to increase the frequency by.public void decreaseFrequency(int f)
f
- the amount by which to decrease the frequency.public void increaseFrequency()
public void decreaseFrequency()
public int getFrequency()
public Attribute getAttribute()
public int getValueIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean freq)
freq
- true if the frequency should be included.public java.lang.String toXML()
public int compareTo(FPGrowth.BinaryItem comp)
compareTo
in interface java.lang.Comparable<FPGrowth.BinaryItem>
comp
- the BinaryItem to compare against.public boolean equals(java.lang.Object compareTo)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object