40 template<
class View,
class Val>
43 int q0,
int l0,
int u0)
45 vvsamax(home,
x,s0,q0), vvsamin(home,
x,s0,q0), ac(home),
49 for (
int i=x.size();
i--; ) {
58 template<
class View,
class Val>
61 :
Propagator(home,p), s(p.s), q(p.q), l(p.l), u(p.u),
62 vvsamax(), vvsamin(), tofail(p.tofail) {
65 vvsamax.
update(home,p.vvsamax);
66 vvsamin.
update(home,p.vvsamin);
69 template<
class View,
class Val>
79 if (!x[a.
i].assigned())
80 x[a.
i].cancel(home,a);
97 template<
class View,
class Val>
104 return sizeof(*this);
107 template<
class View,
class Val>
116 for (
int j=0; j<x.
size(); j++ ) {
117 upper[j+1] = upper[j];
118 lower[j+1] = lower[j];
124 if ( j+1 >= q && (q - l < lower[j+1] - lower[j+1-q] || upper[j+1] - upper[j+1-q] > u) ) {
131 template<
class View,
class Val>
143 template<
class View,
class Val>
149 template<
class View,
class Val>
155 template<
class View,
class Val>
158 for (
int i=x.size();
i--; )
165 template<
class View,
class Val>
174 for (
int i=x.size();
i--; )
bool includes(const View &x, int s)
Test whether all values of view x are included in s.
ExecStatus ES_SUBSUMED(Propagator &p)
ExecStatus advise(Space &home, ViewArray< View > &a, Val s, int q, int j, const Delta &d)
Advise.
Actor must always be disposed.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
bool undecided(const View &x, int s)
Test whether no decision on inclusion or exclusion of values of view x in s can be made...
Base-class for propagators.
ExecStatus ES_NOFIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed and its propagator must be run
static ExecStatus post(Home home, ViewArray< View > &x, Val s, int q, int l, int u)
Post propagator for.
void update(Space &home, ViewValSupportArray< View, Val, iss > &x)
Cloning.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
ExecStatus propagate(Space &home, ViewArray< View > &a, Val s, int q, int l, int u)
Propagate.
int p
Number of positive literals for node type.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode::IntArgs i({1, 2, 3, 4})
Execution has resulted in failure.
Sequence propagator for array of integers
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
void subscribe(Space &home, Propagator &p, IntSet &y)
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
ExecStatus advise(Space &home, Advisor &_a, const Delta &d)
Advise function.
bool disabled(void) const
Whether propagator is currently disabled.
virtual Actor * copy(Space &home)
Perform copying during cloning.
ExecStatus ES_FIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
union Gecode::@593::NNF::@62 u
Union depending on nodetype t.
Post propagator for SetVar SetOpType SetVar SetRelType r
static ExecStatus check(ViewArray< View > &x, Val s, int q, int l, int u)
Check for consistency.
static PropCost cubic(PropCost::Mod m, unsigned int n)
Cubic complexity for modifier m and size measure n.
Generic domain change information to be supplied to advisors.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual void reschedule(Space &home)
Schedule function.
Post propagator for SetVar x
Propagation has not computed fixpoint.
bool excludes(const View &x, int s)
Test whether all values of view x are excluded from s.
Gecode toplevel namespace
virtual size_t dispose(Space &home)
Delete propagator and return its size.
int ModEventDelta
Modification event deltas.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators
Sequence(Space &home, Sequence &p)
Constructor for cloning p.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
Class for advising the propagator.