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

Method print

examples/qcp.cpp:260–274  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

258 }
259 /// Print solution
260 virtual void
261 print(std::ostream& os) const {
262 int n = spec.size();
263 Matrix<IntVarArray> m(e, n);
264
265 for (int i=0; i<n; i++) {
266 os << "\t";
267 for (int j=0; j<n; j++) {
268 if (m(i,j).assigned())
269 os.width(2);
270 os << m(i,j) << " ";
271 }
272 os << std::endl;
273 }
274 }
275};
276
277/** \brief Main-function

Callers 1

scowl.hppFile · 0.45

Calls 4

mFunction · 0.85
sizeMethod · 0.45
assignedMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected