Go to the documentation of this file.
41 namespace Test {
namespace Int {
44 namespace Arithmetic {
60 double d0 = static_cast<double>(
x[0]);
61 double d1 = static_cast<double>(
x[1]);
62 double d2 = static_cast<double>(
x[2]);
80 double d0 = static_cast<double>(
x[0]);
81 double d1 = static_cast<double>(
x[0]);
82 double d2 = static_cast<double>(
x[1]);
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]);
160 double d0 = static_cast<double>(
x[0]);
161 double d1 = static_cast<double>(
x[1]);
179 double d0 = static_cast<double>(
x[0]);
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));
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;
309 return static_cast<int>(
l);
334 long long int m = (
l +
u) >> 1;
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] &&
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]))/
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]))/
459 return x[0] ==
x[1]*divresult+
x[2];
476 double d0 = static_cast<double>(
x[0]);
477 double d1 = static_cast<double>(
x[1]);
478 return (d0<0 ? -d0 : d0) ==
d1;
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) {}
528 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(
ipl)+
"::"+s,2,
d) {}
545 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(
ipl)+
"::"+s,2,
d) {}
562 :
Test(
"Arithmetic::Min::Bin::XYY::"+
str(
ipl)+
"::"+s,2,
d) {}
579 :
Test(
"Arithmetic::Min::Bin::XXX::"+
str(
ipl)+
"::"+s,1,
d) {}
596 :
Test(
"Arithmetic::Max::Bin::XYZ::"+
str(
ipl)+
"::"+s,3,
d) {
615 :
Test(
"Arithmetic::Max::Bin::XXY::"+
str(
ipl)+
"::"+s,2,
d) {}
632 :
Test(
"Arithmetic::Max::Bin::XYX::"+
str(
ipl)+
"::"+s,2,
d) {}
649 :
Test(
"Arithmetic::Max::Bin::XYY::"+
str(
ipl)+
"::"+s,2,
d) {}
666 :
Test(
"Arithmetic::Max::Bin::XXX::"+
str(
ipl)+
"::"+s,1,
d) {}
682 :
Test(
"Arithmetic::Min::Nary::"+
str(
ipl),4,-4,4,false,
ipl) {}
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) {}
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) {}
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) {}
744 m[0]=
x[0]; m[1]=
x[1]; m[2]=
x[2];
766 if ((
x[
n] < offset) || (
x[
n] >=
n + offset))
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++)
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];
840 if ((
x[
n] < offset) || (
x[
n] >=
n + offset))
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++)
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),
914 if ((
x[
n] < offset) || (
x[
n] >=
n + offset))
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++)
962 for (
int i=1;
i<2*
n;
i++) {
975 for (
int i=0;
i<
n;
i++)
991 :
Test(
"Arithmetic::ArgMinBool::"+
str(o)+
"::"+
str(tb)+
"::"+
str(
n),
998 if ((
x[
n] < offset) || (
x[
n] >=
n + offset))
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++)
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++)
1077 static_cast<int>(-
sqrt(static_cast<double>
1080 static_cast<int>(
sqrt(static_cast<double>
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++) {
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());
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++) {
MinXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
SqrtXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for argument minimum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint
Test for argument maximum constraint with shared variables
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
bool tiebreak
Whether to use tie-breaking.
Test for multiplication constraint with shared variables
bool powle(int n, long long int r, int x)
PowXY(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.
Post propagator for SetVar SetOpType SetVar y
Test for division constraint
ConTestLevel contest
Whether to test for certain consistency.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
MaxXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void min(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl)
Post propagator for .
Test for argument maximum 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.
Test for binary minimum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
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
int offset
Offset to be used.
Test for argument minimum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntPropLevel ipl
Propagation level.
virtual bool solution(const Assignment &x) const
Test whether x is solution
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 absolute value constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for squaring 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.
Passing integer variables.
void pow(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl)
Post propagator for .
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for bounds(z)-consistency.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for binary maximum constraint with shared variables
Test for binary maximum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
NrootXX(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for multiplication constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntPropLevel
Propagation levels for integer propagators.
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.
Gecode::FloatVal a(-8, 5)
Help class to create and register tests.
Test for nroot constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
SqrtXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for Boolean argument maximum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxNary(Gecode::IntPropLevel ipl)
Create and register test.
bool tiebreak
Whether to use tie-breaking.
MinXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for argument maximum constraint with shared variables
ArgMin(int n, int o, bool tb)
Create and register test.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
union Gecode::@602::NNF::@65 u
Union depending on nodetype t.
Gecode toplevel namespace
PowXX(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Create(void)
Perform creation and registration.
Test for modulo constraint
Test for binary minimum constraint with shared variables
AbsXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
bool testfix
Whether to perform fixpoint test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
ArgMinShared(int n, bool tb)
Create and register test.
int offset
Which offset to use.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxNaryShared(Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for argument minimum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
int offset
Offset to be used.
Node * x
Pointer to corresponding Boolean expression node.
Test for binary maximum constraint
BoolVar expr(Home home, const BoolExpr &e, const IntPropLevels &ipls)
Post Boolean expression and return its value.
Passing Boolean variables.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Test for n-ary maximum constraint with shared variables
Test for multiplication constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for absolute value constraint
ArgMaxBool(int n, int o, bool tb)
Create and register test.
Test for n-ary maximum constraint
ArgMinBool(int n, int o, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MultXYX(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.
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
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
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Domain propagation Options: basic versus advanced propagation.
Test for n-ary minimmum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
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
virtual bool solution(const Assignment &x) const
Test whether x is solution
const int max
Largest allowed integer value.
MaxXXY(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.
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MultXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for binary maximum constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Iterator for simple integer propagation levels.
Test for power constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::FloatVal b(9, 12)
NrootXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Floor.
MinXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
ArgMax(int n, int o, bool tb)
Create and register test.
Test for square root constraint with shared variables
virtual bool solution(const Assignment &x) const
Test whether x is solution
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
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.
Base class for assignments
Test for multiplication constraint with shared variables
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel)
Post propagator for .
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.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void abs(Home home, IntVar x0, IntVar x1, IntPropLevel ipl)
Post propagator for .
MinNaryShared(Gecode::IntPropLevel ipl)
Create and register test.
ArgMaxBoolShared(int n, bool tb)
Create and register test.
SqrXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Simple propagation levels.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for binary minimum constraint with shared variables
void nroot(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl)
Post propagator for .
Test for binary minimum constraint with shared variables
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 .
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
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.
bool powgr(int n, long long int r, int x)
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.
AbsXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
MultXYZ(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
int offset
Which offset to use.
void max(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl)
Post propagator for .
Test for argument minimum constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
MaxXXX(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.
const int min
Smallest allowed integer value.
ArgMaxShared(int n, bool tb)
Create and register test.
Test for division/modulo constraint
Test for square root constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Test for binary maximum constraint with shared variables
MinNary(Gecode::IntPropLevel ipl)
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
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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
LDSB< TieBreak > tiebreak("TieBreak")
bool tiebreak
Whether to use tie-breaking.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
SqrXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for nroot constraint with shared variables
Passing integer arguments.
Gecode::IntArgs i({1, 2, 3, 4})
virtual bool solution(const Assignment &x) const
Test whether x is solution
bool tiebreak
Whether to use tie-breaking.
MultXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
int p
Number of positive literals for node type.
Test for binary minimum constraint
Mod(const std::string &s, const Gecode::IntSet &d)
Create and register test.
Test for power constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ArgMinBoolShared(int n, bool tb)
Create and register test.
void sqrt(Home home, IntVar x0, IntVar x1, IntPropLevel ipl)
Post propagator for .
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.