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

Method print

examples/magic-square-partial.cpp:148–160  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

mFunction · 0.85
widthMethod · 0.45

Tested by

no test coverage detected