40 namespace Gecode {
namespace Int {
namespace Channel {
65 while ((i<x.
size()) && !x[i].zero())
81 }
while ((i<x.
size()) && !x[i].zero());
88 (home,share,
p), status(S_NONE), o(p.o) {
89 assert(p.status == S_NONE);
90 c.update(home,share,p.c);
95 return new (home)
LinkMulti(home,share,*
this);
105 return sizeof(*this);
131 assert((y.min()-o >= 0) && (y.max()-o <
n));
137 for (
int i=0; i<j; i++)
139 for (
int i=j+1; i<
n; i++)
145 if (status == S_ONE) {
147 for (
int i=0;
true; i++)
149 for (
int j=0; j<i; j++)
151 for (
int j=i+1; j<
n; j++)
166 for (
int i=0; i<
min; i++)
171 for (
int i=max+1; i<
n; i++)
179 while ((i < n) && x[i].zero()) i++;
188 while ((i >= 0) && x[i].zero()) i--;
205 if ((y.min() > o) || (y.max() < o+n-1))
208 assert((n >= 2) && x[0].none() && x[n-1].none());
209 assert((y.min()-o == 0) && (y.max()-o == n-1));
226 }
while (
v() && (i < n));
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
ExecStatus ES_SUBSUMED(Propagator &p)
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool operator()(void) const
Test whether further values available.
A & advisor(void) const
Return advisor.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Class to iterate over advisors of a council.
Propagation has computed fixpoint.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
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.
int n
Number of negative literals for node type.
void operator++(void)
Move to the next value.
Execution has resulted in failure.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
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 val(void) const
Return value.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool one(void) const
Test whether view is assigned to be one.
Generic domain change information to be supplied to advisors.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Iterates the values to be removed as defined by an array of Boolean views.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
BoolIter(const ViewArray< BoolView > &x0, int o0)
Initialize iterator.
Propagation has not computed fixpoint.
int val(void) const
Return current value.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (low unary if y is assigned, low linear otherwise)
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
Link propagator for multiple Boolean views.
int ModEventDelta
Modification event deltas.
#define GECODE_NEVER
Assert that this command is never executed.
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)