aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChandan Kumar <chandan.kumar@imaginea.com>2014-08-09 00:45:54 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-08-09 00:45:54 -0700
commitb431e6747f410aaf9624585920adc1f303159861 (patch)
tree4f5765b6a0642b135b36eb86462828328b60644b /core
parent28dbae85aaf6842e22cd7465cb11cb34d58fc56d (diff)
downloadspark-b431e6747f410aaf9624585920adc1f303159861.tar.gz
spark-b431e6747f410aaf9624585920adc1f303159861.tar.bz2
spark-b431e6747f410aaf9624585920adc1f303159861.zip
[SPARK-2861] Fix Doc comment of histogram method
Tested and ready to merge. Author: Chandan Kumar <chandan.kumar@imaginea.com> Closes #1786 from nrchandan/spark-2861 and squashes the following commits: cb0bc1e [Chandan Kumar] [SPARK-2861] Fix a typo in the histogram doc comment 6a2a71b [Chandan Kumar] SPARK-2861. Fix Doc comment of histogram method
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala b/core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala
index 9ca971c8a4..f233544d12 100644
--- a/core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala
+++ b/core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala
@@ -119,11 +119,11 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
/**
* Compute a histogram using the provided buckets. The buckets are all open
- * to the left except for the last which is closed
+ * to the right except for the last which is closed
* e.g. for the array
* [1, 10, 20, 50] the buckets are [1, 10) [10, 20) [20, 50]
- * e.g 1<=x<10 , 10<=x<20, 20<=x<50
- * And on the input of 1 and 50 we would have a histogram of 1, 0, 0
+ * e.g 1<=x<10 , 10<=x<20, 20<=x<=50
+ * And on the input of 1 and 50 we would have a histogram of 1, 0, 1
*
* Note: if your histogram is evenly spaced (e.g. [0, 10, 20, 30]) this can be switched
* from an O(log n) inseration to O(1) per element. (where n = # buckets) if you set evenBuckets