Go to the documentation of this file.
34 namespace 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;
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
Post propagator for SetVar x
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
ExecStatus ES_SUBSUMED(Propagator &p)
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Class to iterate over advisors of a council.
Base-class for both propagators and branchers.
Council< Advisor > c
The advisor council.
ViewArray< VX > x
Array of views.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
#define GECODE_INT_STATUS(S0, S1)
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Gecode toplevel namespace
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Generic domain change information to be supplied to advisors.
Home class for posting propagators
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
Boolean less or equal propagator.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
#define GECODE_NEVER
Assert that this command is never executed.
Nary Boolean less or equal propagator.
Base-class for binary Boolean propagators.
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Propagation has computed fixpoint.
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 .
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Gecode::FloatVal c(-8, 8)
A & advisor(void) const
Return advisor.
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
Propagation has not computed fixpoint.
Gecode::IntArgs i({1, 2, 3, 4})
int p
Number of positive literals for node type.