Map<IntArray, Boolean> symmetries = cachedLeviCivitaSymmetries.get(indicesSize);
if (symmetries != null)
return symmetries;
symmetries = new HashMap<>();
Symmetries ss = SymmetriesFactory.createSymmetries(indicesSize);
ss.addUnsafe(new Symmetry(Combinatorics.createTransposition(indicesSize, 0, 1), true));
if (indicesSize % 2 == 0)
ss.addUnsafe(new Symmetry(Combinatorics.createCycle(indicesSize), true));
else
ss.addUnsafe(new Symmetry(Combinatorics.createCycle(indicesSize), false));
for (Symmetry symmetry : ss)
symmetries.put(symmetry.getPermutation(), symmetry.isAntiSymmetry());
cachedLeviCivitaSymmetries.put(indicesSize, symmetries);
return symmetries;
}