47 template<
class View0,
class View1,
class View2>
ExecStatus
49 View0
x0,View1
x1,View2
x2) {
54 template<
class View0,
class View1,
class View2>
60 template<
class View0,
class View1,
class View2>
66 bool x0ass =
x0.assigned();
67 bool x1ass =
x1.assigned();
68 bool x2ass =
x2.assigned();
76 bool modified =
false;
100 bool modified2=
false;
103 x1lbmod |= modified2;
104 modified |= modified2;
111 bool modifiedOld = modified;
115 || x0lbmod || modifiedOld)
126 || x1lbmod || modifiedOld)
172 if (x0ass && x1ass && x2ass)
174 if (x0ass !=
x0.assigned() ||
175 x1ass !=
x1.assigned() ||
176 x2ass !=
x2.assigned()) {
184 template<
class View0,
class View1,
class View2>
187 View0 y0,View1 y1,View2 y2)
191 template<
class View0,
class View1,
class View2>
203 template<
class View0,
class View1>
212 template<
class View0,
class View1>
223 template<
class View0,
class View1>
233 template<
class View0,
class View1>
251 template<
class View0,
class View1>
259 template<
class View0,
class View1>
265 template<
class View0,
class View1>
271 template<
class View0,
class View1>
277 int xsize =
x.size();
280 for (
int i = xsize; i--; ) {
283 if (
x[i].cardMax()==0) {
293 for (
int i = xsize; i--; ) {
313 for (
int i = xsize; i--; ) {
323 new (&rightSet[xsize-1])
GLBndSet(home);
325 for (
int i=xsize-1;i--;) {
336 for (
int i=0;i<xsize;i++) {
344 forbidden(
inter, yub);
349 for (
int i=xsize; i--;)
355 for(
int i=0;i<
x.size();i++) {
357 while (i<
x.size() &&
x[i].assigned()) {
359 if (
intOfDets.intersectI(home,det)) {repeat =
true;}
ActorLink * prev(void) const
Routines for double-linked list.
Base-class for both propagators and branchers.
Home class for posting propagators
Range iterator for integer sets.
Range iterator for computing set difference.
Range iterator for computing intersection (binary)
Range iterator for intersection of iterators.
virtual size_t dispose(Space &home)
MixNaryOnePropagator(Space &home, MixNaryOnePropagator &p)
MixTernaryPropagator(Space &home, MixTernaryPropagator &p)
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
ModEventDelta med
A set of modification events (used during propagation)
Range iterator for integer sets.
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
void dispose(Space &home)
Free memory used by this set.
Growing sets of integers.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
Range iterator for the greatest lower bound.
Shrinking sets of integers.
bool intersectI(Space &home, I &i)
Exclude all elements not in the set represented by i from this set.
Range iterator for the least upper bound.
LUBndSet intOfDets
Intersection of the determined (which are dropped)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static ExecStatus post(Home home, ViewArray< View0 > &y, View1 x)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool shared
Whether the any views share a variable implementation.
IntersectionN(Space &home, IntersectionN &p)
Constructor for cloning p.
static ExecStatus post(Home home, View0 x, View1 y, View2 z)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Intersection(Space &home, Intersection &p)
Constructor for cloning p.
static ExecStatus post(Home home, View0 x, View1 y)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
#define GECODE_ME_CHECK_MODIFIED(modified, me)
Check whether me is failed or modified, and forward failure.
const unsigned int card
Maximum cardinality of an integer set.
Standard set operation propagators.
ExecStatus interCard(Space &home, bool &retmodified, View0 &x0, View1 &x1, View2 &x2)
bool shared(View0 v0, View1 v1, View2 v2)
bool testSetEventLB(ModEvent me0, ModEvent me1, ModEvent me2)
bool testSetEventUB(ModEvent me0, ModEvent me1, ModEvent me2)
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
bool viewarrayshared(const ViewArray< View0 > &va, const View1 &y)
SetExpr inter(const SetVarArgs &)
Intersection of set variables.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
int ModEvent
Type for modification events.