Beispiel #1
0
  public static QuantileDigest merge(List<QuantileDigest> digests) {
    if (digests.isEmpty()) {
      throw new RuntimeException("Digests to be unioned should not be empty!");
    }

    QuantileDigest ret = digests.get(0);

    for (int i = 1; i < digests.size(); i++) {
      ret.merge(digests.get(i));
    }

    return ret;
  }
Beispiel #2
0
 public QuantileDigest(QuantileDigest quantileDigest) {
   this(quantileDigest.getMaxError(), quantileDigest.getAlpha());
   merge(quantileDigest);
 }