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:
parent
9072f7e813
commit
a998dcce9c
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue