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

Method print

examples/word-square.cpp:125–139  ·  view source on GitHub ↗

Print solution

Source from the content-addressed store, hash-verified

123 }
124 /// Print solution
125 virtual void
126 print(std::ostream& os) const {
127 Matrix<IntVarArray> ml(letters, w_l, w_l);
128 for (int i=0; i<w_l; i++) {
129 os << "\t\t";
130 for (int j=0; j<w_l; j++)
131 if (ml(i,j).assigned()) {
132 os << static_cast<char>(ml(i,j).val());
133 } else {
134 os << ".";
135 }
136 os << std::endl;
137 }
138 os << std::endl;
139 }
140};
141
142

Callers

nothing calls this directly

Calls 2

assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected