42 namespace Gecode {
namespace Int {
namespace Extensional {
49 template<
class View,
bool shared>
53 :
Base<View>(home,x,t) {
56 template<
class View,
bool shared>
61 for (
int i = x.
size();
i--; ) {
69 template<
class View,
bool shared>
72 :
Base<View>(home,share,p) {
75 template<
class View,
bool shared>
84 template<
class View,
bool shared>
90 template<
class View,
bool shared>
102 for (
int i =
x.size();
i--; )
112 for (
int i =
x.size();
i--; ) {
115 int val = vv.val() -
ts()->
min;
116 if (!has_support[i].
get(static_cast<unsigned int>(val))) {
126 for (
int j = i; j--; ) {
127 has_support[j].
set(static_cast<unsigned int>(l[j]-
ts()->
min));
128 assert(has_support[j].
get(l[j] -
ts()->
min));
139 for (
int i =
x.size();
i--; )
void push(const T &x)
Push element x on top of stack.
void init(void)
Initialize links (self-linked)
void init_dom(Space &home, Domain dom)
Initialize domain information.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
ExecStatus ES_SUBSUMED(Propagator &p)
Tuple find_support(Domain dom, int i, int n)
Find support for view at position i and value n.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
bool empty(void) const
Test whether stack is empty.
int max(void) const
Maximum domain element.
Value iterator for integer views.
Propagation has computed fixpoint.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Base-class for both propagators and branchers.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Domain consistent extensional propagator.
ViewArray< View > x
Variables.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
ModEventDelta med
A set of modification events (used during propagation)
unsigned int domsize
Domain size.
int min
Minimum and maximum in domain-values.
void set(unsigned int i)
Set bit i.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Class represeting a set of tuples.
int min(void) const
Minimum domain element.
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &t)
Post propagator for views x.
static PropCost cubic(PropCost::Mod m, unsigned int n)
Cubic complexity for modifier m and size measure n.
Basic(Space &home, bool share, Basic< View, shared > &p)
Constructor for cloning p.
bool assigned(View x, int v)
Whether x is assigned to value v.
Stack with fixed number of elements.
T pop(void)
Pop topmost element from stack and return it.
TupleSet::TupleSetI * ts(void)
Post propagator for SetVar x
Propagation has not computed fixpoint.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Base for domain consistent extensional propagation
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators