MCPcopy Create free account
hub / github.com/Gecode/gecode / print

Method print

examples/sudoku-advanced.cpp:330–347  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

328
329 /// Print solution
330 virtual void
331 print(std::ostream& os) const {
332 os << '\t';
333 for (int i = 0; i<n*n*n*n; i++) {
334 for (int j=0; j<n*n; j++) {
335 if (y[j].contains(i+1)) {
336 if (j+1<10)
337 os << j+1 << " ";
338 else
339 os << (char)(j+1+'A'-10) << " ";
340 break;
341 }
342 }
343 if((i+1)%(n*n) == 0)
344 os << std::endl << '\t';
345 }
346 os << std::endl;
347 }
348};
349
350

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected