Class ExponentialDecay


  • public final class ExponentialDecay
    extends Object
    • Method Detail

      • oneMinute

        public static double oneMinute()
      • fiveMinutes

        public static double fiveMinutes()
      • fifteenMinutes

        public static double fifteenMinutes()
      • seconds

        public static double seconds​(int seconds)
      • computeAlpha

        public static double computeAlpha​(double targetWeight,
                                          long targetAgeInSeconds)
        Compute the alpha decay factor such that the weight of an entry with age 'targetAgeInSeconds' is targetWeight'
      • weight

        public static double weight​(double alpha,
                                    long now,
                                    long landmark)
        Compute the forward-decay multiplier (inverse of the decay factor)