0
我正在使用Apache DescriptiveStatistics来计算统计信息,但存在问题。我有一堆实体生成值,每次迭代时我都想更新与实体关联的值。键值描述性统计
比如我可以在整个城市的1000个不同的地点跟踪当前的温度,我想能够计算为城市的一些平均气温:
for (Location location: locations) {
double temperature = location.getCurrentTemperature();
stats.update(location, temperature);
}
// Average: stats.getMean();
它有没有办法做到这一点?