Repository: commons-math Updated Branches: refs/heads/MATH_3_X 4f1d85c0b -> 4025b62c7
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/4025b62c Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/4025b62c Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/4025b62c Branch: refs/heads/MATH_3_X Commit: 4025b62c7d8e0cdc7ebca856ccafc6365183fb87 Parents: 4f1d85c Author: Luc Maisonobe <[email protected]> Authored: Mon Sep 21 11:21:23 2015 +0200 Committer: Luc Maisonobe <[email protected]> Committed: Mon Sep 21 11:21:23 2015 +0200 ---------------------------------------------------------------------- .../apache/commons/math3/distribution/GeometricDistribution.java | 2 +- .../commons/math3/stat/inference/KolmogorovSmirnovTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/4025b62c/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java b/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java index 89ffcb6..68b2c4e 100644 --- a/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java +++ b/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java @@ -180,6 +180,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/4025b62c/src/main/java/org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.java b/src/main/java/org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.java index eac1546..bec7294 100644 --- a/src/main/java/org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.java +++ b/src/main/java/org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.java @@ -245,10 +245,10 @@ public class KolmogorovSmirnovTest { public double kolmogorovSmirnovTest(double[] x, double[] y, boolean strict) { final long lengthProduct = (long) x.length * y.length; if (lengthProduct < SMALL_SAMPLE_PRODUCT) { - 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); }
