57 :
Test(
"Arithmetic::Mult::XYZ::"+
str(
ipl)+
"::"+s,3,d,false,
ipl) {}
60 double d0 =
static_cast<double>(x[0]);
61 double d1 =
static_cast<double>(x[1]);
62 double d2 =
static_cast<double>(x[2]);
77 :
Test(
"Arithmetic::Mult::XXY::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
80 double d0 =
static_cast<double>(x[0]);
81 double d1 =
static_cast<double>(x[0]);
82 double d2 =
static_cast<double>(x[1]);
97 :
Test(
"Arithmetic::Mult::XYX::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
100 double d0 =
static_cast<double>(x[0]);
101 double d1 =
static_cast<double>(x[1]);
102 double d2 =
static_cast<double>(x[0]);
117 :
Test(
"Arithmetic::Mult::XYY::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
120 double d0 =
static_cast<double>(x[0]);
121 double d1 =
static_cast<double>(x[1]);
122 double d2 =
static_cast<double>(x[1]);
137 :
Test(
"Arithmetic::Mult::XXX::"+
str(
ipl)+
"::"+s,1,d,false,
ipl) {}
140 double d0 =
static_cast<double>(x[0]);
141 double d1 =
static_cast<double>(x[0]);
142 double d2 =
static_cast<double>(x[0]);
157 :
Test(
"Arithmetic::Sqr::XY::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
160 double d0 =
static_cast<double>(x[0]);
161 double d1 =
static_cast<double>(x[1]);
176 :
Test(
"Arithmetic::Sqr::XX::"+
str(
ipl)+
"::"+s,1,d,false,
ipl) {}
179 double d0 =
static_cast<double>(x[0]);
194 :
Test(
"Arithmetic::Sqrt::XY::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
197 double d0 =
static_cast<double>(x[0]);
198 double d1 =
static_cast<double>(x[1]);
199 return (d0 >= 0) && (d0 >= d1*d1) && (d0 < (d1+1)*(d1+1));
213 :
Test(
"Arithmetic::Sqrt::XX::"+
str(
ipl)+
"::"+s,1,d,false,
ipl) {}
216 double d0 =
static_cast<double>(x[0]);
217 return (d0 >= 0) && (d0 >= d0*d0) && (d0 < (d0+1)*(d0+1));
235 2,d,false,
ipl),
n(n0) {}
239 for (
int i=0; i<
n; i++) {
267 1,d,false,
ipl),
n(n0) {}
271 for (
int i=0; i<
n; i++) {
306 long long int m = (l + u) >> 1;
307 if (
powgr(n,m,
x)) u=m;
else l=m;
309 return static_cast<int>(l);
334 long long int m = (l + u) >> 1;
335 if (
powle(n,m,
x)) l=m;
else u=m;
337 return static_cast<int>(u);
350 :
Test(
"Arithmetic::Nroot::XY::"+
str(n0)+
"::"+
str(
ipl)+
"::"+s,
351 2,d,false,
ipl),
n(n0) {}
356 if ((
n % 2 == 0) && ((
x[0] < 0) || (
x[1] < 0)))
380 :
Test(
"Arithmetic::Nroot::XX::"+
str(n0)+
"::"+
str(
ipl)+
"::"+s,
381 1,d,false,
ipl),
n(n0) {}
387 return (
x[0] >= 0) && (
x[0] <= 1);
389 return (
x[0] >= -2) && (
x[0] <= 1);
402 static int abs(
int a) {
return a<0 ? -a:a; }
404 static int sgn(
int a) {
return a<0 ? -1:1; }
408 :
Test(
"Arithmetic::DivMod::"+s,4,d) {}
411 return x[0] ==
x[1]*
x[2]+
x[3] &&
412 abs(
x[3]) < abs(
x[1]) &&
413 (
x[3] == 0 || sgn(
x[3]) == sgn(
x[0]));
426 :
Test(
"Arithmetic::Div::"+s,3,d) {}
431 int divsign = (
x[0] /
x[1] < 0) ? -1 : 1;
434 static_cast<int>(floor(
static_cast<double>(std::abs(
x[0]))/
435 static_cast<double>(std::abs(
x[1]))));
436 return x[2] == divresult;
449 :
Test(
"Arithmetic::Mod::"+s,3,d) {}
454 int divsign = (
x[0] /
x[1] < 0) ? -1 : 1;
457 static_cast<int>(floor(
static_cast<double>(std::abs(
x[0]))/
458 static_cast<double>(std::abs(
x[1]))));
459 return x[0] ==
x[1]*divresult+
x[2];
473 :
Test(
"Arithmetic::Abs::XY::"+
str(
ipl)+
"::"+s,2,d,false,
ipl) {}
476 double d0 =
static_cast<double>(
x[0]);
477 double d1 =
static_cast<double>(
x[1]);
478 return (d0<0 ? -d0 : d0) == d1;
492 :
Test(
"Arithmetic::Abs::XX::"+
str(
ipl)+
"::"+s,1,d,false,
ipl) {}
495 double d0 =
static_cast<double>(
x[0]);
496 double d1 =
static_cast<double>(
x[0]);
497 return (d0<0 ? -d0 : d0) == d1;
511 :
Test(
"Arithmetic::Min::Bin::XYZ::"+
str(
ipl)+
"::"+s,3,d,false,
ipl) {}
514 return std::min(
x[0],
x[1]) ==
x[2];
528 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(
ipl)+
"::"+s,2,d) {}
531 return std::min(
x[0],
x[0]) ==
x[1];
545 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(
ipl)+
"::"+s,2,d) {}
548 return std::min(
x[0],
x[1]) ==
x[0];
562 :
Test(
"Arithmetic::Min::Bin::XYY::"+
str(
ipl)+
"::"+s,2,d) {}
565 return std::min(
x[0],
x[1]) ==
x[1];
579 :
Test(
"Arithmetic::Min::Bin::XXX::"+
str(
ipl)+
"::"+s,1,d) {}
582 return std::min(
x[0],
x[0]) ==
x[0];
596 :
Test(
"Arithmetic::Max::Bin::XYZ::"+
str(
ipl)+
"::"+s,3,d) {
601 return std::max(
x[0],
x[1]) ==
x[2];
615 :
Test(
"Arithmetic::Max::Bin::XXY::"+
str(
ipl)+
"::"+s,2,d) {}
618 return std::max(
x[0],
x[0]) ==
x[1];
632 :
Test(
"Arithmetic::Max::Bin::XYX::"+
str(
ipl)+
"::"+s,2,d) {}
635 return std::max(
x[0],
x[1]) ==
x[0];
649 :
Test(
"Arithmetic::Max::Bin::XYY::"+
str(
ipl)+
"::"+s,2,d) {}
652 return std::max(
x[0],
x[1]) ==
x[1];
666 :
Test(
"Arithmetic::Max::Bin::XXX::"+
str(
ipl)+
"::"+s,1,d) {}
669 return std::max(
x[0],
x[0]) ==
x[0];
682 :
Test(
"Arithmetic::Min::Nary::"+
str(
ipl),4,-4,4,false,
ipl) {}
685 return std::min(std::min(
x[0],
x[1]),
x[2]) ==
x[3];
690 m[0]=
x[0]; m[1]=
x[1]; m[2]=
x[2];
700 :
Test(
"Arithmetic::Min::Nary::Shared::"+
str(
ipl),3,-4,4,false,
ipl) {}
703 return std::min(std::min(
x[0],
x[1]),
x[2]) ==
x[1];
708 m[0]=
x[0]; m[1]=
x[1]; m[2]=
x[2];
718 :
Test(
"Arithmetic::Max::Nary::"+
str(
ipl),4,-4,4,false,
ipl) {}
721 return std::max(std::max(
x[0],
x[1]),
x[2]) ==
x[3];
726 m[0]=
x[0]; m[1]=
x[1]; m[2]=
x[2];
736 :
Test(
"Arithmetic::Max::Nary::Shared::"+
str(
ipl),3,-4,4,false,
ipl) {}
739 return std::max(std::max(
x[0],
x[1]),
x[2]) ==
x[1];
744 m[0]=
x[0]; m[1]=
x[1]; m[2]=
x[2];
759 :
Test(
"Arithmetic::ArgMax::"+
str(o)+
"::"+
str(tb)+
"::"+
str(n),
769 for (
int i=1; i<n; i++)
779 for (
int i=0; i<n; i++)
793 :
Test(
"Arithmetic::ArgMax::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
801 if ((
x[n] < 0) || (
x[n] >= 2*n))
804 for (
int i=0; i<n; i++)
805 y[2*i+0]=
y[2*i+1]=
x[i];
807 for (
int i=1; i<2*n; i++)
817 for (
int i=0; i<n; i++)
818 m[2*i+0]=m[2*i+1]=
x[i];
833 :
Test(
"Arithmetic::ArgMin::"+
str(o)+
"::"+
str(tb)+
"::"+
str(n),
843 for (
int i=1; i<n; i++)
853 for (
int i=0; i<n; i++)
867 :
Test(
"Arithmetic::ArgMin::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
875 if ((
x[n] < 0) || (
x[n] >= 2*n))
878 for (
int i=0; i<n; i++)
879 y[2*i+0]=
y[2*i+1]=
x[i];
881 for (
int i=1; i<2*n; i++)
891 for (
int i=0; i<n; i++)
892 m[2*i+0]=m[2*i+1]=
x[i];
907 :
Test(
"Arithmetic::ArgMaxBool::"+
str(o)+
"::"+
str(tb)+
"::"+
str(n),
919 for (
int i=1; i<n; i++) {
932 for (
int i=0; i<n; i++)
946 :
Test(
"Arithmetic::ArgMaxBool::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
954 if ((
x[n] < 0) || (
x[n] >= 2*n))
957 for (
int i=0; i<n; i++)
958 y[2*i+0]=
y[2*i+1]=
x[i];
962 for (
int i=1; i<2*n; i++) {
975 for (
int i=0; i<n; i++)
976 m[2*i+0]=m[2*i+1]=
channel(home,
x[i]);
991 :
Test(
"Arithmetic::ArgMinBool::"+
str(o)+
"::"+
str(tb)+
"::"+
str(n),
1000 int m=
x[0];
int p=0;
1001 if (
x[0] < 0 ||
x[0] > 1)
1003 for (
int i=1; i<n; i++) {
1004 if (
x[i] < 0 ||
x[i] > 1)
1016 for (
int i=0; i<n; i++)
1030 :
Test(
"Arithmetic::ArgMinBool::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
1038 if ((
x[n] < 0) || (
x[n] >= 2*n))
1041 for (
int i=0; i<n; i++)
1042 y[2*i+0]=
y[2*i+1]=
x[i];
1043 int m=
y[0];
int p=0;
1046 for (
int i=1; i<2*n; i++) {
1059 for (
int i=0; i<n; i++)
1060 m[2*i+0]=m[2*i+1]=
channel(home,
x[i]);
1077 static_cast<int>(-
sqrt(
static_cast<double>
1080 static_cast<int>(
sqrt(
static_cast<double>
1089 (void)
new DivMod(
"A",a);
1090 (void)
new DivMod(
"B",b);
1093 (void)
new Div(
"A",a);
1094 (void)
new Div(
"B",b);
1095 (void)
new Div(
"C",
c);
1097 (void)
new Mod(
"A",a);
1098 (void)
new Mod(
"B",b);
1099 (void)
new Mod(
"C",
c);
1103 (void)
new AbsXY(
"A",a,ipls.ipl());
1104 (void)
new AbsXY(
"B",b,ipls.ipl());
1105 (void)
new AbsXY(
"C",
c,ipls.ipl());
1107 (void)
new AbsXX(
"A",a,ipls.ipl());
1108 (void)
new AbsXX(
"B",b,ipls.ipl());
1109 (void)
new AbsXX(
"C",
c,ipls.ipl());
1111 (void)
new MultXYZ(
"A",a,ipls.ipl());
1112 (void)
new MultXYZ(
"B",b,ipls.ipl());
1113 (void)
new MultXYZ(
"C",
c,ipls.ipl());
1115 (void)
new MultXXY(
"A",a,ipls.ipl());
1116 (void)
new MultXXY(
"B",b,ipls.ipl());
1117 (void)
new MultXXY(
"C",
c,ipls.ipl());
1119 (void)
new MultXYX(
"A",a,ipls.ipl());
1120 (void)
new MultXYX(
"B",b,ipls.ipl());
1121 (void)
new MultXYX(
"C",
c,ipls.ipl());
1123 (void)
new MultXYY(
"A",a,ipls.ipl());
1124 (void)
new MultXYY(
"B",b,ipls.ipl());
1125 (void)
new MultXYY(
"C",
c,ipls.ipl());
1127 (void)
new MultXXX(
"A",a,ipls.ipl());
1128 (void)
new MultXXX(
"B",b,ipls.ipl());
1129 (void)
new MultXXX(
"C",
c,ipls.ipl());
1131 (void)
new SqrXY(
"A",a,ipls.ipl());
1132 (void)
new SqrXY(
"B",b,ipls.ipl());
1133 (void)
new SqrXY(
"C",
c,ipls.ipl());
1135 (void)
new SqrXX(
"A",a,ipls.ipl());
1136 (void)
new SqrXX(
"B",b,ipls.ipl());
1137 (void)
new SqrXX(
"C",
c,ipls.ipl());
1139 for (
int n=0; n<=6; n++) {
1140 (void)
new PowXY(
"A",n,a,ipls.ipl());
1141 (void)
new PowXY(
"B",n,b,ipls.ipl());
1142 (void)
new PowXY(
"C",n,
c,ipls.ipl());
1143 (void)
new PowXY(
"D",n,d,ipls.ipl());
1145 (void)
new PowXX(
"A",n,a,ipls.ipl());
1146 (void)
new PowXX(
"B",n,b,ipls.ipl());
1147 (void)
new PowXX(
"C",n,
c,ipls.ipl());
1148 (void)
new PowXX(
"D",n,d,ipls.ipl());
1151 for (
int n=1; n<=6; n++) {
1152 (void)
new NrootXY(
"A",n,a,ipls.ipl());
1153 (void)
new NrootXY(
"B",n,b,ipls.ipl());
1154 (void)
new NrootXY(
"C",n,
c,ipls.ipl());
1155 (void)
new NrootXY(
"D",n,d,ipls.ipl());
1157 (void)
new NrootXX(
"A",n,a,ipls.ipl());
1158 (void)
new NrootXX(
"B",n,b,ipls.ipl());
1159 (void)
new NrootXX(
"C",n,
c,ipls.ipl());
1160 (void)
new NrootXX(
"D",n,d,ipls.ipl());
1163 for (
int n=30; n<=34; n++) {
1164 (void)
new PowXY(
"C",n,
c,ipls.ipl());
1165 (void)
new PowXX(
"C",n,
c,ipls.ipl());
1166 (void)
new NrootXY(
"C",n,
c,ipls.ipl());
1167 (void)
new NrootXX(
"C",n,
c,ipls.ipl());
1170 (void)
new SqrtXY(
"A",a,ipls.ipl());
1171 (void)
new SqrtXY(
"B",b,ipls.ipl());
1172 (void)
new SqrtXY(
"C",
c,ipls.ipl());
1174 (void)
new SqrtXX(
"A",a,ipls.ipl());
1175 (void)
new SqrtXX(
"B",b,ipls.ipl());
1176 (void)
new SqrtXX(
"C",
c,ipls.ipl());
1178 (void)
new MinXYZ(
"A",a,ipls.ipl());
1179 (void)
new MinXYZ(
"B",b,ipls.ipl());
1180 (void)
new MinXYZ(
"C",
c,ipls.ipl());
1182 (void)
new MinXXY(
"A",a,ipls.ipl());
1183 (void)
new MinXXY(
"B",b,ipls.ipl());
1184 (void)
new MinXXY(
"C",
c,ipls.ipl());
1186 (void)
new MinXYX(
"A",a,ipls.ipl());
1187 (void)
new MinXYX(
"B",b,ipls.ipl());
1188 (void)
new MinXYX(
"C",
c,ipls.ipl());
1190 (void)
new MinXYY(
"A",a,ipls.ipl());
1191 (void)
new MinXYY(
"B",b,ipls.ipl());
1192 (void)
new MinXYY(
"C",
c,ipls.ipl());
1194 (void)
new MinXXX(
"A",a,ipls.ipl());
1195 (void)
new MinXXX(
"B",b,ipls.ipl());
1196 (void)
new MinXXX(
"C",
c,ipls.ipl());
1198 (void)
new MaxXYZ(
"A",a,ipls.ipl());
1199 (void)
new MaxXYZ(
"B",b,ipls.ipl());
1200 (void)
new MaxXYZ(
"C",
c,ipls.ipl());
1202 (void)
new MaxXXY(
"A",a,ipls.ipl());
1203 (void)
new MaxXXY(
"B",b,ipls.ipl());
1204 (void)
new MaxXXY(
"C",
c,ipls.ipl());
1206 (void)
new MaxXYX(
"A",a,ipls.ipl());
1207 (void)
new MaxXYX(
"B",b,ipls.ipl());
1208 (void)
new MaxXYX(
"C",
c,ipls.ipl());
1210 (void)
new MaxXYY(
"A",a,ipls.ipl());
1211 (void)
new MaxXYY(
"B",b,ipls.ipl());
1212 (void)
new MaxXYY(
"C",
c,ipls.ipl());
1214 (void)
new MaxXXX(
"A",a,ipls.ipl());
1215 (void)
new MaxXXX(
"B",b,ipls.ipl());
1216 (void)
new MaxXXX(
"C",
c,ipls.ipl());
1218 (void)
new MinNary(ipls.ipl());
1220 (void)
new MaxNary(ipls.ipl());
1225 for (
int i=1; i<5; i++) {
1226 (void)
new ArgMax(i,0,
true);
1227 (void)
new ArgMax(i,1,
true);
1229 (void)
new ArgMin(i,0,
true);
1230 (void)
new ArgMin(i,1,
true);
1232 (void)
new ArgMax(i,0,
false);
1233 (void)
new ArgMax(i,1,
false);
1235 (void)
new ArgMin(i,0,
false);
1236 (void)
new ArgMin(i,1,
false);
Passing Boolean variables.
Passing integer arguments.
Passing integer variables.
Test for absolute value constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
AbsXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for absolute value constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
AbsXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for argument maximum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
ArgMaxBoolShared(int n, bool tb)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
Test for Boolean argument maximum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
int offset
Offset to be used.
virtual bool solution(const Assignment &x) const
Test whether x is solution
ArgMaxBool(int n, int o, bool tb)
Create and register test.
Test for argument maximum constraint with shared variables
ArgMaxShared(int n, bool tb)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
Test for argument maximum constraint
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.
int offset
Offset to be used.
bool tiebreak
Whether to use tie-breaking.
ArgMax(int n, int o, bool tb)
Create and register test.
Test for argument minimum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
ArgMinBoolShared(int n, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for argument minimum constraint
int offset
Which offset to use.
bool tiebreak
Whether to use tie-breaking.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ArgMinBool(int n, int o, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for argument minimum constraint with shared variables
bool tiebreak
Whether to use tie-breaking.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ArgMinShared(int n, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for argument minimum constraint
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.
ArgMin(int n, int o, bool tb)
Create and register test.
bool tiebreak
Whether to use tie-breaking.
int offset
Which offset to use.
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test for division/modulo constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
DivMod(const std::string &s, const Gecode::IntSet &d)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for division constraint
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.
Div(const std::string &s, const Gecode::IntSet &d)
Create and register test.
Test for n-ary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxNaryShared(Gecode::IntPropLevel ipl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for n-ary maximum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxNary(Gecode::IntPropLevel ipl)
Create and register test.
Test for binary maximum constraint with shared variables
MaxXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
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.
Test for binary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for binary maximum constraint with shared variables
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.
MaxXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for binary maximum constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinNaryShared(Gecode::IntPropLevel ipl)
Create and register test.
Test for n-ary minimmum constraint
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.
MinNary(Gecode::IntPropLevel ipl)
Create and register test.
Test for binary minimum constraint with shared variables
MinXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
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.
Test for binary minimum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
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.
MinXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for binary minimum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for binary minimum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for modulo constraint
Mod(const std::string &s, const Gecode::IntSet &d)
Create and register test.
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.
Test for multiplication constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
MultXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MultXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for multiplication constraint with shared variables
MultXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
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.
Test for multiplication constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
MultXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for multiplication constraint
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.
MultXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for nroot constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
NrootXX(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for nroot constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
NrootXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Floor.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for power constraint with shared variables
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.
PowXX(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for power constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
PowXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for squaring constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
SqrXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for squaring constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
SqrXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for square root constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
SqrtXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for square root constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
SqrtXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Base class for assignments
Iterator for simple integer propagation levels.
bool testfix
Whether to perform fixpoint test.
Gecode::IntPropLevel ipl
Propagation level.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
ConTestLevel contest
Whether to test for certain consistency.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_VAL
Value propagation.
@ IPL_DEF
Simple propagation levels.
const int min
Smallest allowed integer value.
const int max
Largest allowed integer value.
Gecode toplevel namespace
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
IntVar expr(Home home, const LinIntExpr &e, const IntPropLevels &ipls=IntPropLevels::def)
Post linear expression and return its value.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Post propagator for SetVar x
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Tests for arithmetic constraints
bool powgr(int n, long long int r, int x)
bool powle(int n, long long int r, int x)
Testing finite domain integers.
@ CTL_BOUNDS_Z
Test for bounds(z)-consistency.