Print solution
| 117 | } |
| 118 | /// Print solution |
| 119 | virtual void |
| 120 | print(std::ostream& os) const { |
| 121 | // Matrix-wrapper for the square |
| 122 | Matrix<IntVarArray> m(x, n, n); |
| 123 | for (int i = 0; i<n; i++) { |
| 124 | os << "\t"; |
| 125 | for (int j = 0; j<n; j++) { |
| 126 | os.width(2); |
| 127 | os << m(i,j) << " "; |
| 128 | } |
| 129 | os << std::endl; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | }; |
| 134 |