public final class ExponentialDecay extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
computeAlpha(double targetWeight,
long targetAgeInSeconds)
Compute the alpha decay factor such that the weight of an entry with age 'targetAgeInSeconds' is targetWeight'
|
static double |
fifteenMinutes() |
static double |
fiveMinutes() |
static double |
oneMinute() |
static double |
seconds(int seconds) |
static double |
weight(double alpha,
long now,
long landmark)
Compute the forward-decay multiplier (inverse of the decay factor)
|
public static double oneMinute()
public static double fiveMinutes()
public static double fifteenMinutes()
public static double seconds(int seconds)
public static double computeAlpha(double targetWeight,
long targetAgeInSeconds)
public static double weight(double alpha,
long now,
long landmark)
Copyright © 2010–2020 Airlift. All rights reserved.