From 9b0730473545a2b3db6a114c0e8bb1f8219f9d30 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Sat, 1 Jan 2011 20:15:27 +0000 Subject: [PATCH] Fixed checkstyle errors: hidden fields, missing javadoc. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1054280 13f79535-47bb-0310-9956-ffa450edef68 --- .../distribution/BetaDistributionImpl.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java b/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java index 3547d55b1..3ab3b594b 100644 --- a/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java +++ b/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java @@ -261,8 +261,8 @@ public class BetaDistributionImpl */ @Override protected double calculateNumericalMean() { - final double alpha = getAlpha(); - return alpha / (alpha + getBeta()); + final double a = getAlpha(); + return a / (a + getBeta()); } /** @@ -277,17 +277,23 @@ public class BetaDistributionImpl */ @Override protected double calculateNumericalVariance() { - final double alpha = getAlpha(); - final double beta = getBeta(); - final double alphabetasum = alpha + beta; - return (alpha * beta) / ((alphabetasum * alphabetasum) * (alphabetasum + 1)); + final double a = getAlpha(); + final double b = getBeta(); + final double alphabetasum = a + b; + return (a * b) / ((alphabetasum * alphabetasum) * (alphabetasum + 1)); } + /** + * {@inheritDoc} + */ @Override public boolean isSupportLowerBoundInclusive() { return false; } + /** + * {@inheritDoc} + */ @Override public boolean isSupportUpperBoundInclusive() { return false;