46 SetVarImp::cardMin_full(Space& home) {
49 glb.become(home, lub);
57 SetVarImp::cardMax_full(Space& home) {
60 lub.become(home, glb);
68 SetVarImp::processLubChange(Space& home,
SetDelta& d) {
73 glb.become(home, lub);
81 glb.become(home, lub);
83 assert(
d.glbMin() == 1);
84 assert(
d.glbMax() == 0);
90 SetVarImp::processGlbChange(Space& home,
SetDelta& d) {
95 glb.become(home, lub);
103 lub.become(home, glb);
105 assert(
d.lubMin() == 1);
106 assert(
d.lubMax() == 0);
119 lub.update(home,
x.lub);
120 glb.card(
x.cardMin());
121 lub.card(
x.cardMax());
123 glb.become(home,lub);
125 glb.update(home,x.glb);
131 SetVarImp::perform_copy(
Space& home) {
Base-class for propagators.
Finite set delta information for advisors.
SetVarImpBase(Gecode::Space &home, SetVarImpBase &x)
Constructor for cloning x.
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
Gecode::ModEvent notify(Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
Notify that variable implementation has been modified with modification event me and delta informatio...
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Finite integer set variable implementation.
unsigned int cardMax(void) const
Return current cardinality maximum.
bool assigned(void) const
Test whether variable is assigned.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
unsigned int cardMin(void) const
Return current cardinality minimum.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
SetVarImp(Space &home, SetVarImp &x)
Constructor for cloning x.
ModEvent fail(Space &home)
static ModEvent me(const ModEventDelta &med)
const Gecode::ModEvent ME_SET_CLUB
Domain operation has changed the least upper bound and the cardinality.
const Gecode::ModEvent ME_SET_VAL
Domain operation has resulted in a value (assigned variable)
const Gecode::ModEvent ME_SET_GLB
Domain operation has changed the greatest lower bound.
const Gecode::ModEvent ME_SET_CGLB
Domain operation has changed the greatest lower bound and the cardinality.
const Gecode::ModEvent ME_SET_CARD
Domain operation has changed the variable cardinality.
const Gecode::ModEvent ME_SET_LUB
Domain operation has changed the least upper bound.
Gecode toplevel namespace
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.