FromChildToParentIterator iterator = new FromChildToParentIterator(t);
Tensor c;
while ((c = iterator.next()) != null)
if (c instanceof Product)
iterator.set(inverseOrderInProduct((Product) c, type));
return iterator.result();
}
private static Tensor inverseOrderInProduct(Product product, IndexType type) {
ProductContent pc = product.getContent();
PrimitiveSubgraph[] subgraphs = PrimitiveSubgraphPartition.calculatePartition(pc, type);