45 namespace Test {
namespace Int {
48 namespace Arithmetic {
61 :
Test(
"Arithmetic::Mult::XYZ::"+
str(icl)+
"::"+s,3,d,false,icl) {}
64 double d0 =
static_cast<double>(x[0]);
65 double d1 =
static_cast<double>(x[1]);
66 double d2 =
static_cast<double>(x[2]);
81 :
Test(
"Arithmetic::Mult::XXY::"+
str(icl)+
"::"+s,2,d,false,icl) {}
84 double d0 =
static_cast<double>(x[0]);
85 double d1 =
static_cast<double>(x[0]);
86 double d2 =
static_cast<double>(x[1]);
101 :
Test(
"Arithmetic::Mult::XYX::"+
str(icl)+
"::"+s,2,d,false,icl) {}
104 double d0 =
static_cast<double>(x[0]);
105 double d1 =
static_cast<double>(x[1]);
106 double d2 =
static_cast<double>(x[0]);
121 :
Test(
"Arithmetic::Mult::XYY::"+
str(icl)+
"::"+s,2,d,false,icl) {}
124 double d0 =
static_cast<double>(x[0]);
125 double d1 =
static_cast<double>(x[1]);
126 double d2 =
static_cast<double>(x[1]);
141 :
Test(
"Arithmetic::Mult::XXX::"+
str(icl)+
"::"+s,1,d,false,icl) {}
144 double d0 =
static_cast<double>(x[0]);
145 double d1 =
static_cast<double>(x[0]);
146 double d2 =
static_cast<double>(x[0]);
161 :
Test(
"Arithmetic::Sqr::XY::"+
str(icl)+
"::"+s,2,d,false,icl) {}
164 double d0 =
static_cast<double>(x[0]);
165 double d1 =
static_cast<double>(x[1]);
180 :
Test(
"Arithmetic::Sqr::XX::"+
str(icl)+
"::"+s,1,d,false,icl) {}
183 double d0 =
static_cast<double>(x[0]);
198 :
Test(
"Arithmetic::Sqrt::XY::"+
str(icl)+
"::"+s,2,d,false,icl) {}
201 double d0 =
static_cast<double>(x[0]);
202 double d1 =
static_cast<double>(x[1]);
203 return (d0 >= 0) && (d0 >= d1*
d1) && (d0 < (d1+1)*(d1+1));
217 :
Test(
"Arithmetic::Sqrt::XX::"+
str(icl)+
"::"+s,1,d,false,icl) {}
220 double d0 =
static_cast<double>(x[0]);
221 return (d0 >= 0) && (d0 >= d0*d0) && (d0 < (d0+1)*(d0+1));
238 :
Test(
"Arithmetic::Pow::XY::"+
str(n0)+
"::"+
str(icl)+
"::"+s,
239 2,d,false,icl), n(n0) {}
243 for (
int i=0;
i<
n;
i++) {
255 pow(home, x[0], n, x[1],
icl);
270 :
Test(
"Arithmetic::Pow::XX::"+
str(n0)+
"::"+
str(icl)+
"::"+s,
271 1,d,false,icl), n(n0) {}
275 for (
int i=0;
i<
n;
i++) {
310 long long int m = (l +
u) >> 1;
311 if (
powgr(n,m,x)) u=m;
else l=m;
313 return static_cast<int>(
l);
338 long long int m = (l +
u) >> 1;
339 if (
powle(n,m,x)) l=m;
else u=m;
341 return static_cast<int>(
u);
354 :
Test(
"Arithmetic::Nroot::XY::"+
str(n0)+
"::"+
str(icl)+
"::"+s,
355 2,d,false,icl), n(n0) {}
360 if ((n % 2 == 0) && ((x[0] < 0) || (x[1] < 0)))
384 :
Test(
"Arithmetic::Nroot::XX::"+
str(n0)+
"::"+
str(icl)+
"::"+s,
385 1,d,false,icl), n(n0) {}
391 return (x[0] >= 0) && (x[0] <= 1);
393 return (x[0] >= -2) && (x[0] <= 1);
406 static int abs(
int a) {
return a<0 ? -
a:
a; }
408 static int sgn(
int a) {
return a<0 ? -1:1; }
412 :
Test(
"Arithmetic::DivMod::"+s,4,d) {}
415 return x[0] == x[1]*x[2]+x[3] &&
417 (x[3] == 0 || sgn(x[3]) == sgn(x[0]));
430 :
Test(
"Arithmetic::Div::"+s,3,d) {}
435 int divsign = (x[0] / x[1] < 0) ? -1 : 1;
438 static_cast<int>(floor(static_cast<double>(
std::abs(x[0]))/
439 static_cast<double>(
std::abs(x[1]))));
440 return x[2] == divresult;
453 :
Test(
"Arithmetic::Mod::"+s,3,d) {}
458 int divsign = (x[0] / x[1] < 0) ? -1 : 1;
461 static_cast<int>(floor(static_cast<double>(
std::abs(x[0]))/
462 static_cast<double>(
std::abs(x[1]))));
463 return x[0] == x[1]*divresult+x[2];
477 :
Test(
"Arithmetic::Abs::XY::"+
str(icl)+
"::"+s,2,d,false,icl) {}
480 double d0 =
static_cast<double>(x[0]);
481 double d1 =
static_cast<double>(x[1]);
482 return (d0<0 ? -d0 : d0) ==
d1;
496 :
Test(
"Arithmetic::Abs::XX::"+
str(icl)+
"::"+s,1,d,false,icl) {}
499 double d0 =
static_cast<double>(x[0]);
500 double d1 =
static_cast<double>(x[0]);
501 return (d0<0 ? -d0 : d0) ==
d1;
515 :
Test(
"Arithmetic::Min::Bin::XYZ::"+
str(icl)+
"::"+s,3,d,false,icl) {}
532 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(icl)+
"::"+s,2,d) {}
549 :
Test(
"Arithmetic::Min::Bin::XYX::"+
str(icl)+
"::"+s,2,d) {}
566 :
Test(
"Arithmetic::Min::Bin::XYY::"+
str(icl)+
"::"+s,2,d) {}
583 :
Test(
"Arithmetic::Min::Bin::XXX::"+
str(icl)+
"::"+s,1,d) {}
600 :
Test(
"Arithmetic::Max::Bin::XYZ::"+
str(icl)+
"::"+s,3,d) {
619 :
Test(
"Arithmetic::Max::Bin::XXY::"+
str(icl)+
"::"+s,2,d) {}
636 :
Test(
"Arithmetic::Max::Bin::XYX::"+
str(icl)+
"::"+s,2,d) {}
653 :
Test(
"Arithmetic::Max::Bin::XYY::"+
str(icl)+
"::"+s,2,d) {}
670 :
Test(
"Arithmetic::Max::Bin::XXX::"+
str(icl)+
"::"+s,1,d) {}
686 :
Test(
"Arithmetic::Min::Nary::"+
str(icl),4,-4,4,false,icl) {}
694 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
704 :
Test(
"Arithmetic::Min::Nary::Shared::"+
str(icl),3,-4,4,false,icl) {}
712 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
722 :
Test(
"Arithmetic::Max::Nary::"+
str(icl),4,-4,4,false,icl) {}
730 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
740 :
Test(
"Arithmetic::Max::Nary::Shared::"+
str(icl),3,-4,4,false,icl) {}
748 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
761 :
Test(
"Arithmetic::ArgMax::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
767 if ((x[n] < 0) || (x[n] >= n))
770 for (
int i=1;
i<
n;
i++)
774 return tiebreak ? (p == x[
n]) : (m == x[x[n]]);
780 for (
int i=0;
i<
n;
i++)
794 :
Test(
"Arithmetic::ArgMax::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
800 if ((x[n] < 0) || (x[n] >= 2*n))
803 for (
int i=0;
i<
n;
i++)
804 y[2*
i+0]=y[2*
i+1]=x[
i];
806 for (
int i=1;
i<2*
n;
i++)
810 return tiebreak ? (p == x[
n]) : (m == y[x[n]]);
816 for (
int i=0;
i<
n;
i++)
817 m[2*
i+0]=m[2*
i+1]=x[
i];
830 :
Test(
"Arithmetic::ArgMin::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
836 if ((x[n] < 0) || (x[n] >= n))
839 for (
int i=1;
i<
n;
i++)
843 return tiebreak ? (p == x[
n]) : (m == x[x[n]]);
849 for (
int i=0;
i<
n;
i++)
863 :
Test(
"Arithmetic::ArgMin::Shared::"+
str(tb)+
"::"+
str(n),n+1,0,n+1,
869 if ((x[n] < 0) || (x[n] >= 2*n))
872 for (
int i=0;
i<
n;
i++)
873 y[2*
i+0]=y[2*
i+1]=x[
i];
875 for (
int i=1;
i<2*
n;
i++)
879 return tiebreak ? (p == x[
n]) : (m == y[x[n]]);
885 for (
int i=0;
i<
n;
i++)
886 m[2*
i+0]=m[2*
i+1]=x[
i];
905 static_cast<int>(-
sqrt(static_cast<double>
908 static_cast<int>(
sqrt(static_cast<double>
909 (Gecode::Int::Limits::max)))
921 (void)
new Div(
"A",a);
922 (void)
new Div(
"B",b);
923 (void)
new Div(
"C",c);
925 (void)
new Mod(
"A",a);
926 (void)
new Mod(
"B",b);
927 (void)
new Mod(
"C",c);
932 (void)
new MultXYZ(
"A",a,icls.icl());
933 (void)
new MultXYZ(
"B",b,icls.icl());
934 (void)
new MultXYZ(
"C",c,icls.icl());
936 (void)
new MultXXY(
"A",a,icls.icl());
937 (void)
new MultXXY(
"B",b,icls.icl());
938 (void)
new MultXXY(
"C",c,icls.icl());
940 (void)
new MultXYX(
"A",a,icls.icl());
941 (void)
new MultXYX(
"B",b,icls.icl());
942 (void)
new MultXYX(
"C",c,icls.icl());
944 (void)
new MultXYY(
"A",a,icls.icl());
945 (void)
new MultXYY(
"B",b,icls.icl());
946 (void)
new MultXYY(
"C",c,icls.icl());
948 (void)
new MultXXX(
"A",a,icls.icl());
949 (void)
new MultXXX(
"B",b,icls.icl());
950 (void)
new MultXXX(
"C",c,icls.icl());
952 (void)
new SqrXY(
"A",a,icls.icl());
953 (void)
new SqrXY(
"B",b,icls.icl());
954 (void)
new SqrXY(
"C",c,icls.icl());
956 (void)
new SqrXX(
"A",a,icls.icl());
957 (void)
new SqrXX(
"B",b,icls.icl());
958 (void)
new SqrXX(
"C",c,icls.icl());
960 for (
int n=0;
n<=6;
n++) {
961 (void)
new PowXY(
"A",
n,a,icls.icl());
962 (void)
new PowXY(
"B",
n,b,icls.icl());
963 (void)
new PowXY(
"C",
n,c,icls.icl());
964 (void)
new PowXY(
"D",
n,d,icls.icl());
966 (void)
new PowXX(
"A",
n,a,icls.icl());
967 (void)
new PowXX(
"B",
n,b,icls.icl());
968 (void)
new PowXX(
"C",
n,c,icls.icl());
969 (void)
new PowXX(
"D",
n,d,icls.icl());
972 for (
int n=1;
n<=6;
n++) {
973 (void)
new NrootXY(
"A",
n,a,icls.icl());
974 (void)
new NrootXY(
"B",
n,b,icls.icl());
975 (void)
new NrootXY(
"C",
n,c,icls.icl());
976 (void)
new NrootXY(
"D",
n,d,icls.icl());
978 (void)
new NrootXX(
"A",
n,a,icls.icl());
979 (void)
new NrootXX(
"B",
n,b,icls.icl());
980 (void)
new NrootXX(
"C",
n,c,icls.icl());
981 (void)
new NrootXX(
"D",
n,d,icls.icl());
984 for (
int n=30;
n<=34;
n++) {
985 (void)
new PowXY(
"C",
n,c,icls.icl());
986 (void)
new PowXX(
"C",
n,c,icls.icl());
987 (void)
new NrootXY(
"C",
n,c,icls.icl());
988 (void)
new NrootXX(
"C",
n,c,icls.icl());
991 (void)
new SqrtXY(
"A",a,icls.icl());
992 (void)
new SqrtXY(
"B",b,icls.icl());
993 (void)
new SqrtXY(
"C",c,icls.icl());
995 (void)
new SqrtXX(
"A",a,icls.icl());
996 (void)
new SqrtXX(
"B",b,icls.icl());
997 (void)
new SqrtXX(
"C",c,icls.icl());
999 (void)
new AbsXY(
"A",a,icls.icl());
1000 (void)
new AbsXY(
"B",b,icls.icl());
1001 (void)
new AbsXY(
"C",c,icls.icl());
1003 (void)
new AbsXX(
"A",a,icls.icl());
1004 (void)
new AbsXX(
"B",b,icls.icl());
1005 (void)
new AbsXX(
"C",c,icls.icl());
1007 (void)
new MinXYZ(
"A",a,icls.icl());
1008 (void)
new MinXYZ(
"B",b,icls.icl());
1009 (void)
new MinXYZ(
"C",c,icls.icl());
1011 (void)
new MinXXY(
"A",a,icls.icl());
1012 (void)
new MinXXY(
"B",b,icls.icl());
1013 (void)
new MinXXY(
"C",c,icls.icl());
1015 (void)
new MinXYX(
"A",a,icls.icl());
1016 (void)
new MinXYX(
"B",b,icls.icl());
1017 (void)
new MinXYX(
"C",c,icls.icl());
1019 (void)
new MinXYY(
"A",a,icls.icl());
1020 (void)
new MinXYY(
"B",b,icls.icl());
1021 (void)
new MinXYY(
"C",c,icls.icl());
1023 (void)
new MinXXX(
"A",a,icls.icl());
1024 (void)
new MinXXX(
"B",b,icls.icl());
1025 (void)
new MinXXX(
"C",c,icls.icl());
1027 (void)
new MaxXYZ(
"A",a,icls.icl());
1028 (void)
new MaxXYZ(
"B",b,icls.icl());
1029 (void)
new MaxXYZ(
"C",c,icls.icl());
1031 (void)
new MaxXXY(
"A",a,icls.icl());
1032 (void)
new MaxXXY(
"B",b,icls.icl());
1033 (void)
new MaxXXY(
"C",c,icls.icl());
1035 (void)
new MaxXYX(
"A",a,icls.icl());
1036 (void)
new MaxXYX(
"B",b,icls.icl());
1037 (void)
new MaxXYX(
"C",c,icls.icl());
1039 (void)
new MaxXYY(
"A",a,icls.icl());
1040 (void)
new MaxXYY(
"B",b,icls.icl());
1041 (void)
new MaxXYY(
"C",c,icls.icl());
1043 (void)
new MaxXXX(
"A",a,icls.icl());
1044 (void)
new MaxXXX(
"B",b,icls.icl());
1045 (void)
new MaxXXX(
"C",c,icls.icl());
1047 (void)
new MinNary(icls.icl());
1049 (void)
new MaxNary(icls.icl());
1052 for (
int i=1;
i<5;
i++) {
Test for power constraint
Test for multiplication constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
PowXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
Test for argument maximum 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 binary minimum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
IntConLevel
Consistency levels for integer propagators.
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool tiebreak
Whether to use tie-breaking.
virtual bool solution(const Assignment &x) const
Test whether x is solution
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntConLevel icl)
Post propagator for .
Test for binary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for binary maximum constraint with shared variables
AbsXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
int size(void) const
Return size of array (number of elements)
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for argument minimum constraint with shared variables
int size(void) const
Return number of variables.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for squaring constraint
Help class to create and register tests.
MultXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for argument maximum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MultXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
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
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Value propagation or consistency (naive)
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual bool solution(const Assignment &x) const
Test whether x is solution
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
bool tiebreak
Whether to use tie-breaking.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
bool powle(int n, long long int r, int x)
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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Iterator for integer consistency levels.
virtual bool solution(const Assignment &x) const
Test whether x is solution
ArgMin(int n, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
NrootXX(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
void min(Home home, const IntVarArgs &x, IntVar y, IntConLevel icl)
Post propagator for .
Test for binary minimum constraint
void pow(Home home, IntVar x0, int n, IntVar x1, IntConLevel icl)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ConTestLevel contest
Whether to test for certain consistency.
const int max
Largest allowed integer value.
Test for binary maximum constraint
MinXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
const int min
Smallest allowed integer value.
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntConLevel)
Post propagator for .
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 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 n-ary maximum constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
ArgMinShared(int n, bool tb)
Create and register test.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntConLevel)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint
AbsXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
MaxXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Div(const std::string &s, const Gecode::IntSet &d)
Create and register test.
int n
Number of negative literals for node type.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MinXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
Test for n-ary maximum constraint with shared variables
Test for binary minimum constraint with shared variables
Gecode::IntConLevel icl
Consistency level.
Test for absolute value constraint with shared variables
Create(void)
Perform creation and registration.
Test for binary maximum constraint with shared variables
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
NrootXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Floor.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Test for square root constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
MaxXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
Test for bounds(z)-consistency.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for modulo constraint
MinNary(Gecode::IntConLevel icl)
Create and register test.
SqrXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxNaryShared(Gecode::IntConLevel icl)
Create and register test.
MinNaryShared(Gecode::IntConLevel icl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
void max(Home home, const IntVarArgs &x, IntVar y, IntConLevel icl)
Post propagator for .
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::IntConLevel icl)
Create and register test.
union Gecode::@519::NNF::@60 u
Union depending on nodetype t.
Test for multiplication constraint with shared variables
Test for multiplication constraint with shared variables
MaxNary(Gecode::IntConLevel icl)
Create and register test.
Passing integer variables.
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntConLevel)
Post propagator for .
Passing integer arguments.
void sqrt(Home home, IntVar x0, IntVar x1, IntConLevel icl)
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
bool powgr(int n, long long int r, int x)
virtual bool solution(const Assignment &x) const
Test whether x is solution
MultXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
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 .
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.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for power constraint with shared variables
Gecode::FloatVal b(9, 12)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
SqrtXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
BoolVar expr(Home home, const BoolExpr &e, IntConLevel icl)
Post Boolean expression and return its value.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Node * x
Pointer to corresponding Boolean expression node.
Test for division 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
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for division/modulo constraint
Test for nroot 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
Test for binary minimum constraint with shared variables
Test for square root 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.
Base class for assignments
Test for binary maximum constraint with shared variables
SqrtXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::FloatVal a(-8, 5)
The default consistency for a constraint.
Test for squaring constraint with shared variables
Test for absolute value constraint
ArgMax(int n, bool tb)
Create and register test.
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.
Gecode toplevel namespace
virtual bool solution(const Assignment &x) const
Test whether x is solution
MaxXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
Test for argument minimum constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MultXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
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.
ArgMaxShared(int n, bool tb)
Create and register test.
void abs(Home home, IntVar x0, IntVar x1, IntConLevel icl)
Post propagator for .
void nroot(Home home, IntVar x0, int n, IntVar x1, IntConLevel icl)
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 nroot constraint
SqrXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
DivMod(const std::string &s, const Gecode::IntSet &d)
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 bool solution(const Assignment &x) const
Test whether x is solution
MaxXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
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 bool solution(const Assignment &x) const
Test whether x is solution
Domain propagation or consistency.
MultXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntConLevel icl)
Create and register test.
Test for n-ary minimmum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
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.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.