Class RandomRemovalFrequencyTable

  • All Implemented Interfaces:
    Frequency

    public final class RandomRemovalFrequencyTable
    extends Object
    implements Frequency
    A probabilistic multiset for estimating the popularity of an element within a time window. The maximum frequency of an element. The size of the sample in relation to the cache size can be controlled with a sample factor. Instead of halving the popularity of elements a random element is dropped when table is full. This class is used to check the feasibility of using TinyTable instead of CountMin Sketch.
    • Constructor Detail

      • RandomRemovalFrequencyTable

        public RandomRemovalFrequencyTable​(Config config)
    • Method Detail

      • frequency

        public int frequency​(long e)
        Description copied from interface: Frequency
        Returns the estimated number of times the element was seen.
        Specified by:
        frequency in interface Frequency
      • increment

        public void increment​(long e)
        Description copied from interface: Frequency
        Increments the popularity of the element.
        Specified by:
        increment in interface Frequency