iterator.set(expandProductOfSums(current, indicator, transformations, threads));
else if (current instanceof Power && current.get(0) instanceof Sum
&& TensorUtils.isNatural(current.get(1)) && indicator.is(current))
iterator.set(expandPower((Sum) current.get(0), ((Complex) current.get(1)).getReal().intValue(), transformations, threads));
}
return iterator.result();
}
private static Tensor expandProductOfSums(Tensor current, Indicator<Tensor> indicator, Transformation[] transformations, final int threads) {
// g_mn {_m->^a, _n->_b} => g^a_b <=> d^a_b | Tensors.isMetric(g_ab ) d_a^b