34 namespace Gecode {
namespace Int {
namespace Channel {
37 LinkMulti::LinkMulti(Home home, ViewArray<BoolView>&
x, IntView
y,
int o0)
39 (home,x,y),
c(home), status(S_NONE), o(o0) {
40 x.subscribe(home,*
new (home)
Advisor(home,*
this,c));
45 LinkMulti::LinkMulti(
Space& home, LinkMulti&
p)
47 (home,p), status(S_NONE), o(p.o) {
48 assert(p.status == S_NONE);
64 for (
int i=0;
i<j;
i++)
66 for (
int i=j+1;
i<
n;
i++)
69 for (
int i=0;
i<
n;
i++)
71 for (
int j=0; j<
i; j++)
73 for (
int j=i+1; j<
n; j++)
77 }
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.
MixNaryOnePropagator(Space &home, MixNaryOnePropagator &p)
Constructor for cloning p.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
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.
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.
Post propagator for SetVar SetOpType SetVar y
bool assigned(void) const
Test whether view is assigned.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Post propagator for SetVar x
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