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) {
137 for (
int j=0; j<
i; j++)
140 }
else if (x[i].
one()) {
142 for (
int j=i+1; j<x.
size(); j++)
152 (
void)
new (home)
NaryLq(home,x);
179 return sizeof(*this);
193 for (
int j=0; j<
i; j++)
206 for (
int j=i+1; j<
x.
size(); j++)
Council< Advisor > c
The advisor council.
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
ViewArray< VX > x
Array of views.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
Class to iterate over advisors of a council.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
void drop_lst(int i)
Drop views from positions i+1 to size()-1 from array.
Gecode::IntArgs i({1, 2, 3, 4})
Execution has resulted in failure.
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
int n_zero
The number of views assigned to zero in x.
void drop_fst(int i)
Drop views from positions 0 to i-1 from array.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to all views.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
int n_one
The number of views assigned to one in x.
bool run
Whether the propagator is currently running.
Boolean less or equal propagator.
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Nary Boolean less or equal propagator.
BV x1
Boolean view Constructor for posting.
Generic domain change information to be supplied to advisors.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Post propagator for SetVar x
Propagation has not computed fixpoint.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Gecode toplevel namespace
Base-class for binary Boolean propagators.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
#define GECODE_INT_STATUS(S0, S1)
Home class for posting propagators
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
#define GECODE_NEVER
Assert that this command is never executed.
A & advisor(void) const
Return advisor.