40 namespace Gecode {
namespace Int {
namespace Element {
44 return new (home)
Pair(home,share,*
this);
82 :
x(x0), xv(x0), yv(y0), w(w0) {}
96 return xv.
val()+w*yv.
val();
108 d.set(static_cast<unsigned int>(
i.val() /
w));
115 d(
r,static_cast<unsigned int>((
x2.
max() /
w)+1)),
116 m(
r,static_cast<unsigned int>(
w));
118 d.set(static_cast<unsigned int>(
i.val() /
w));
119 m.set(static_cast<unsigned int>(
i.val() %
w));
133 ::
post(home(*
this),x0x1w,
x2)));
int val(void) const
Return assigned value (only if assigned)
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
PairValues(IntView x, IntView y, int w)
Initialize with views x and y and width w.
Binary domain consistent equality propagator.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2, int w, int h)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
bool operator()(void) const
Test whether iterator is still at a value or done.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int val(void) const
Return current value.
Pair(Space &home, bool share, Pair &p)
Constructor for cloning p.
int val(void) const
Return current value.
Value iterator for values in a bitset.
unsigned int id(void) const
Return propagator id.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Value iterator for pair of iterators.
int min(void) const
Return minimum of domain.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void operator++(void)
Move iterator to next value (if possible)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Post propagator for SetVar SetOpType SetVar SetRelType r
Integer view for integer variables.
Post propagator for SetVar SetOpType SetVar y
bool assigned(void) const
Test whether view is assigned.
Node * x
Pointer to corresponding Boolean expression node.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Post propagator for SetVar x
Propagation has not computed fixpoint.
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
void init(const View &x)
Initialize with values x.
int ModEventDelta
Modification event deltas.