Use getter, and make underlying variable private

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1296546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-03 01:30:03 +00:00
parent 9072f7e813
commit a998dcce9c
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class FourthMoment extends ThirdMoment implements Serializable{
private static final long serialVersionUID = 4763990447117157611L;
/** fourth moment of values that have been added */
protected double m4;
private double m4;
/**
* Create a FourthMoment instance

View File

@ -115,7 +115,7 @@ public class Kurtosis extends AbstractStorelessUnivariateStatistic implements S
} 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);
}