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

Method _trycommit

gecode/kernel/core.cpp:613–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611 }
612
613 void
614 Space::_trycommit(const Choice& c, unsigned int a) {
615 if (a >= c.alternatives())
616 throw SpaceIllegalAlternative("Space::commit");
617 if (failed())
618 return;
619 if (Brancher* b = brancher(c.bid)) {
620 // There is a matching brancher
621 if (pc.p.bid_sc & sc_trace) {
622 TraceRecorder* tr = findtracerecorder();
623 if ((tr != nullptr) && (tr->events() & TE_COMMIT) &&
624 tr->filter()(b->group())) {
625 CommitTraceInfo cti(*b,c,a);
626 tr->tracer()._commit(*this,cti);
627 }
628 ViewTraceInfo vti = pc.p.vti;
629 pc.p.vti.brancher(*b);
630 ExecStatus es = b->commit(*this,c,a);
631 pc.p.vti = vti;
632 if (es == ES_FAILED)
633 fail();
634 } else {
635 if (b->commit(*this,c,a) == ES_FAILED)
636 fail();
637 }
638 }
639 }
640
641 NGL*
642 Space::ngl(const Choice& c, unsigned int a) {

Callers

nothing calls this directly

Calls 6

alternativesMethod · 0.80
groupMethod · 0.80
brancherMethod · 0.80
eventsMethod · 0.45
_commitMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected