leerho commented on code in PR #411:
URL: https://github.com/apache/datasketches-java/pull/411#discussion_r947075724


##########
src/main/java/org/apache/datasketches/DoublesSortedView.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.datasketches;
+
+/**
+ * The Sorted View for double values.
+ *
+ * @author Alexander Saydakov
+ * @author Lee Rhodes
+ */
+public interface DoublesSortedView extends SortedView {
+
+  /**
+   * Gets the quantile based on the given normalized rank, and the given 
search criterion.
+   * @param normalizedRank the given normalized rank, which must be in the 
range [0.0, 1.0].
+   * @param searchCrit the given search criterion to use.
+   * @return the associated quantile value.
+   */
+  double getQuantile(double normalizedRank, QuantileSearchCriteria searchCrit);
+
+  /**
+   * Gets the normalized rank based on the given quantile value.
+   * @param value the given quantile value
+   * @param searchCrit the given search criterion to use.
+   * @return the normalized rank, which is a number in the range [0.0, 1.0].
+   */
+  double getRank(double value, QuantileSearchCriteria searchCrit);
+
+  /**
+   * Returns an array of values where each value is a number in the range 
[0.0, 1.0].
+   * The size of this array is one larger than the size of the input 
splitPoints array.
+   *
+   * <p>If <i>isCdf</i> is true, the points in the returned array are 
monotonically increasing and end with the
+   * value 1.0. Each value represents a point along the cumulative 
distribution function that approximates
+   * the CDF of the input data stream. Therefore, each point represents the 
fractional density of the distribution
+   * between from zero. For example, if one of the returned values is 0.5, 
then the splitPoint corresponding to that
+   * value would be the median of the distribution.</p>

Review Comment:
   Agreed.  If I change it in this PR it will create a conflict with  the next 
PR. So I will change it the next PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to