commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1296546 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment: FourthMoment.java Kurtosis.java
Date Sat, 03 Mar 2012 01:30:03 GMT
Author: sebb
Date: Sat Mar  3 01:30:03 2012
New Revision: 1296546

URL: http://svn.apache.org/viewvc?rev=1296546&view=rev
Log:
Use getter, and make underlying variable private

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java?rev=1296546&r1=1296545&r2=1296546&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java
Sat Mar  3 01:30:03 2012
@@ -59,7 +59,7 @@ class FourthMoment extends ThirdMoment i
     private static final long serialVersionUID = 4763990447117157611L;
 
     /** fourth moment of values that have been added */
-    protected double m4;
+    private double m4;
 
     /**
      * Create a FourthMoment instance

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java?rev=1296546&r1=1296545&r2=1296546&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java
Sat Mar  3 01:30:03 2012
@@ -115,7 +115,7 @@ public class Kurtosis extends AbstractSt
                 } else {
                     double n = moment.n;
                     kurtosis =
-                        (n * (n + 1) * moment.m4 -
+                        (n * (n + 1) * moment.getResult() -
                                 3 * moment.m2 * moment.m2 * (n - 1)) /
                                 ((n - 1) * (n -2) * (n -3) * variance * variance);
                 }



Mime
View raw message