commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject [math] Fixed checkstyle warning about parentheses.
Date Mon, 21 Sep 2015 09:29:56 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 6c4e1d719 -> 2aa4681cb


Fixed checkstyle warning about parentheses.

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

Branch: refs/heads/master
Commit: 2aa4681cb82f5b3eee09b2b491a16ceadf52bd27
Parents: 6c4e1d7
Author: Luc Maisonobe <luc@apache.org>
Authored: Mon Sep 21 11:25:08 2015 +0200
Committer: Luc Maisonobe <luc@apache.org>
Committed: Mon Sep 21 11:25:08 2015 +0200

----------------------------------------------------------------------
 .../apache/commons/math4/distribution/GeometricDistribution.java | 2 +-
 .../commons/math4/stat/inference/KolmogorovSmirnovTest.java      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/2aa4681c/src/main/java/org/apache/commons/math4/distribution/GeometricDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/GeometricDistribution.java
b/src/main/java/org/apache/commons/math4/distribution/GeometricDistribution.java
index 011c21f..55456cc 100644
--- a/src/main/java/org/apache/commons/math4/distribution/GeometricDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/GeometricDistribution.java
@@ -187,6 +187,6 @@ public class GeometricDistribution extends AbstractIntegerDistribution
{
         if (p == 0) {
             return 0;
         }
-        return Math.max(0, (int) Math.ceil((FastMath.log1p(-p)/log1mProbabilityOfSuccess-1)));
+        return Math.max(0, (int) Math.ceil(FastMath.log1p(-p)/log1mProbabilityOfSuccess-1));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/2aa4681c/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
index 0ae189e..362630a 100644
--- a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
+++ b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
@@ -249,10 +249,10 @@ public class KolmogorovSmirnovTest {
             if (hasTies(x, y)) {
                 return exactP(x, y, strict);
             }
-            return integralExactP(integralKolmogorovSmirnovStatistic(x, y) + ((strict)?1l:0l),
x.length, y.length);
+            return integralExactP(integralKolmogorovSmirnovStatistic(x, y) + (strict?1l:0l),
x.length, y.length);
         }
         if (lengthProduct < LARGE_SAMPLE_PRODUCT) {
-            return integralMonteCarloP(integralKolmogorovSmirnovStatistic(x, y) + ((strict)?1l:0l),
x.length, y.length, MONTE_CARLO_ITERATIONS);
+            return integralMonteCarloP(integralKolmogorovSmirnovStatistic(x, y) + (strict?1l:0l),
x.length, y.length, MONTE_CARLO_ITERATIONS);
         }
         return approximateP(kolmogorovSmirnovStatistic(x, y), x.length, y.length);
     }


Mime
View raw message