return calculation.calculate(toNumberArray(viewItem
.getResources(subset)));
}
private NumberArray toNumberArray(LightweightCollection<Resource> resources) {
NumberArray numberArray = MathUtils.createNumberArray();
for (Resource resource : resources) {
// TODO, what happens if this is null, should that be possible,
// should it not show those resources
// TODO also what is used by default and does that make sense
// TODO but what would happen to number array if slot was missing
numberArray.push((Double) resource.getValue(property));
}
return numberArray;
}