@Override public void add(List<? extends TDigest> others) { for (TDigest other : others) { setMinMax(Math.min(min, other.getMin()), Math.max(max, other.getMax())); for (Centroid centroid : other.centroids()) { add(centroid.mean(), centroid.count(), recordAllData ? centroid.data() : null); } } }
double x2 = d2.getMin(); while (x1 <= d1.getMax() && x2 <= d2.getMax()) { if (x1 < x2) { diff = maxDiff(d1, d2, diff, x1); while (x1 <= d1.getMax()) { diff = maxDiff(d1, d2, diff, x1); x1 = nextValue(d1, ix1, x1); while (x2 <= d2.getMax()) { diff = maxDiff(d2, d2, diff, x2); x2 = nextValue(d2, ix2, x2);
@Override public double getMaxValue() { return tdigest.getMax(); }