38 namespace Gecode {
namespace Int {
namespace Channel {
41 LinkMulti::LinkMulti(Home home, ViewArray<BoolView>&
x, IntView y,
int o0)
43 (home,x,y),
c(home), status(S_NONE), o(o0) {
44 x.subscribe(home,*
new (home)
Advisor(home,*
this,c));
49 LinkMulti::LinkMulti(
Space& home,
bool share, LinkMulti&
p)
51 (home,share,p), status(S_NONE), o(p.o) {
52 assert(p.status == S_NONE);
53 c.update(home,share,p.c);
68 for (
int i=0;
i<j;
i++)
70 for (
int i=j+1;
i<
n;
i++)
75 for (
int j=0; j<
i; j++)
77 for (
int j=i+1; j<
n; j++)
81 }
else if (x[
i].zero()) {
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int val(void) const
Return assigned value (only if assigned)
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
MixNaryOnePropagator(Space &home, bool share, MixNaryOnePropagator &p)
Constructor for cloning p.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
static ExecStatus post(Home home, ViewArray< BoolView > &x, IntView y, int o)
Post propagator for .
Integer view for integer variables.
bool assigned(void) const
Test whether view is assigned.
Node * x
Pointer to corresponding Boolean expression node.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Gecode toplevel namespace
Link propagator for multiple Boolean views.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators