public abstract class Itemset extends java.lang.Object implements java.lang.Comparable<Itemset>
Modifier and Type | Field and Description |
---|---|
(package private) int |
support
Support for this itemset.
|
Constructor and Description |
---|
Itemset() |
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuilder |
appendItemsTo(java.lang.StringBuilder buf,
VectorFieldTypeInformation<BitVector> meta)
Only append the items to a string buffer.
|
java.lang.StringBuilder |
appendTo(java.lang.StringBuilder buf,
VectorFieldTypeInformation<BitVector> meta)
Append items and support to a string buffer.
|
protected static int |
compareLexicographical(Itemset a,
Itemset o)
Robust compare using the iterators, lexicographical only!
|
int |
compareTo(Itemset o) |
boolean |
containedIn(SparseNumberVector bv)
Test whether the itemset is contained in a bit vector.
|
boolean |
equals(java.lang.Object obj) |
int |
getSupport()
Get item support.
|
int |
hashCode()
Deprecated.
Itemsets MUST NOT BE USED IN HASH MAPS.
|
int |
increaseSupport()
Increase the support of the itemset.
|
abstract int |
iter()
Get an iterator over items, usually the position within an array.
|
abstract int |
iterAdvance(int iter)
Advance the iterator to the next position.
|
abstract int |
iterDim(int iter)
Item at the iterator position.
|
abstract boolean |
iterValid(int iter)
Check if the iterator position is valid.
|
abstract int |
length()
Itemset length.
|
static long[] |
toBitset(Itemset i,
long[] bits)
Get the items.
|
java.lang.String |
toString() |
public int increaseSupport()
public int getSupport()
public boolean containedIn(SparseNumberVector bv)
bv
- Bit vectortrue
when the itemset is contained in this vector.public abstract int length()
public static long[] toBitset(Itemset i, long[] bits)
i
- Itemsetbits
- Output bitset (must be zeros)public abstract int iter()
for (int iter = v.iter(); v.iterValid(iter); iter = v.iterAdvance(iter)) {
final int item = v.iterItem(iter);
// Do something.
}
public abstract int iterAdvance(int iter)
iter
- Iteratorpublic abstract boolean iterValid(int iter)
iter
- Iteratortrue
if the position is valid.public abstract int iterDim(int iter)
iter
- Iteratorpublic int compareTo(Itemset o)
compareTo
in interface java.lang.Comparable<Itemset>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
@Deprecated public int hashCode()
hashCode
in class java.lang.Object
protected static int compareLexicographical(Itemset a, Itemset o)
o
- Other itemset.public java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.StringBuilder appendTo(java.lang.StringBuilder buf, VectorFieldTypeInformation<BitVector> meta)
buf
- Buffermeta
- Relation metadata (for labels)public java.lang.StringBuilder appendItemsTo(java.lang.StringBuilder buf, VectorFieldTypeInformation<BitVector> meta)
buf
- Buffermeta
- Relation metadata (for labels)Copyright © 2019 ELKI Development Team. License information.