ib.append(tensor.getIndices()).append(ind);
return CC.createSimpleTensor(
CC.getNameDescriptor(((SimpleTensor) tensor).getName()).getName(), (SimpleIndices) ib.getIndices());
} else if (tensor instanceof Sum) {
Sum newSum = new Sum();
IndexGeneratorWrapper wrapper = new IndexGeneratorWrapper(indexGenerator);
for (Tensor t : tensor) {
//TODO review !!!!!!!!!!!!
//FIXME review !!!!!!!!!!!!
// newSum.add(transform(t, wrapper, ind));
// BUG bug was detected in cc.redberry physics
// we used generator instead of wrapper
newSum.add(transform(t, indexGenerator, ind));
wrapper.dump();
}
wrapper.write();
return newSum;
} else if (tensor instanceof Product) {
Product p = new Product();
TensorIterator iterator = tensor.iterator();
Tensor current;