-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.4.1
-
Fix Version/s: 4.0
-
Labels:None
For a storeless statistic it is wrong to extend AbstractUnivariateStatistic as various fields and methods are inherited that do not make sense in case of a storeless statistic.
This means a user can accidentially use a storeless statistic in a wrong way:
Mean mean = new Mean(); mean.increment(1); mean.increment(2); mean.setData(new double[] { 1, 2, 3}); System.out.println(mean.getResult()); System.out.println(mean.evaluate());
will output
1.5 2.0