42 namespace Test {
namespace Int {
60 :
Test(
"MiniModel::Lex::Int::"+
str(irt0),6,-2,2), irt(irt0) {}
64 for (
int i=0;
i<
n;
i++)
66 return cmp(x[
i],irt,x[n+i]);
77 for (
int i=0;
i<
n;
i++) {
78 y[
i]=x[
i]; z[
i]=x[n+
i];
92 :
Test(
"MiniModel::Lex::Bool::"+
str(irt0),10,0,1), irt(irt0) {}
96 for (
int i=0;
i<
n;
i++)
98 return cmp(x[
i],irt,x[n+i]);
109 for (
int i=0;
i<
n;
i++) {
112 lex(home, y, irt, z);
123 (void)
new IntLex(irts.irt());
124 (void)
new BoolLex(irts.irt());
Create(void)
Perform creation and registration.
Help class to create and register tests.
virtual bool solution(const Assignment &x) const
Test whether x is solution
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntRelType
Relation types for integers.
Iterator for integer relation types.
void lex(Home home, const IntVarArgs &x, IntRelType r, const IntVarArgs &y, IntConLevel icl=ICL_DEF)
Post lexical order between x and y.
Test for relation between arrays of integer variables
Passing integer variables.
Passing Boolean variables.
Node * x
Pointer to corresponding Boolean expression node.
Gecode::IntRelType irt
Integer relation type to propagate.
IntLex(Gecode::IntRelType irt0)
Create and register test.
Base class for assignments
BoolLex(Gecode::IntRelType irt0)
Create and register test.
Gecode toplevel namespace
Test for relation between arrays of Boolean variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
int size(void) const
Return size of array (number of elements)
#define GECODE_NEVER
Assert that this command is never executed.
int size(void) const
Return number of variables.