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

Method propagate

gecode/set/rel/subset.hpp:68–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 template<class View0, class View1>
68 ExecStatus
69 Subset<View0,View1>::propagate(Space& home, const ModEventDelta&) {
70 bool oneassigned = x0.assigned() || x1.assigned();
71 unsigned int x0glbsize;
72 do {
73 GlbRanges<View0> x0lb(x0);
74 GECODE_ME_CHECK ( x1.includeI(home,x0lb) );
75 GECODE_ME_CHECK ( x1.cardMin(home,x0.cardMin()) );
76 LubRanges<View1> x1ub(x1);
77 x0glbsize = x0.glbSize();
78 GECODE_ME_CHECK ( x0.intersectI(home,x1ub) );
79 GECODE_ME_CHECK ( x0.cardMax(home,x1.cardMax()) );
80 } while (x0.glbSize() > x0glbsize);
81
82 if (x0.cardMin() == x1.cardMax())
83 GECODE_REWRITE(*this,(Eq<View0,View1>::post(home(*this),x0,x1)));
84
85 if (shared(x0,x1)) {
86 return oneassigned ? home.ES_SUBSUMED(*this) : ES_NOFIX;
87 }
88 return (x0.assigned() || x1.assigned()) ? home.ES_SUBSUMED(*this) : ES_FIX;
89 }
90
91}}}
92

Callers

nothing calls this directly

Calls 9

ES_SUBSUMEDMethod · 0.80
postFunction · 0.50
sharedFunction · 0.50
assignedMethod · 0.45
includeIMethod · 0.45
cardMinMethod · 0.45
glbSizeMethod · 0.45
intersectIMethod · 0.45
cardMaxMethod · 0.45

Tested by

no test coverage detected