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

Method propagate

gecode/set/precede/single.hpp:221–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220 template<class View>
221 ExecStatus
222 Single<View>::propagate(Space& home, const ModEventDelta&) {
223 int n = x.size();
224 if (beta > gamma) {
225 GECODE_ME_CHECK(x[alpha].exclude(home, t));
226 GECODE_ME_CHECK(x[alpha].include(home, s));
227 return home.ES_SUBSUMED(*this);
228 }
229 if (alpha < n && (x[alpha].notContains(s) || x[alpha].contains(t))) {
230 if (x[alpha].notContains(s)) {
231 GECODE_ME_CHECK(x[alpha].exclude(home, t));
232 } else {
233 GECODE_ME_CHECK(x[alpha].include(home, s));
234 }
235 alpha++;
236 while (alpha < beta) {
237 if (x[alpha].notContains(s)) {
238 GECODE_ME_CHECK(x[alpha].exclude(home, t));
239 } else {
240 GECODE_ME_CHECK(x[alpha].include(home, s));
241 }
242 alpha++;
243 }
244 GECODE_ES_CHECK(updateAlpha(home));
245 beta = alpha;
246 if (alpha < n)
247 GECODE_ES_CHECK(updateBeta(home));
248 } else if ((beta < n) && (x[beta].notContains(s) || x[beta].contains(t))) {
249 GECODE_ES_CHECK(updateBeta(home));
250 }
251
252 return (c.empty()) ? home.ES_SUBSUMED(*this) : ES_FIX;
253 }
254
255}}}
256

Callers

nothing calls this directly

Calls 7

ES_SUBSUMEDMethod · 0.80
sizeMethod · 0.45
excludeMethod · 0.45
includeMethod · 0.45
notContainsMethod · 0.45
containsMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected