Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.1
-
None
-
None
Description
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