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

Method propagate

gecode/int/dom/set.hpp:92–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91 template<class View, ReifyMode rm>
92 ExecStatus
93 ReIntSet<View,rm>::propagate(Space& home, const ModEventDelta&) {
94 IntSetRanges i_is(is);
95 if (b.one()) {
96 if (rm != RM_PMI)
97 GECODE_ME_CHECK(x0.inter_r(home,i_is,false));
98 return home.ES_SUBSUMED(*this);
99 }
100 if (b.zero()) {
101 if (rm != RM_IMP)
102 GECODE_ME_CHECK(x0.minus_r(home,i_is,false));
103 return home.ES_SUBSUMED(*this);
104 }
105
106 {
107 ViewRanges<View> i_x(x0);
108
109 switch (Iter::Ranges::compare(i_x,i_is)) {
110 case Iter::Ranges::CS_SUBSET:
111 if (rm != RM_IMP)
112 GECODE_ME_CHECK(b.one_none(home));
113 return home.ES_SUBSUMED(*this);
114 case Iter::Ranges::CS_DISJOINT:
115 if (rm != RM_PMI)
116 GECODE_ME_CHECK(b.zero_none(home));
117 return home.ES_SUBSUMED(*this);
118 case Iter::Ranges::CS_NONE:
119 break;
120 default: GECODE_NEVER;
121 }
122 }
123 return ES_FIX;
124 }
125
126}}}
127

Callers

nothing calls this directly

Calls 7

ES_SUBSUMEDMethod · 0.80
oneMethod · 0.45
inter_rMethod · 0.45
zeroMethod · 0.45
minus_rMethod · 0.45
one_noneMethod · 0.45
zero_noneMethod · 0.45

Tested by

no test coverage detected