public Quantile combine(final Quantile other) {
		if (Double.compare(_quantile, other._quantile) != 0) {
			throw new IllegalArgumentException(format(
				"Can't perform combine, the quantile are not equal: %s != %s",
				_quantile, other._quantile
			));
		}

		_count += other._count;

		if (_quantile == 0.0) {
			_q[2] = Math.min(_q[2], other._q[2]);
		} else if (_quantile == 1.0) {
			_q[2] = Math.max(_q[2], other._q[2]);
		} else {
			// Combine the marker positions.
			_n[1] += other._n[1];
			_n[2] += other._n[2];
			_n[3] += other._n[3];
			_n[4] += other._n[4];

			// Combine the marker height.
			_q[0] = Math.min(_q[0], other._q[0]);
			_q[1] = (_q[1] + other._q[1])*0.5;
			_q[2] = (_q[2] + other._q[2])*0.5;
			_q[3] = (_q[3] + other._q[3])*0.5;
			_q[4] = Math.max(_q[4], other._q[4]);

			// Combine position of markers.
			_nn[0] += other._nn[0];
			_nn[1] += other._nn[1];
			_nn[2] += other._nn[2];

			adjustMarkerHeights();
		}

		return this;
	}
Combine two {@code Quantile} objects.

@since 3.1

@param other the other {@code Quantile} object to combine
@return {@code this}
@throws java.lang.NullPointerException if the {@code other} object is
        {@code null}.
@throws java.lang.IllegalArgumentException if the {@link #quantile}
        of the {@code other} object differs from {@code this} one.
jenetics/src/main/java/io/jenetics/stat/Quantile.java