presto-main/src/main/java/io/prestosql/operator/aggregation/NumericHistogram.java/Entry/Entry
class Entry:        private Entry(int id, double value, double weight, Entry left, Entry right)
        {
            this.id = id;
            this.value = value;
            this.weight = weight;
            this.right = right;
            this.left = left;

            if (right != null) {
                right.left = this;
                penalty = computePenalty(value, weight, right.value, right.weight);
            }
            else {
                penalty = Double.POSITIVE_INFINITY;
            }

            if (left != null) {
                left.right = this;
            }
        }