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/10/01 21:59:57 UTC

[incubator-datasketches-java] 01/01: fixed typos

This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch req_fix_typos
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git

commit eb7fa1d97ebd5c2ad89c3474aeeec16b064c1f6e
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Thu Oct 1 14:59:40 2020 -0700

    fixed typos
---
 src/main/java/org/apache/datasketches/Criteria.java  | 20 ++++++++++----------
 .../org/apache/datasketches/req/BaseReqSketch.java   |  2 +-
 .../org/apache/datasketches/req/FloatBuffer.java     |  4 ++--
 .../org/apache/datasketches/req/ReqCompactor.java    |  4 ++--
 .../java/org/apache/datasketches/req/ReqSketch.java  |  4 ++--
 .../apache/datasketches/req/ReqSketchBuilder.java    |  6 +++---
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/datasketches/Criteria.java b/src/main/java/org/apache/datasketches/Criteria.java
index 2fc11ad..a539038 100644
--- a/src/main/java/org/apache/datasketches/Criteria.java
+++ b/src/main/java/org/apache/datasketches/Criteria.java
@@ -27,7 +27,7 @@ package org.apache.datasketches;
 public enum Criteria {
 
   /**
-   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instucts the
+   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instructs the
    * binary search algorithm to find the highest adjacent pair of values <i>{A,B}</i> such that
    * <i>A &lt; V &le; B</i>.
    * The returned value from the binary search algorithm will be the index of <i>A</i>
@@ -90,7 +90,7 @@ public enum Criteria {
   },
 
   /**
-   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instucts the
+   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instructs the
    * binary search algorithm to find the highest adjacent pair of values <i>{A,B}</i> such that
    * <i>A &le; V &lt; B</i>.
    * The returned value from the binary search algorithm will be the index of <i>A</i>
@@ -153,7 +153,7 @@ public enum Criteria {
   },
 
   /**
-   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instucts the
+   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instructs the
    * binary search algorithm to find the adjacent pair of values <i>{A,B}</i> such that
    * <i>A &le; V &le; B</i>.
    * The returned value from the binary search algorithm will be the index of <i>A</i> or <i>B</i>,
@@ -215,7 +215,7 @@ public enum Criteria {
   },
 
   /**
-   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instucts the
+   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instructs the
    * binary search algorithm to find the lowest adjacent pair of values <i>{A,B}</i> such that
    * <i>A &lt; V &le; B</i>.
    * The returned value from the binary search algorithm will be the index of <i>B</i>
@@ -278,7 +278,7 @@ public enum Criteria {
   },
 
   /**
-   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instucts the
+   * Given an sorted array of increasing values and a value <i>V</i>, this criterion instructs the
    * binary search algorithm to find the lowest adjacent pair of values <i>{A,B}</i> such that
    * <i>A &le; V &lt; B</i>.
    * The returned value from the binary search algorithm will be the index of <i>B</i>
@@ -344,7 +344,7 @@ public enum Criteria {
    * The call to compare index a and index b with the value v.
    * @param arr The underlying sorted array of double values
    * @param a the lower index of the current pair
-   * @param b the higer index of the current pair
+   * @param b the higher index of the current pair
    * @param v the double value to search for
    * @return +1, which means we must search higher in the aray, or -1, whicn means we must
    * search lower in the array, or 0, which means we have found the correct bounding pair.
@@ -355,9 +355,9 @@ public enum Criteria {
    * The call to compare index a and index b with the value v.
    * @param arr The underlying sorted array of float values
    * @param a the lower index of the current pair
-   * @param b the higer index of the current pair
+   * @param b the higher index of the current pair
    * @param v the float value to search for
-   * @return +1, which means we must search higher in the aray, or -1, whicn means we must
+   * @return +1, which means we must search higher in the array, or -1, which means we must
    * search lower in the array, or 0, which means we have found the correct bounding pair.
    */
   abstract int compare(float[] arr, int a, int b, float v);
@@ -367,7 +367,7 @@ public enum Criteria {
    * found value that satisfies the selected criteria.
    * @param arr the array being searched
    * @param a the lower index of the current pair
-   * @param b the higer index of the current pair
+   * @param b the higher index of the current pair
    * @param v the value being searched for.
    * @return the index of the found value that satisfies the selected criteria.
    */
@@ -378,7 +378,7 @@ public enum Criteria {
    * found value that satisfies the selected criteria.
    * @param arr the array being searched
    * @param a the lower index of the current pair
-   * @param b the higer index of the current pair
+   * @param b the higher index of the current pair
    * @param v the value being searched for.
    * @return the index of the found value that satisfies the selected criteria.
    */
diff --git a/src/main/java/org/apache/datasketches/req/BaseReqSketch.java b/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
index 87075a0..327462a 100644
--- a/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
+++ b/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
@@ -41,7 +41,7 @@ abstract class BaseReqSketch {
    * 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
diff --git a/src/main/java/org/apache/datasketches/req/FloatBuffer.java b/src/main/java/org/apache/datasketches/req/FloatBuffer.java
index 7b1cb7d..2b8228f 100755
--- a/src/main/java/org/apache/datasketches/req/FloatBuffer.java
+++ b/src/main/java/org/apache/datasketches/req/FloatBuffer.java
@@ -98,7 +98,7 @@ class FloatBuffer {
   /**
    * Wraps the given array to use as the internal array; thus no copies. For internal use.
    * @param arr the given array
-   * @param isSorted set true, if incomming array is already sorted.
+   * @param isSorted set true, if incoming array is already sorted.
    * @param spaceAtBottom if true, create any extra space at the bottom of the buffer,
    * otherwise, create any extra space at the top of the buffer.
    * @return this, which will be sorted
@@ -189,7 +189,7 @@ class FloatBuffer {
   int getCountWithCriterion(final float value, final Criteria criterion) {
     assert !Float.isNaN(value) : "Float values must not be NaN.";
     if (!sorted_) { sort(); } //we must be sorted!
-    int low = 0;    //iniitalized to space at top
+    int low = 0;    //Initialized to space at top
     int high = count_ - 1;
     if (spaceAtBottom_) {
       low = capacity_ - count_;
diff --git a/src/main/java/org/apache/datasketches/req/ReqCompactor.java b/src/main/java/org/apache/datasketches/req/ReqCompactor.java
index ec9181e..48fc017 100644
--- a/src/main/java/org/apache/datasketches/req/ReqCompactor.java
+++ b/src/main/java/org/apache/datasketches/req/ReqCompactor.java
@@ -71,7 +71,7 @@ class ReqCompactor {
   }
 
   /**
-   * Copy Constuctor
+   * Copy Constructor
    * @param other the compactor to be copied into this one
    */
   ReqCompactor(final ReqCompactor other) {
@@ -216,7 +216,7 @@ class ReqCompactor {
   }
 
   /**
-   * Computes the size of the non-compated region, which is the start index of the
+   * Computes the size of the non-compacted region, which is the start index of the
    * compacted region
    * @param secsToCompact the number of contiguous sections to compact
    * @return the start index of the compacted region
diff --git a/src/main/java/org/apache/datasketches/req/ReqSketch.java b/src/main/java/org/apache/datasketches/req/ReqSketch.java
index c14541d..c2b5576 100644
--- a/src/main/java/org/apache/datasketches/req/ReqSketch.java
+++ b/src/main/java/org/apache/datasketches/req/ReqSketch.java
@@ -55,7 +55,7 @@ import org.apache.datasketches.SketchesArgumentException;
  * to allow for a tight mathematical analysis of the sketch.</li>
  * </ul>
  *
- * <p>This implementation provides a number of capabilites not discussed in the paper or provided
+ * <p>This implementation provides a number of capabilities not discussed in the paper or provided
  * in the Python prototype.</p>
  * <ul><li>The Python prototype only implemented high accuracy for low ranks. This implementation
  * provides the user with the ability to choose either high rank accuracy or low rank accuracy at
@@ -468,7 +468,7 @@ public class ReqSketch extends BaseReqSketch {
 
   /**
    * <b>NOTE:</b> This is public only to allow testing from another
-   * package and is not intened for use by normal users of this class.
+   * package and is not intended for use by normal users of this class.
    * @param criterion one of LT, LE, GT, GE.
    * @return this
    */
diff --git a/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java b/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
index 29832c4..63ca55f 100644
--- a/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
+++ b/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
@@ -80,8 +80,8 @@ public class ReqSketchBuilder {
   }
 
   /**
-   * Gets the builder confibured value of High Rank Accuracy.
-   * @return the builder confibured value of High Rank Accuracy.
+   * Gets the builder configured value of High Rank Accuracy.
+   * @return the builder configured value of High Rank Accuracy.
    */
   public boolean getHighRankAccuracy() {
     return bHRA;
@@ -99,7 +99,7 @@ public class ReqSketchBuilder {
 
   /**
    * Gets the builder configured value of Less-Than-Or-Equal.
-   * @return the builder confibured value of Less-Than-Or-Equal
+   * @return the builder configured value of Less-Than-Or-Equal
    */
   public boolean getLessThanOrEqual() {
     return bLtEq;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org