Ejemplo n.º 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;
  }
Ejemplo n.º 2
0
 public QuantileDigest(QuantileDigest quantileDigest) {
   this(quantileDigest.getMaxError(), quantileDigest.getAlpha());
   merge(quantileDigest);
 }