34namespace Gecode {
namespace Int {
namespace Bool {
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
112 run(false), n_zero(0), n_one(0), c(home) {
120 run(false), n_zero(0), n_one(0) {
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++)
208 n_one -=
x.size() - i;
int p
Number of positive literals for node type.
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
Base-class for binary Boolean propagators.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Boolean less or equal 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.
Nary Boolean less or equal propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
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.
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.
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
struct Gecode::Space::@61::@63 c
Data available only during copying.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
ExecStatus ES_SUBSUMED(Propagator &p)
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.
Post propagator for SetVar x
#define GECODE_NEVER
Assert that this command is never executed.