Class AssociationRuleGeneration.PartialItemset

  • All Implemented Interfaces:
    java.lang.Comparable<Itemset>
    Enclosing class:
    AssociationRuleGeneration

    protected static class AssociationRuleGeneration.PartialItemset
    extends Itemset
    Mutable scatch itemset for finding itemsets, based on SparseItemset. Do not use this for storage.
    Author:
    Erich Schubert
    • Field Detail

      • len

        public int len
        Fake length and offset.
      • begin

        public int begin
        Fake length and offset.
      • indices

        public int[] indices
        Scratch storage.
    • Constructor Detail

      • PartialItemset

        public PartialItemset​(int[] indices)
        Constructor.
        Parameters:
        indices - Indices
    • Method Detail

      • length

        public int length()
        Description copied from class: Itemset
        Itemset length.
        Specified by:
        length in class Itemset
        Returns:
        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.
         }
         
         
        Specified by:
        iter in class Itemset
        Returns:
        Iterator
      • iterValid

        public boolean iterValid​(int iter)
        Description copied from class: Itemset
        Check if the iterator position is valid.
        Specified by:
        iterValid in class Itemset
        Parameters:
        iter - Iterator
        Returns:
        true if the 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 class Itemset
        Parameters:
        iter - Iterator
        Returns:
        New iterator position
      • iterDim

        public int iterDim​(int iter)
        Description copied from class: Itemset
        Item at the iterator position.
        Specified by:
        iterDim in class Itemset
        Parameters:
        iter - Iterator
        Returns:
        Current item