1919
2020package org .apache .datasketches .quantilescommon ;
2121
22+ import org .apache .datasketches .common .SketchesArgumentException ;
23+
2224/**
2325 * The Sorted View for quantile sketches of primitive type double.
2426 * @see SortedView
@@ -58,7 +60,7 @@ public interface DoublesSortedView extends SortedView {
5860 * </blockquote>
5961 * @param searchCrit the desired search criteria.
6062 * @return a discrete CDF array of m+1 double ranks (or cumulative probabilities) on the interval [0.0, 1.0].
61- * @throws IllegalArgumentException if sketch is empty.
63+ * @throws SketchesArgumentException if sketch is empty.
6264 */
6365 default double [] getCDF (final double [] splitPoints , final QuantileSearchCriteria searchCrit ) {
6466 QuantilesUtil .checkDoublesSplitPointsOrder (splitPoints );
@@ -76,7 +78,7 @@ default double[] getCDF(final double[] splitPoints, final QuantileSearchCriteria
7678 * sketch algorithm.
7779 *
7880 * @return the maximum item of the stream
79- * @throws IllegalArgumentException if sketch is empty.
81+ * @throws SketchesArgumentException if sketch is empty.
8082 */
8183 double getMaxItem ();
8284
@@ -85,7 +87,7 @@ default double[] getCDF(final double[] splitPoints, final QuantileSearchCriteria
8587 * sketch algorithm.
8688 *
8789 * @return the minimum item of the stream
88- * @throws IllegalArgumentException if sketch is empty.
90+ * @throws SketchesArgumentException if sketch is empty.
8991 */
9092 double getMinItem ();
9193
@@ -127,7 +129,7 @@ default double[] getCDF(final double[] splitPoints, final QuantileSearchCriteria
127129 * </blockquote>
128130 * @param searchCrit the desired search criteria.
129131 * @return a PMF array of m+1 probability masses as doubles on the interval [0.0, 1.0].
130- * @throws IllegalArgumentException if sketch is empty.
132+ * @throws SketchesArgumentException if sketch is empty.
131133 */
132134 default double [] getPMF (final double [] splitPoints , final QuantileSearchCriteria searchCrit ) {
133135 final double [] buckets = getCDF (splitPoints , searchCrit );
@@ -147,7 +149,7 @@ default double[] getPMF(final double[] splitPoints, final QuantileSearchCriteri
147149 * If EXCLUSIVE, he given rank includes all quantiles <
148150 * the quantile directly corresponding to the given rank.
149151 * @return the approximate quantile given the normalized rank.
150- * @throws IllegalArgumentException if sketch is empty.
152+ * @throws SketchesArgumentException if sketch is empty.
151153 * @see QuantileSearchCriteria
152154 */
153155 double getQuantile (double rank , QuantileSearchCriteria searchCrit );
@@ -164,7 +166,7 @@ default double[] getPMF(final double[] splitPoints, final QuantileSearchCriteri
164166 * @param quantile the given quantile
165167 * @param searchCrit if INCLUSIVE the given quantile is included into the rank.
166168 * @return the normalized rank corresponding to the given quantile.
167- * @throws IllegalArgumentException if sketch is empty.
169+ * @throws SketchesArgumentException if sketch is empty.
168170 * @see QuantileSearchCriteria
169171 */
170172 double getRank (double quantile , QuantileSearchCriteria searchCrit );
0 commit comments