56 :
Test(
"MiniModel::Lex::Int::"+
str(irt0),6,-2,2),
irt(irt0) {}
60 for (
int i=0; i<n; i++)
62 return cmp(x[i],
irt,x[n+i]);
73 for (
int i=0; i<n; i++) {
74 y[i]=x[i]; z[i]=x[n+i];
88 :
Test(
"MiniModel::Lex::Bool::"+
str(irt0),10,0,1),
irt(irt0) {}
92 for (
int i=0; i<n; i++)
94 return cmp(x[i],
irt,x[n+i]);
105 for (
int i=0; i<n; i++) {
119 (void)
new IntLex(irts.irt());
120 (void)
new BoolLex(irts.irt());
Passing Boolean variables.
Passing integer variables.
int size(void) const
Return size of array (number of elements).
Base class for assignments
int size(void) const
Return number of variables.
Iterator for integer relation types.
Test for relation between arrays of Boolean variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntRelType irt
Integer relation type to propagate.
BoolLex(Gecode::IntRelType irt0)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test for relation between arrays of integer variables
IntLex(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
IntRelType
Relation types for integers.
@ IRT_GQ
Greater or equal ( ).
@ IRT_LQ
Less or equal ( ).
Gecode toplevel namespace
void lex(Home home, const IntVarArgs &x, IntRelType r, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF)
Post lexical order between x and y.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Tests for minimal modelling constraints (simple relations)
Testing finite domain integers.
#define GECODE_NEVER
Assert that this command is never executed.