44 template<
class View,
class Val>
47 int q0,
int l0,
int u0)
49 vvsamax(home,
x,s0,q0), vvsamin(home,
x,s0,q0), ac(home),
52 for (
int i=x.size();
i--; ) {
66 static void update(Val&
n,
Space& home,
bool share, Val& old);
70 class UpdateVal<int> {
72 static void update(
int&
n,
Space&,
bool,
int& old) {
78 class UpdateVal<IntSet> {
80 static void update(IntSet&
n, Space& home,
bool share,
82 n.update(home,share,old);
87 template<
class View,
class Val>
91 vvsamax(), vvsamin(), tofail(
p.tofail) {
92 UpdateVal<Val>::update(s,home,share,
p.s);
93 x.update(home,share,
p.x);
94 ac.update(home,share,
p.ac);
95 vvsamax.
update(home,share,
p.vvsamax);
96 vvsamin.
update(home,share,
p.vvsamin);
99 template<
class View,
class Val>
104 if (
ES_NOFIX == vvsamin.advise(home,
x,s,q,
a.i,
d) ) {
110 x[
a.i].cancel(home,
a);
119 if ((status ==
ES_FAILED) && disabled()) {
127 template<
class View,
class Val>
134 return sizeof(*this);
137 template<
class View,
class Val>
142 int* upper =
r.alloc<
int>(
x.size()+1);
143 int* lower =
r.alloc<
int>(
x.size()+1);
146 for (
int j=0; j<
x.size(); j++ ) {
147 upper[j+1] = upper[j];
148 lower[j+1] = lower[j];
154 if ( j+1 >= q && (q -
l < lower[j+1] - lower[j+1-q] || upper[j+1] - upper[j+1-q] >
u) ) {
161 template<
class View,
class Val>
173 template<
class View,
class Val>
179 template<
class View,
class Val>
185 template<
class View,
class Val>
188 for (
int i=
x.size();
i--; )
195 template<
class View,
class Val>
204 for (
int i=
x.size();
i--; )
bool includes(const View &x, int s)
Test whether all values of view x are included in s.
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
ExecStatus ES_SUBSUMED(Propagator &p)
Actor must always be disposed.
bool assigned(void) const
Test whether view is assigned.
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
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.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
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.
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)
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
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.
Post propagator for SetVar SetOpType SetVar SetRelType r
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...
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.
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
void reschedule(Space &home, Propagator &p, IntSet &y)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Class for advising the propagator.
void update(Space &home, bool share, ViewValSupportArray< View, Val, iss > &x)
Cloning.