Module hash4j

Interface StateChangeObserver

All Known Implementing Classes:
MartingaleEstimator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StateChangeObserver
An observer of state changes of distinct counters such as HyperLogLog or UltraLogLog.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    stateChanged(double probabilityDecrement)
    This method is called whenever the internal state of the approximate distinct counter has changed.
  • Method Details

    • stateChanged

      void stateChanged(double probabilityDecrement)
      This method is called whenever the internal state of the approximate distinct counter has changed. After a state change, the probability of a next state change is usually smaller. The positive decrement of this state change probability is passed as an argument.
      Parameters:
      probabilityDecrement - the positive probability decrement