Go to the documentation of this file.
38 namespace Gecode {
namespace Int {
namespace Rel {
43 template<
class VX,
class VY>
52 template<
class VX,
class VY>
60 template<
class VX,
class VY>
66 template<
class VX,
class VY>
72 template<
class VX,
class VY>
79 template<
class VX,
class VY>
89 template<
class VX,
class VY>
119 x[
i].val() ==
y[
i].val()));
121 x.drop_fst(
i);
y.drop_fst(
i);
138 (
x[
i].val() ==
y[
i].val()));
157 x[
i-1]=
x[0];
x.drop_fst(
i-1);
158 y[
i-1]=
y[0];
y.drop_fst(
i-1);
187 for (
int j=
i; j<
n; j++) {
191 x.size(
i);
y.size(
i);
224 for (
int j=
i; j<
n; j++) {
228 x.size(
i);
y.size(
i);
243 template<
class VX,
class VY>
247 if (
x.size() <
y.size()) {
248 y.size(
x.size()); strict=
false;
249 }
else if (
x.size() >
y.size()) {
250 x.size(
y.size()); strict=
true;
268 template<
class VX,
class VY>
272 x0(xv[xv.
size()-2]), y0(yv[xv.
size()-2]),
273 x1(xv[xv.
size()-1]), y1(yv[xv.
size()-1]),
283 template<
class VX,
class VY>
289 template<
class VX,
class VY>
298 template<
class VX,
class VY>
302 x0.update(home,share,
p.x0);
y0.update(home,share,
p.y0);
303 x1.update(home,share,
p.x1);
y1.update(home,share,
p.y1);
307 template<
class VX,
class VY>
329 x.size(
n);
y.size(
n);
334 template<
class VX,
class VY>
337 if (
x.size() !=
y.size())
359 x.size(
n);
y.size(
n);
369 template<
class VX,
class VY>
375 return sizeof(*this);
378 template<
class VX,
class VY>
381 RelTest rt, VX& x0, VY& y0, VX x1, VY y1) {
383 assert(x0.assigned() && y0.assigned());
384 assert(x0.val() == y0.val());
398 x.size(
n);
y.size(
n);
411 template<
class VX,
class VY>
Lexical ordering propagator.
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
Less or equal propagator.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
VX x1
View currently subscribed to.
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
ExecStatus ES_SUBSUMED(Propagator &p)
VX x0
View currently subscribed to.
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
unsigned int size(I &i)
Size of all ranges of range iterator i.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode::IntArgs i(4, 1, 2, 3, 4)
ViewArray< VX > x
Views not yet subscribed to.
bool same(const CachedView< View > &x, const CachedView< View > &y)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Base-class for both propagators and branchers.
VY y1
View currently subscribed to.
@ RT_TRUE
Relation does hold.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
ViewArray< VX > x
View arrays.
virtual void reschedule(Space &home)
Schedule function.
Binary disequality propagator.
Gecode toplevel namespace
Base-class for propagators.
@ RT_MAYBE
Relation may hold or not.
ExecStatus resubscribe(Space &home, Propagator &p, VX &x0, ViewArray< VX > &x, VY &x1, ViewArray< VY > &y)
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
@ RT_FALSE
Relation does not hold.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Home class for posting propagators
Lexical disequality propagator.
ExecStatus resubscribe(Space &home, RelTest rt, VX &x0, VY &y0, VX x1, VY y1)
Update subscription.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
#define GECODE_NEVER
Assert that this command is never executed.
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
Post propagator for lexical order between x and y.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
virtual void reschedule(Space &home)
Schedule function.
ViewArray< VY > y
Views not yet subscribed to.
LexNq(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
bool failed(void) const
Check whether space is failed.
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)
@ ES_FIX
Propagation has computed fixpoint.
int size(void) const
Return size of array (number of elements)
RelTest
Result of testing relation.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual size_t dispose(Space &home)
Delete actor and return its size.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
int n
Number of negative literals for node type.
@ ES_FAILED
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
LexLqLe(Space &home, bool share, LexLqLe< VX, VY > &p)
Constructor for cloning p.
VY y0
View currently subscribed to.