| 879 | // Symmetry functions |
| 880 | namespace { |
| 881 | int pos(int h, int w, int h1, int w1) { |
| 882 | if (!(0 <= h && h < h1) || |
| 883 | !(0 <= w && w < w1)) { |
| 884 | std::cerr << "Cannot place (" << h << "," << w |
| 885 | << ") on board of size " << h1 << "x" << w1 << std::endl; |
| 886 | } |
| 887 | return h * w1 + w; |
| 888 | } |
| 889 | template<class CArray, class Array> |
| 890 | void id(CArray t1, int w1, int h1, Array t2, int& w2, int&h2) { |
| 891 | w2 = w1; h2 = h1; |