41 namespace Test {
namespace Int {
44 namespace Arithmetic {
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));
234 :
Test(
"Arithmetic::Pow::XY::"+
str(n0)+
"::"+
str(ipl)+
"::"+s,
235 2,d,false,ipl), n(n0) {}
239 for (
int i=0;
i<
n;
i++) {
251 pow(home, x[0], n, x[1],
ipl);
266 :
Test(
"Arithmetic::Pow::XX::"+
str(n0)+
"::"+
str(ipl)+
"::"+s,
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] &&
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) {}
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];
759 :
Test(
"Arithmetic::ArgMax::"+
str(o)+
"::"+
str(tb)+
"::"+
str(n),
762 offset(o), tiebreak(tb) {}
766 if ((x[n] < offset) || (x[n] >= n + offset))
769 for (
int i=1;
i<
n;
i++)
773 return tiebreak ? (p + offset == x[
n]) : (m == x[x[n]-offset]);
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++)
811 return tiebreak ? (p == x[
n]) : (m == y[x[n]]);
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),
836 offset(o), tiebreak(tb) {}
840 if ((x[n] < offset) || (x[n] >= n + offset))
843 for (
int i=1;
i<
n;
i++)
847 return tiebreak ? (p+offset == x[
n]) : (m == x[x[n]-offset]);
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++)
885 return tiebreak ? (p == x[
n]) : (m == y[x[n]]);
891 for (
int i=0;
i<
n;
i++)
892 m[2*
i+0]=m[2*
i+1]=x[
i];
911 static_cast<int>(-
sqrt(static_cast<double>
914 static_cast<int>(
sqrt(static_cast<double>
915 (Gecode::Int::Limits::max)))
927 (void)
new Div(
"A",a);
928 (void)
new Div(
"B",b);
929 (void)
new Div(
"C",c);
931 (void)
new Mod(
"A",a);
932 (void)
new Mod(
"B",b);
933 (void)
new Mod(
"C",c);
937 (void)
new AbsXY(
"A",a,ipls.ipl());
938 (void)
new AbsXY(
"B",b,ipls.ipl());
939 (void)
new AbsXY(
"C",c,ipls.ipl());
941 (void)
new AbsXX(
"A",a,ipls.ipl());
942 (void)
new AbsXX(
"B",b,ipls.ipl());
943 (void)
new AbsXX(
"C",c,ipls.ipl());
945 (void)
new MultXYZ(
"A",a,ipls.ipl());
946 (void)
new MultXYZ(
"B",b,ipls.ipl());
947 (void)
new MultXYZ(
"C",c,ipls.ipl());
949 (void)
new MultXXY(
"A",a,ipls.ipl());
950 (void)
new MultXXY(
"B",b,ipls.ipl());
951 (void)
new MultXXY(
"C",c,ipls.ipl());
953 (void)
new MultXYX(
"A",a,ipls.ipl());
954 (void)
new MultXYX(
"B",b,ipls.ipl());
955 (void)
new MultXYX(
"C",c,ipls.ipl());
957 (void)
new MultXYY(
"A",a,ipls.ipl());
958 (void)
new MultXYY(
"B",b,ipls.ipl());
959 (void)
new MultXYY(
"C",c,ipls.ipl());
961 (void)
new MultXXX(
"A",a,ipls.ipl());
962 (void)
new MultXXX(
"B",b,ipls.ipl());
963 (void)
new MultXXX(
"C",c,ipls.ipl());
965 (void)
new SqrXY(
"A",a,ipls.ipl());
966 (void)
new SqrXY(
"B",b,ipls.ipl());
967 (void)
new SqrXY(
"C",c,ipls.ipl());
969 (void)
new SqrXX(
"A",a,ipls.ipl());
970 (void)
new SqrXX(
"B",b,ipls.ipl());
971 (void)
new SqrXX(
"C",c,ipls.ipl());
973 for (
int n=0;
n<=6;
n++) {
974 (void)
new PowXY(
"A",
n,a,ipls.ipl());
975 (void)
new PowXY(
"B",
n,b,ipls.ipl());
976 (void)
new PowXY(
"C",
n,c,ipls.ipl());
977 (void)
new PowXY(
"D",
n,d,ipls.ipl());
979 (void)
new PowXX(
"A",
n,a,ipls.ipl());
980 (void)
new PowXX(
"B",
n,b,ipls.ipl());
981 (void)
new PowXX(
"C",
n,c,ipls.ipl());
982 (void)
new PowXX(
"D",
n,d,ipls.ipl());
985 for (
int n=1;
n<=6;
n++) {
986 (void)
new NrootXY(
"A",
n,a,ipls.ipl());
987 (void)
new NrootXY(
"B",
n,b,ipls.ipl());
988 (void)
new NrootXY(
"C",
n,c,ipls.ipl());
989 (void)
new NrootXY(
"D",
n,d,ipls.ipl());
991 (void)
new NrootXX(
"A",
n,a,ipls.ipl());
992 (void)
new NrootXX(
"B",
n,b,ipls.ipl());
993 (void)
new NrootXX(
"C",
n,c,ipls.ipl());
994 (void)
new NrootXX(
"D",
n,d,ipls.ipl());
997 for (
int n=30;
n<=34;
n++) {
998 (void)
new PowXY(
"C",
n,c,ipls.ipl());
999 (void)
new PowXX(
"C",
n,c,ipls.ipl());
1000 (void)
new NrootXY(
"C",
n,c,ipls.ipl());
1001 (void)
new NrootXX(
"C",
n,c,ipls.ipl());
1004 (void)
new SqrtXY(
"A",a,ipls.ipl());
1005 (void)
new SqrtXY(
"B",b,ipls.ipl());
1006 (void)
new SqrtXY(
"C",c,ipls.ipl());
1008 (void)
new SqrtXX(
"A",a,ipls.ipl());
1009 (void)
new SqrtXX(
"B",b,ipls.ipl());
1010 (void)
new SqrtXX(
"C",c,ipls.ipl());
1012 (void)
new MinXYZ(
"A",a,ipls.ipl());
1013 (void)
new MinXYZ(
"B",b,ipls.ipl());
1014 (void)
new MinXYZ(
"C",c,ipls.ipl());
1016 (void)
new MinXXY(
"A",a,ipls.ipl());
1017 (void)
new MinXXY(
"B",b,ipls.ipl());
1018 (void)
new MinXXY(
"C",c,ipls.ipl());
1020 (void)
new MinXYX(
"A",a,ipls.ipl());
1021 (void)
new MinXYX(
"B",b,ipls.ipl());
1022 (void)
new MinXYX(
"C",c,ipls.ipl());
1024 (void)
new MinXYY(
"A",a,ipls.ipl());
1025 (void)
new MinXYY(
"B",b,ipls.ipl());
1026 (void)
new MinXYY(
"C",c,ipls.ipl());
1028 (void)
new MinXXX(
"A",a,ipls.ipl());
1029 (void)
new MinXXX(
"B",b,ipls.ipl());
1030 (void)
new MinXXX(
"C",c,ipls.ipl());
1032 (void)
new MaxXYZ(
"A",a,ipls.ipl());
1033 (void)
new MaxXYZ(
"B",b,ipls.ipl());
1034 (void)
new MaxXYZ(
"C",c,ipls.ipl());
1036 (void)
new MaxXXY(
"A",a,ipls.ipl());
1037 (void)
new MaxXXY(
"B",b,ipls.ipl());
1038 (void)
new MaxXXY(
"C",c,ipls.ipl());
1040 (void)
new MaxXYX(
"A",a,ipls.ipl());
1041 (void)
new MaxXYX(
"B",b,ipls.ipl());
1042 (void)
new MaxXYX(
"C",c,ipls.ipl());
1044 (void)
new MaxXYY(
"A",a,ipls.ipl());
1045 (void)
new MaxXYY(
"B",b,ipls.ipl());
1046 (void)
new MaxXYY(
"C",c,ipls.ipl());
1048 (void)
new MaxXXX(
"A",a,ipls.ipl());
1049 (void)
new MaxXXX(
"B",b,ipls.ipl());
1050 (void)
new MaxXXX(
"C",c,ipls.ipl());
1052 (void)
new MinNary(ipls.ipl());
1054 (void)
new MaxNary(ipls.ipl());
1059 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
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
Test for argument maximum constraint with shared variables
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
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
void min(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl)
Post propagator for .
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 sqrt(Home home, IntVar x0, IntVar x1, IntPropLevel ipl)
Post propagator for .
Test for binary maximum constraint with shared variables
SqrXX(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
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.
int size(void) const
Return size of array (number of elements)
PowXX(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
MaxXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
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.
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.
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.
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
MinXXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
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$.
NrootXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Floor.
MultXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
bool tiebreak
Whether to use tie-breaking.
virtual bool solution(const Assignment &x) const
Test whether x is solution
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)
void abs(Home home, IntVar x0, IntVar x1, IntPropLevel ipl)
Post propagator for .
MinXYY(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.
SqrtXX(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.
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
int offset
Offset to be used.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for binary minimum constraint
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
const int min
Smallest allowed integer value.
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
MinNaryShared(Gecode::IntPropLevel ipl)
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
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.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint
MultXXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
MinXXX(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.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
ArgMin(int n, int o, bool tb)
Create and register test.
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.
AbsXX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for n-ary maximum constraint with shared variables
Test for binary minimum constraint with shared variables
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel)
Post propagator for .
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 .
Simple propagation levels.
virtual bool solution(const Assignment &x) const
Test whether x is solution
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.
MultXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
Test for bounds(z)-consistency.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for modulo constraint
virtual bool solution(const Assignment &x) const
Test whether x is solution
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
NrootXX(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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MultXYY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Test for multiplication constraint with shared variables
ArgMax(int n, int o, bool tb)
Create and register test.
Test for multiplication constraint with shared variables
Gecode::IntPropLevel ipl
Propagation level.
Passing integer variables.
Passing integer arguments.
void nroot(Home home, IntVar x0, int n, IntVar x1, 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
BoolVar expr(Home home, const BoolExpr &e, IntPropLevel ipl)
Post Boolean expression and return its value.
MaxXXY(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
bool testfix
Whether to perform fixpoint 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
AbsXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
IntPropLevel
Propagation levels for integer propagators.
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.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
bool tiebreak
Whether to use tie-breaking.
Post propagator for SetVar SetOpType SetVar y
SqrXY(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
PowXY(const std::string &s, int n0, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
MinXYZ(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
void max(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl)
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
MaxNary(Gecode::IntPropLevel ipl)
Create and register test.
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
void pow(Home home, IntVar x0, int n, IntVar x1, IntPropLevel ipl)
Post propagator for .
Test for binary maximum constraint with shared variables
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
MinNary(Gecode::IntPropLevel ipl)
Create and register test.
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
Domain propagation Options: basic versus advanced propagation.
Gecode::FloatVal a(-8, 5)
Test for squaring constraint with shared variables
Test for absolute value 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 void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
MaxXYX(const std::string &s, const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Gecode toplevel namespace
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for argument 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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ArgMaxShared(int n, bool tb)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
MinXYX(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 nroot constraint
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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
int offset
Which offset to use.
virtual bool solution(const Assignment &x) const
Test whether x is solution
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.
Iterator for simple integer propagation levels.
Test for n-ary minimmum constraint with shared variables
MaxNaryShared(Gecode::IntPropLevel ipl)
Create and register test.
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.