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

Method master

test/search.cpp:289–308  ·  view source on GitHub ↗

Rule out that solution is found more than once during restarts

Source from the content-addressed store, hash-verified

287 }
288 /// Rule out that solution is found more than once during restarts
289 virtual bool master(const MetaInfo& mi) {
290 switch (mi.type()) {
291 case MetaInfo::RESTART:
292 if (mi.last() != nullptr) {
293 const HasSolutions* s
294 = static_cast<const HasSolutions*>(mi.last());
295 BoolVarArgs b;
296 for (int i=0; i<x.size(); i++)
297 b << expr(*this, x[i] == s->x[i]);
298 rel(*this, BOT_AND, b, 0);
299 }
300 break;
301 case MetaInfo::PORTFOLIO:
302 // Do not kill the brancher!
303 break;
304 default:
305 break;
306 }
307 return false;
308 }
309 };
310
311 /// %Base class for search tests

Callers

nothing calls this directly

Calls 5

exprFunction · 0.50
relFunction · 0.50
typeMethod · 0.45
lastMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected