Go to the documentation of this file.
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>
62 vvsamax(), vvsamin(), tofail(
p.tofail) {
69 template<
class View,
class Val>
74 if (
ES_NOFIX == vvsamin.advise(home,
x,s,q,
a.i,
d) ) {
80 x[
a.i].cancel(home,
a);
89 if ((status ==
ES_FAILED) && disabled()) {
97 template<
class View,
class Val>
104 return sizeof(*this);
107 template<
class View,
class Val>
112 int* upper =
r.alloc<
int>(
x.size()+1);
113 int* lower =
r.alloc<
int>(
x.size()+1);
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--; )
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
void update(Space &home, ViewValSupportArray< View, Val, iss > &x)
Cloning.
Post propagator for SetVar x
ExecStatus ES_NOFIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed and its propagator must be run
ExecStatus ES_SUBSUMED(Propagator &p)
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
bool assigned(View x, int v)
Whether x is assigned to value v.
Base-class for both propagators and branchers.
bool assigned(void) const
Test whether view is assigned.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
Gecode toplevel namespace
Base-class for propagators.
union Gecode::@602::NNF::@65 u
Union depending on nodetype t.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
void reschedule(Space &home, Propagator &p, IntSet &y)
Generic domain change information to be supplied to advisors.
Home class for posting propagators
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.
static PropCost cubic(PropCost::Mod m, unsigned int n)
Cubic complexity for modifier m and size measure n.
@ AP_DISPOSE
Actor must always be disposed.
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
Post propagator for SetVar SetOpType SetVar SetRelType r
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
bool excludes(const View &x, int s)
Test whether all values of view x are excluded from s.
Sequence propagator for array of integers
@ ES_FIX
Propagation has computed fixpoint.
Class for advising the propagator.
void check(const FloatVal &n, const char *l)
Check whether float n is a valid number, otherwise throw out of limits exception with information l.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
@ ES_FAILED
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
bool includes(const View &x, int s)
Test whether all values of view x are included in s.
@ ES_NOFIX
Propagation has not computed fixpoint.
ExecStatus ES_FIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed
Gecode::IntArgs i({1, 2, 3, 4})
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.