Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);
//symmetries of product, which is contracted with Levi-Civita
MappingsPort port = IndexMappings.createPort(temp, temp);
IndexMappingBuffer buffer;
Symmetry sym;
//check for two symmetric indices of product contracted with two antisymmetric indices of eps
while ((buffer = port.take()) != null) {
//symmetry of product indices
sym = TensorUtils.getSymmetryFromMapping(indices, buffer);
//if symmetry mixes indices of product, which are not contracted with eps
if (!checkNonPermutingPositions(sym, nonPermutableArray))
continue;
//bingo!
if (sym.isAntiSymmetry() != symmetries.get(sym.getPermutation()))
return Complex.ZERO;
}
}