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

Method propagate

gecode/set/sequence/seq-u.cpp:103–137  ·  view source on GitHub ↗

Enforces sequentiality and ensures y contains union of Xi lower bounds.

Source from the content-addressed store, hash-verified

101
102 //Enforces sequentiality and ensures y contains union of Xi lower bounds.
103 ExecStatus
104 SeqU::propagate(Space& home, const ModEventDelta& med) {
105 ModEvent me0 = SetView::me(med);
106 bool ubevent = Rel::testSetEventUB(me0);
107 bool anybevent = Rel::testSetEventAnyB(me0);
108 bool cardevent = Rel::testSetEventCard(me0);
109
110 bool modified = false;
111 bool assigned=false;
112 bool oldModified = false;
113
114 do {
115 oldModified = modified;
116 modified = false;
117
118 if (oldModified || modified || anybevent || cardevent)
119 GECODE_ES_CHECK(propagateSeq(home,modified,assigned,x));
120 if (oldModified || modified || anybevent)
121 GECODE_ES_CHECK(propagateSeqUnion(home,modified,x,y));
122 if (oldModified || modified || ubevent)
123 GECODE_ES_CHECK(RelOp::unionNXiUB(home,modified,x,y,unionOfDets));
124 if (oldModified || modified || ubevent)
125 GECODE_ES_CHECK(RelOp::partitionNYUB(home,modified,x,y,unionOfDets));
126 if (oldModified || modified || anybevent)
127 GECODE_ES_CHECK(RelOp::partitionNXiLB(home,modified,x,y,unionOfDets));
128 if (oldModified || modified || cardevent || ubevent)
129 GECODE_ES_CHECK(RelOp::partitionNCard(home,modified,x,y,unionOfDets));
130
131 } while (modified);
132
133 for (int i=x.size(); i--;)
134 if (!x[i].assigned())
135 return ES_FIX;
136 return home.ES_SUBSUMED(*this);
137 }
138
139}}}
140

Callers

nothing calls this directly

Calls 11

testSetEventUBFunction · 0.85
testSetEventAnyBFunction · 0.85
testSetEventCardFunction · 0.85
propagateSeqFunction · 0.85
unionNXiUBFunction · 0.85
partitionNYUBFunction · 0.85
partitionNXiLBFunction · 0.85
partitionNCardFunction · 0.85
ES_SUBSUMEDMethod · 0.80
sizeMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected