38 namespace Gecode {
namespace Int {
namespace Bool {
58 return new (home)
Lq<BV>(home,share,*
this);
66 }
else if (b0.one()) {
68 }
else if (b1.zero()) {
70 }
else if (b1.one()) {
73 (void)
new (home)
Lq<BV>(home,b0,
b1);
81 #define GECODE_INT_STATUS(S0,S1) \
82 ((BV::S0<<(1*BV::BITS))|(BV::S1<<(0*BV::BITS)))
83 switch ((x0.status()<<(1*BV::BITS)) | (x1.status()<<(0*BV::BITS))) {
103 #undef GECODE_INT_STATUS
116 run(false), n_zero(0), n_one(0),
c(home) {
124 run(false), n_zero(0), n_one(0) {
125 c.update(home,share,p.
c);
131 return new (home)
NaryLq<VX>(home,share,*
this);
144 }
else if (x[i].
one()) {
146 for (
int j=i+1; j<x.
size(); j++)
156 (
void)
new (home)
NaryLq(home,x);
183 return sizeof(*this);
205 int i =
x.size() - 1;
210 for (
int j=i+1; j<
x.size(); j++)
212 n_one -=
x.size() -
i;
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Council< Advisor > c
The advisor council.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
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.
A & advisor(void) const
Return advisor.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void drop_lst(int i)
Drop views from positions i+1 to size()-1 from array.
Execution has resulted in failure.
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Subscribe propagator p with propagation condition pc to variable.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
void drop_fst(int i)
Drop views from positions 0 to i-1 from array.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Boolean less or equal propagator.
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Nary Boolean less or equal propagator.
Node * x
Pointer to corresponding Boolean expression node.
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 ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Propagation has not computed fixpoint.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
Base-class for binary Boolean propagators.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
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.