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)
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Pair(Space &home, bool share, Pair &p)
Constructor for cloning p.
Value iterator for values in a bitset.
int max(void) const
Return maximum of domain.
bool operator()(void) const
Test whether iterator is still at a value or done.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int val(void) const
Return current value.
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.
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
bool assigned(void) const
Test whether view is assigned.
Propagation has not computed fixpoint.
int val(void) const
Return current value.
Gecode toplevel namespace
void init(const View &x)
Initialize with values x.
int ModEventDelta
Modification event deltas.