Package elki.itemsetmining
Class SparseItemset
- java.lang.Object
-
- elki.itemsetmining.Itemset
-
- elki.itemsetmining.SparseItemset
-
-
Constructor Summary
Constructors Constructor Description SparseItemset(int[] indices)Constructor.SparseItemset(int[] indices, int support)Constructor with initial support.SparseItemset(OneItemset ii, OneItemset ij)Constructor from existing itemsets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Itemset o)intiter()Get an iterator over items, usually the position within an array.intiterAdvance(int iter)Advance the iterator to the next position.intiterDim(int iter)Item at the iterator position.booleaniterValid(int iter)Check if the iterator position is valid.intlength()Itemset length.booleanprefixTest(SparseItemset other)Perform the prefix test for sparse itemset.-
Methods inherited from class elki.itemsetmining.Itemset
appendItemsTo, appendTo, compareLexicographical, containedIn, equals, getSupport, hashCode, increaseSupport, toBitset, toString
-
-
-
-
Constructor Detail
-
SparseItemset
public SparseItemset(int[] indices)
Constructor.- Parameters:
indices- Items
-
SparseItemset
public SparseItemset(int[] indices, int support)Constructor with initial support.- Parameters:
indices- Itemssupport- Support
-
SparseItemset
public SparseItemset(OneItemset ii, OneItemset ij)
Constructor from existing itemsets.- Parameters:
ii- First 1-itemsetij- Second 1-itemset
-
-
Method Detail
-
length
public int length()
Description copied from class:ItemsetItemset length.
-
iter
public int iter()
Description copied from class:ItemsetGet an iterator over items, usually the position within an array. Intended usage:for (int iter = v.iter(); v.iterValid(iter); iter = v.iterAdvance(iter)) { final int item = v.iterItem(iter); // Do something. }
-
iterValid
public boolean iterValid(int iter)
Description copied from class:ItemsetCheck if the iterator position is valid.
-
iterAdvance
public int iterAdvance(int iter)
Description copied from class:ItemsetAdvance the iterator to the next position.- Specified by:
iterAdvancein classItemset- Parameters:
iter- Iterator- Returns:
- New iterator position
-
iterDim
public int iterDim(int iter)
Description copied from class:ItemsetItem at the iterator position.
-
compareTo
public int compareTo(Itemset o)
-
prefixTest
public boolean prefixTest(SparseItemset other)
Perform the prefix test for sparse itemset.- Parameters:
other- Other itemset- Returns:
trueiff the first n-1 items agree.
-
-