Class AssociationRuleGeneration.ItemsetSearcher

  • Enclosing class:
    AssociationRuleGeneration

    public static class AssociationRuleGeneration.ItemsetSearcher
    extends java.lang.Object
    Class to find itemsets in a sorted list. TODO: optimize case of length 1.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.List<Itemset> itemsets
      Itemsets to search.
      (package private) IntegerArray offsets
      Offsets into above array, based on length.
    • Constructor Summary

      Constructors 
      Constructor Description
      ItemsetSearcher​(java.util.List<Itemset> itemsets)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void buildIndex​(int begin, int end)
      Build a length index by binary search.
      int getOffset​(int i)
      Offset for itemsets of length i.
      int maxLength()
      Length of longest itemset.
      Itemset search​(Itemset c)
      Find an itemset, using binary search.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • itemsets

        java.util.List<Itemset> itemsets
        Itemsets to search.
      • offsets

        IntegerArray offsets
        Offsets into above array, based on length.
    • Constructor Detail

      • ItemsetSearcher

        public ItemsetSearcher​(java.util.List<Itemset> itemsets)
        Constructor.
        Parameters:
        itemsets - Itemsets
    • Method Detail

      • search

        public Itemset search​(Itemset c)
        Find an itemset, using binary search.
        Parameters:
        c - Itemset to search
        Returns:
        Found itemset
      • maxLength

        public int maxLength()
        Length of longest itemset.
        Returns:
        Length
      • getOffset

        public int getOffset​(int i)
        Offset for itemsets of length i.
        Parameters:
        i - Length
        Returns:
        Offset.
      • buildIndex

        private void buildIndex​(int begin,
                                int end)
        Build a length index by binary search.
        Parameters:
        begin - Begin
        end - End