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

Method run

test/search.cpp:414–434  ·  view source on GitHub ↗

Run test

Source from the content-addressed store, hash-verified

412 htb1,htb2,htb3), t(t0) {}
413 /// Run test
414 virtual bool run(void) {
415 Model* m = new Model(htb1,htb2,htb3);
416 Gecode::Search::FailStop f(2);
417 Gecode::Search::Options o;
418 o.threads = t;
419 o.d_l = 50;
420 o.stop = &f;
421 Gecode::LDS<Model> lds(m,o);
422 int n = m->solutions();
423 delete m;
424 while (true) {
425 Model* s = lds.next();
426 if (s != nullptr) {
427 n--; delete s;
428 }
429 if ((s == nullptr) && !lds.stopped())
430 break;
431 f.limit(f.limit()+2);
432 }
433 return n == 0;
434 }
435 };
436
437 /// %Test for best solution search

Callers

nothing calls this directly

Calls 4

solutionsMethod · 0.45
nextMethod · 0.45
stoppedMethod · 0.45
limitMethod · 0.45

Tested by

no test coverage detected