You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2020/04/14 02:31:03 UTC
[incubator-datasketches-java] 01/01: minor fixes
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch doc_fixes
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git
commit 1fedba273d4aa994f23413dc7d1e18b4eebf3246
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Apr 13 19:30:38 2020 -0700
minor fixes
---
.../apache/datasketches/frequencies/ItemsSketch.java | 20 ++++++++++----------
.../org/apache/datasketches/kll/KllFloatsSketch.java | 10 +++++-----
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/frequencies/ItemsSketch.java b/src/main/java/org/apache/datasketches/frequencies/ItemsSketch.java
index 3af2f40..a4fd947 100644
--- a/src/main/java/org/apache/datasketches/frequencies/ItemsSketch.java
+++ b/src/main/java/org/apache/datasketches/frequencies/ItemsSketch.java
@@ -135,7 +135,7 @@ import org.apache.datasketches.memory.WritableMemory;
* </ul>
*
* <sup>1</sup> For speed we do employ some randomization that introduces a small probability that
- * our proof of the worst-case bound might not apply to a given run. However, we have ensured
+ * our proof of the worst-case bound might not apply to a given run. However, we have ensured
* that this probability is extremely small. For example, if the stream causes one table purge
* (rebuild), our proof of the worst case bound applies with probability at least 1 - 1E-14.
* If the stream causes 1E9 purges, our proof applies with probability at least 1 - 1E-5.
@@ -183,21 +183,21 @@ public class ItemsSketch<T> {
* Construct this sketch with the parameter maxMapSize and the default initialMapSize (8).
*
* @param maxMapSize Determines the physical size of the internal hash map managed by this
- * sketch and must be a power of 2. The maximum capacity of this internal hash map is
- * 0.75 times * maxMapSize. Both the ultimate accuracy and size of this sketch are a
- * function of maxMapSize.
+ * sketch and must be a power of 2. The maximum capacity of this internal hash map is
+ * 0.75 times * maxMapSize. Both the ultimate accuracy and size of this sketch are
+ * functions of maxMapSize.
*/
public ItemsSketch(final int maxMapSize) {
this(toLog2(maxMapSize, "maxMapSize"), LG_MIN_MAP_SIZE);
}
/**
- * Construct this sketch with parameter lgMapMapSize and lgCurMapSize. This internal
+ * Construct this sketch with parameter lgMaxMapSize and lgCurMapSize. This internal
* constructor is used when deserializing the sketch.
*
* @param lgMaxMapSize Log2 of the physical size of the internal hash map managed by this
* sketch. The maximum capacity of this internal hash map is 0.75 times 2^lgMaxMapSize.
- * Both the ultimate accuracy and size of this sketch are a function of lgMaxMapSize.
+ * Both the ultimate accuracy and size of this sketch are functions of lgMaxMapSize.
*
* @param lgCurMapSize Log2 of the starting (current) physical size of the internal hash
* map managed by this sketch.
@@ -567,11 +567,11 @@ public class ItemsSketch<T> {
}
/**
- * Update this sketch with a item and a positive frequency count.
- * @param item for which the frequency should be increased. The item can be any long value and is
- * only used by the sketch to determine uniqueness.
+ * Update this sketch with an item and a positive frequency count.
+ * @param item for which the frequency should be increased. The sketch uses
+ * hashCode() and equals() methods of the type T.
* @param count the amount by which the frequency of the item should be increased.
- * An count of zero is a no-op, and a negative count will throw an exception.
+ * A count of zero is a no-op, and a negative count will throw an exception.
*/
public void update(final T item, final long count) {
if ((item == null) || (count == 0)) {
diff --git a/src/main/java/org/apache/datasketches/kll/KllFloatsSketch.java b/src/main/java/org/apache/datasketches/kll/KllFloatsSketch.java
index f564985..c571f31 100644
--- a/src/main/java/org/apache/datasketches/kll/KllFloatsSketch.java
+++ b/src/main/java/org/apache/datasketches/kll/KllFloatsSketch.java
@@ -520,7 +520,7 @@ public class KllFloatsSketch {
* Returns an approximation to the normalized (fractional) rank of the given value from 0 to 1,
* inclusive.
*
- * <p>The resulting approximation has a probabilistic guarantee that be obtained from the
+ * <p>The resulting approximation has a probabilistic guarantee that can be obtained from the
* getNormalizedRankError(false) function.
*
* <p>If the sketch is empty this returns NaN.</p>
@@ -553,7 +553,7 @@ public class KllFloatsSketch {
* Returns an approximation to the Probability Mass Function (PMF) of the input stream
* given a set of splitPoints (values).
*
- * <p>The resulting approximations have a probabilistic guarantee that be obtained from the
+ * <p>The resulting approximations have a probabilistic guarantee that can be obtained from the
* getNormalizedRankError(true) function.
*
* <p>If the sketch is empty this returns null.</p>
@@ -563,7 +563,7 @@ public class KllFloatsSketch {
* The definition of an "interval" is inclusive of the left splitPoint (or minimum value) and
* exclusive of the right splitPoint, with the exception that the last interval will include
* the maximum value.
- * It is not necessary to include either the min or max values in these splitpoints.
+ * It is not necessary to include either the min or max values in these split points.
*
* @return an array of m+1 doubles each of which is an approximation
* to the fraction of the input stream values (the mass) that fall into one of those intervals.
@@ -578,7 +578,7 @@ public class KllFloatsSketch {
* Returns an approximation to the Cumulative Distribution Function (CDF), which is the
* cumulative analog of the PMF, of the input stream given a set of splitPoint (values).
*
- * <p>The resulting approximations have a probabilistic guarantee that be obtained from the
+ * <p>The resulting approximations have a probabilistic guarantee that can be obtained from the
* getNormalizedRankError(false) function.
*
* <p>If the sketch is empty this returns null.</p>
@@ -588,7 +588,7 @@ public class KllFloatsSketch {
* The definition of an "interval" is inclusive of the left splitPoint (or minimum value) and
* exclusive of the right splitPoint, with the exception that the last interval will include
* the maximum value.
- * It is not necessary to include either the min or max values in these splitpoints.
+ * It is not necessary to include either the min or max values in these split points.
*
* @return an array of m+1 double values, which are a consecutive approximation to the CDF
* of the input stream given the splitPoints. The value at array position j of the returned
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org