40 namespace Gecode {
namespace Int {
namespace Element {
44 return new (home)
Pair(home,share,*
this);
67 bool operator ()(
void)
const;
70 void operator ++(
void);
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));
127 if (x0.assigned() && x1.assigned()) {
130 }
else if (x1.assigned()) {
133 ::
post(home(*
this),x0x1w,x2)));
#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.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
Binary domain consistent equality propagator.
ExecStatus ES_SUBSUMED(Propagator &p)
Pair(Space &home, bool share, Pair &p)
Constructor for cloning p.
Value iterator for values in a bitset.
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.
#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)
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
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.
int min(int i) const
Return minimum of range at position i.