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 int
compareTo(Itemset o)
int
iter()
Get an iterator over items, usually the position within an array.int
iterAdvance(int iter)
Advance the iterator to the next position.int
iterDim(int iter)
Item at the iterator position.boolean
iterValid(int iter)
Check if the iterator position is valid.int
length()
Itemset length.boolean
prefixTest(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:Itemset
Itemset length.
-
iter
public int iter()
Description copied from class:Itemset
Get 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:Itemset
Check if the iterator position is valid.
-
iterAdvance
public int iterAdvance(int iter)
Description copied from class:Itemset
Advance the iterator to the next position.- Specified by:
iterAdvance
in classItemset
- Parameters:
iter
- Iterator- Returns:
- New iterator position
-
iterDim
public int iterDim(int iter)
Description copied from class:Itemset
Item 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:
true
iff the first n-1 items agree.
-
-