commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject [4/4] [math] Fixed hidden field warning.
Date Mon, 02 Nov 2015 14:35:10 GMT
Fixed hidden field warning.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/026fce5c
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/026fce5c
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/026fce5c

Branch: refs/heads/master
Commit: 026fce5c5f01d7b712dc06db738e9e2699c9b118
Parents: bf7e9d5
Author: Luc Maisonobe <luc@apache.org>
Authored: Mon Nov 2 15:09:43 2015 +0100
Committer: Luc Maisonobe <luc@apache.org>
Committed: Mon Nov 2 15:09:43 2015 +0100

----------------------------------------------------------------------
 .../math4/stat/descriptive/rank/Percentile.java | 34 ++++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/026fce5c/src/main/java/org/apache/commons/math4/stat/descriptive/rank/Percentile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/Percentile.java
b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/Percentile.java
index 23d1a8e..a4f0eea 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/Percentile.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/Percentile.java
@@ -716,8 +716,8 @@ public class Percentile extends AbstractUnivariateStatistic implements
Serializa
             @Override
             protected double estimate(final double[] values,
                                       final int[] pivotsHeap, final double pos,
-                                      final int length, final KthSelector kthSelector) {
-                return super.estimate(values, pivotsHeap, FastMath.ceil(pos - 0.5), length,
kthSelector);
+                                      final int length, final KthSelector selector) {
+                return super.estimate(values, pivotsHeap, FastMath.ceil(pos - 0.5), length,
selector);
             }
 
         },
@@ -748,11 +748,11 @@ public class Percentile extends AbstractUnivariateStatistic implements
Serializa
             @Override
             protected double estimate(final double[] values,
                                       final int[] pivotsHeap, final double pos,
-                                      final int length, final KthSelector kthSelector) {
+                                      final int length, final KthSelector selector) {
                 final double low =
-                        super.estimate(values, pivotsHeap, FastMath.ceil(pos - 0.5), length,
kthSelector);
+                        super.estimate(values, pivotsHeap, FastMath.ceil(pos - 0.5), length,
selector);
                 final double high =
-                        super.estimate(values, pivotsHeap,FastMath.floor(pos + 0.5), length,
kthSelector);
+                        super.estimate(values, pivotsHeap,FastMath.floor(pos + 0.5), length,
selector);
                 return (low + high) / 2;
             }
 
@@ -953,26 +953,26 @@ public class Percentile extends AbstractUnivariateStatistic implements
Serializa
          *            {@link #index(double, int)}
          * @param pivotsHeap an earlier populated cache if exists; will be used
          * @param length size of array considered
-         * @param kthSelector a {@link KthSelector} used for pivoting during search
+         * @param selector a {@link KthSelector} used for pivoting during search
          * @return estimated percentile
          */
         protected double estimate(final double[] work, final int[] pivotsHeap,
                                   final double pos, final int length,
-                                  final KthSelector kthSelector) {
+                                  final KthSelector selector) {
 
             final double fpos = FastMath.floor(pos);
             final int intPos = (int) fpos;
             final double dif = pos - fpos;
 
             if (pos < 1) {
-                return kthSelector.select(work, pivotsHeap, 0);
+                return selector.select(work, pivotsHeap, 0);
             }
             if (pos >= length) {
-                return kthSelector.select(work, pivotsHeap, length - 1);
+                return selector.select(work, pivotsHeap, length - 1);
             }
 
-            final double lower = kthSelector.select(work, pivotsHeap, intPos - 1);
-            final double upper = kthSelector.select(work, pivotsHeap, intPos);
+            final double lower = selector.select(work, pivotsHeap, intPos - 1);
+            final double upper = selector.select(work, pivotsHeap, intPos);
             return lower + dif * (upper - lower);
         }
 
@@ -986,19 +986,19 @@ public class Percentile extends AbstractUnivariateStatistic implements
Serializa
          * @param work array of numbers to be used for finding the percentile
          * @param pivotsHeap a prior cached heap which can speed up estimation
          * @param p the p<sup>th</sup> quantile to be computed
-         * @param kthSelector a {@link KthSelector} used for pivoting during search
+         * @param selector a {@link KthSelector} used for pivoting during search
          * @return estimated percentile
          * @throws OutOfRangeException if p is out of range
          * @throws NullArgumentException if work array is null
          */
         protected double evaluate(final double[] work, final int[] pivotsHeap, final double
p,
-                                  final KthSelector kthSelector) {
+                                  final KthSelector selector) {
             MathUtils.checkNotNull(work);
             if (p > 100 || p <= 0) {
                 throw new OutOfRangeException(LocalizedFormats.OUT_OF_BOUNDS_QUANTILE_VALUE,
                                               p, 0, 100);
             }
-            return estimate(work, pivotsHeap, index(p/100d, work.length), work.length, kthSelector);
+            return estimate(work, pivotsHeap, index(p/100d, work.length), work.length, selector);
         }
 
         /**
@@ -1011,12 +1011,12 @@ public class Percentile extends AbstractUnivariateStatistic implements
Serializa
          * @param work array of numbers to be used for finding the percentile
          * @param p the p<sup>th</sup> quantile to be computed
          * @return estimated percentile
-         * @param kthSelector a {@link KthSelector} used for pivoting during search
+         * @param selector a {@link KthSelector} used for pivoting during search
          * @throws OutOfRangeException if length or p is out of range
          * @throws NullArgumentException if work array is null
          */
-        public double evaluate(final double[] work, final double p, final KthSelector kthSelector)
{
-            return this.evaluate(work, null, p, kthSelector);
+        public double evaluate(final double[] work, final double p, final KthSelector selector)
{
+            return this.evaluate(work, null, p, selector);
         }
 
         /**


Mime
View raw message