commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1054306 - in /commons/proper/math: branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
Date Sat, 01 Jan 2011 22:50:02 GMT
Author: psteitz
Date: Sat Jan  1 22:50:02 2011
New Revision: 1054306

URL: http://svn.apache.org/viewvc?rev=1054306&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/WeibullDistributionImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java?rev=1054306&r1=1054305&r2=1054306&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
Sat Jan  1 22:50:02 2011
@@ -298,10 +298,10 @@ public class WeibullDistributionImpl ext
      */
     @Override
     protected double calculateNumericalMean() {
-        final double shape = getShape();
-        final double scale = getScale();
+        final double sh = getShape();
+        final double sc = getScale();
 
-        return scale * FastMath.exp(Gamma.logGamma(1 + (1 / shape)));
+        return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh)));
     }
 
     /**
@@ -315,20 +315,26 @@ public class WeibullDistributionImpl ext
      */
     @Override
     protected double calculateNumericalVariance() {
-        final double shape = getShape();
-        final double scale = getScale();
-        final double mean = getNumericalMean();
+        final double sh = getShape();
+        final double sc = getScale();
+        final double mn = getNumericalMean();
 
-        return (scale * scale) *
-            FastMath.exp(Gamma.logGamma(1 + (2 / shape))) -
-            (mean * mean);
+        return (sc * sc) *
+            FastMath.exp(Gamma.logGamma(1 + (2 / sh))) -
+            (mn * mn);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public boolean isSupportLowerBoundInclusive() {
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public boolean isSupportUpperBoundInclusive() {
         return false;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java?rev=1054306&r1=1054305&r2=1054306&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
Sat Jan  1 22:50:02 2011
@@ -252,10 +252,10 @@ public class WeibullDistributionImpl ext
      */
     @Override
     protected double calculateNumericalMean() {
-        final double shape = getShape();
-        final double scale = getScale();
+        final double sh = getShape();
+        final double sc = getScale();
 
-        return scale * FastMath.exp(Gamma.logGamma(1 + (1 / shape)));
+        return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh)));
     }
 
     /**
@@ -269,20 +269,26 @@ public class WeibullDistributionImpl ext
      */
     @Override
     protected double calculateNumericalVariance() {
-        final double shape = getShape();
-        final double scale = getScale();
-        final double mean = getNumericalMean();
+        final double sh = getShape();
+        final double sc = getScale();
+        final double mn = getNumericalMean();
 
-        return (scale * scale) * 
-            FastMath.exp(Gamma.logGamma(1 + (2 / shape))) -
-            (mean * mean);
+        return (sc * sc) * 
+            FastMath.exp(Gamma.logGamma(1 + (2 / sh))) -
+            (mn * mn);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public boolean isSupportLowerBoundInclusive() {
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public boolean isSupportUpperBoundInclusive() {
         return false;



Mime
View raw message