FromChildToParentIterator iterator = new FromChildToParentIterator(t);
Tensor c;
while ((c = iterator.next()) != null)
if (c instanceof Sum) {
//TODO add check whether we need to do this transformation
SumBuilderSplitingScalars sbss = new SumBuilderSplitingScalars(c.size());
for (Tensor tt : c)
sbss.put(tt);
iterator.set(sbss.build());
}
return iterator.result();
}