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

Method print

examples/bin-packing.cpp:363–379  ·  view source on GitHub ↗

Print explanation

Source from the content-addressed store, hash-verified

361 }
362 /// Print explanation
363 virtual void print(const Space&, const Gecode::Choice& _c,
364 unsigned int a,
365 std::ostream& o) const {
366 const Choice& c = static_cast<const Choice&>(_c);
367 if (a == 0) {
368 o << "bin[" << c.item << "] = " << c.same[0];
369 } else {
370 o << "bin[" << c.item;
371 for (int i = c.item+1; (i<bin.size()) &&
372 (size[i] == size[c.item]); i++)
373 o << "," << i;
374 o << "] != ";
375 for (int i = 0; i<c.n_same-1; i++)
376 o << c.same[i] << ",";
377 o << c.same[c.n_same-1];
378 }
379 }
380};
381
382/// Post branching (assumes that \a s is sorted)

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected