我有了 f(a,b,c,d) = f(c,d,a,b) = -f(b,a,d,c) = -f(d,c,b,a) 我用它来完全填充一个四维阵列以下permutational对称性的标量函数f(a,b,c,d)。这下面的作品代码(使用python/NumPy的): A = np.zeros((N,N,N,N))
for a in range(N):
for b in range(N):
One of the samples for the Google or-tools is a solver for the n-queens problem.在底部它说实施可以通过增加约束求解器的对称性破坏约束来改善。 环顾互联网,I found the symmetry breaking constraints for the n-queens problem,但我不能为我的生活弄清楚如何将这