40namespace Test {
namespace Int {
64 static const int n = 3;
71 for (
int i=0;
i<3;
i++) {
75 for (
int i=0;
i<
n-1;
i++)
80 Gecode::Support::quicksort<int,SortIntMin>(
x,
n,sim);
82 for (
int i=0;
i<
n;
i++)
90 for (
int i=0;
i<
n;
i++) {
102 static const int n = 3;
109 for (
int i=0;
i<
n;
i++) {
113 for (
int i=0;
i<
n;
i++)
114 for (
int j=
i+1; j<
n; j++)
119 for (
int i=0;
i<
n-1;
i++)
124 for (
int i=0;
i<
n;
i++)
125 if ((
z[
i] < 0) || (
z[
i] >=
n))
129 for (
int i=0;
i<
n;
i++)
135 Gecode::Support::quicksort<int,SortIntMin>(
x,
n,sim);
136 for (
int i=0;
i<
n;
i++)
145 for (
int i=0;
i<
n;
i++) {
Node * x
Pointer to corresponding Boolean expression node.
Passing integer variables.
Base class for assignments
Test sorted without permutation variables
virtual bool solution(const Assignment &xy) const
Test whether xy is solution
virtual void post(Gecode::Space &home, Gecode::IntVarArray &xy)
Post constraint on xy.
NoVar(void)
Create and register test.
static const int n
Number of variables to be sorted.
Test sorted with permutation variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &xyz)
Post constraint on xyz.
static const int n
Number of variables to be sorted.
virtual bool solution(const Assignment &xyz) const
Test whether xyz is solution
PermVar(void)
Create and register test.
Relation for sorting integers in increasing order.
bool operator()(const int x, const int y)
Test whether x is less than y
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF)
Post propagator that y is x sorted in increasing order.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Post propagator for SetVar SetOpType SetVar y
Gecode::IntArgs i({1, 2, 3, 4})