Print solution
| 146 | } |
| 147 | /// Print solution |
| 148 | virtual void |
| 149 | print(std::ostream& os) const { |
| 150 | // Matrix-wrapper for the square |
| 151 | Matrix<IntVarArray> m(x, n, n); |
| 152 | for (int i = 0; i<n; i++) { |
| 153 | os << "\t"; |
| 154 | for (int j = 0; j<n; j++) { |
| 155 | os.width(2); |
| 156 | os << m(i,j) << " "; |
| 157 | } |
| 158 | os << std::endl; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | }; |
| 163 |