54 return new (home)
Lq<BV>(home,*
this);
62 }
else if (b0.one()) {
64 }
else if (b1.zero()) {
66 }
else if (b1.one()) {
69 (void)
new (home)
Lq<BV>(home,b0,b1);
77#define GECODE_INT_STATUS(S0,S1) \
78 ((BV::S0<<(1*BV::BITS))|(BV::S1<<(0*BV::BITS)))
79 switch ((
x0.status()<<(1*BV::BITS)) | (
x1.status()<<(0*BV::BITS))) {
99#undef GECODE_INT_STATUS
113 x.subscribe(home,*
new (home)
Advisor(home,*
this,
c));
137 for (
int j=0; j<i; j++)
139 x.drop_fst(i+1); i=0;
140 }
else if (
x[i].one()) {
142 for (
int j=i+1; j<
x.size(); j++)
144 x.drop_lst(i-1);
break;
152 (void)
new (home)
NaryLq(home,
x);
179 return sizeof(*this);
193 for (
int j=0; j<i; j++)
201 int i =
x.size() - 1;
206 for (
int j=i+1; j<
x.size(); j++)
Base-class for both propagators and branchers.
Class to iterate over advisors of a council.
A & advisor(void) const
Return advisor.
Generic domain change information to be supplied to advisors.
Home class for posting propagators
BoolBinary(Home home, BV b0, BV b1)
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Lq(Home home, BV b0, BV b1)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int n_one
The number of views assigned to one in x.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
int n_zero
The number of views assigned to zero in x.
bool run
Whether the propagator is currently running.
Council< Advisor > c
The advisor council.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
NaryPropagator(Space &home, NaryPropagator &p)
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
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_INT_STATUS(S0, S1)
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
@ ES_NOFIX
Propagation has not computed fixpoint.
#define GECODE_NEVER
Assert that this command is never executed.