commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1054280 - in /commons/proper/math: branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
Date Sat, 01 Jan 2011 20:15:27 GMT
Author: psteitz
Date: Sat Jan  1 20:15:27 2011
New Revision: 1054280

URL: http://svn.apache.org/viewvc?rev=1054280&view=rev
Log:
Fixed checkstyle errors: hidden fields, missing javadoc.

Modified:
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java?rev=1054280&r1=1054279&r2=1054280&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
Sat Jan  1 20:15:27 2011
@@ -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;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java?rev=1054280&r1=1054279&r2=1054280&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
Sat Jan  1 20:15:27 2011
@@ -220,8 +220,8 @@ public class BetaDistributionImpl
      */
     @Override
     protected double calculateNumericalMean() {
-        final double alpha = getAlpha();
-        return alpha / (alpha + getBeta());
+        final double a = getAlpha();
+        return a / (a + getBeta());
     }
 
     /**
@@ -236,17 +236,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;



Mime
View raw message