A distribution where the cumulative density function is an arbitrary piecewise linear function. Rather confusingly there are two possible ways of looking at the distribution. The first is to divide the keyspace by ids, and order these IDs by the number of accesses. Then DIST-A determines how likely it is that that given key will be chosen. The second is to divide the keyspace into buckets, where there are multiple keys in each bucket which have been accessed the same number of times. There DIST-B determines how likely a random key is to fall into each bucket. The input data is represented as DIST-B, but the probability distribution represented by this class is DIST-A, so we need to convert from one representation to another. The conversion process works as follows. Suppose you have items numbered 0 to n - 1. Then item i gets assigned the percentile rank p = i / (n - 1), a number between 0 and 1. The input is a set of tuples (r, v), where v is the total number of observations of the item at percentile p. So the values of the are denominated not in probability density, but rather in number of observation. This means that to convert the input to a probability density distribution, we need to calculate the expected value of the distribution, and then divide the value by that. This is an abstract class: the init method needs to be implemented
@author tarmstrong
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.