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

Method print

examples/nonogram.cpp:181–191  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

179
180 /// Print solution
181 virtual void
182 print(std::ostream& os) const {
183 Matrix<BoolVarArray> m(b, width(), height());
184 for (int h = 0; h < height(); ++h) {
185 os << '\t';
186 for (int w = 0; w < width(); ++w)
187 os << ((m(w,h).val() == 1) ? '#' : ' ');
188 os << std::endl;
189 }
190 os << std::endl;
191 }
192};
193
194

Callers

nothing calls this directly

Calls 3

widthFunction · 0.85
mFunction · 0.85
valMethod · 0.45

Tested by

no test coverage detected