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

Method print

examples/magic-square.cpp:119–131  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

mFunction · 0.85
widthMethod · 0.45

Tested by

no test coverage detected