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) {
51 for (
int i=x.size();
i--; ) {
65 static void update(Val&
n,
Space& home,
bool share, Val& old);
69 class UpdateVal<int> {
71 static void update(
int&
n,
Space&,
bool,
int& old) {
77 class UpdateVal<IntSet> {
79 static void update(IntSet&
n,
Space& home,
bool share,
86 template<
class View,
class Val>
90 vvsamax(), vvsamin() {
91 UpdateVal<Val>::update(s,home,share,p.s);
92 x.update(home,share,p.x);
93 ac.update(home,share,p.ac);
94 vvsamax.
update(home,share,p.vvsamax);
95 vvsamin.
update(home,share,p.vvsamin);
98 template<
class View,
class Val>
108 if (!x[a.
i].assigned())
109 x[a.
i].cancel(home,a);
121 template<
class View,
class Val>
128 return sizeof(*this);
131 template<
class View,
class Val>
140 for (
int j=0; j<x.
size(); j++ ) {
141 upper[j+1] = upper[j];
142 lower[j+1] = lower[j];
148 if ( j+1 >= q && (q - l < lower[j+1] - lower[j+1-q] || upper[j+1] - upper[j+1-q] > u) ) {
155 template<
class View,
class Val>
167 template<
class View,
class Val>
173 template<
class View,
class Val>
179 template<
class View,
class Val>
185 for (
int i=x.size();
i--; )
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
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.
Propagation has computed fixpoint.
Sequence(Space &home, bool shared, Sequence &p)
Constructor for cloning p.
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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
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 advise(Space &home, Advisor &_a, const Delta &d)
Advise function.
struct Gecode::@519::NNF::@60::@62 a
For atomic nodes.
ExecStatus ES_FIX_DISPOSE(Council< A > &c, A &a)
Advisor a must be disposed
union Gecode::@519::NNF::@60 u
Union depending on nodetype t.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
void update(Space &home, bool share, SharedHandle &sh)
Updating during cloning.
static PropCost cubic(PropCost::Mod m, unsigned int n)
Cubic complexity for modifier m and size measure n.
Node * x
Pointer to corresponding Boolean expression node.
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.
Propagation has not computed fixpoint.
bool excludes(const View &x, int s)
Test whether all values of view x are excluded from s.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
virtual size_t dispose(Space &home)
Delete propagator and return its size.
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.
static ExecStatus check(Space &home, ViewArray< View > &x, Val s, int q, int l, int u)
Check for consistency.