61 return eq(x[0] * x[1], x[2]);
80 return eq(x[0] * x[1], x[2]);
106 return eq(x[0] * x[0], x[1]);
122 return eq(x[0] * x[0], x[1]);
148 return eq(x[0] * x[1], x[0]);
164 return eq(x[0] * x[1], x[1]);
180 return eq(x[0] * x[0], x[0]);
196 return eq(x[0] / x[1], x[2]);
215 return eq(x[0] / x[1], x[2]);
241 return eq(x[0] * x[0], x[1]);
260 return eq(x[0] * x[0], x[1]);
286 return eq(x[0] * x[0], x[0]);
306 return eq(sqrt(x[0]), x[1]);
330 return eq(sqrt(x[0]), x[1]);
361 return eq(sqrt(x[0]), x[0]);
379 return eq(pow(x[0],n), x[1]);
399 return eq(pow(x[0],n), x[1]);
426 return eq(pow(x[0],n), x[0]);
443 if ((n == 0) || (x[0].max() < 0.0))
445 return eq(nroot(x[0],n), x[1]);
465 if ((n == 0) || (x[0].max() < 0.0))
467 return eq(nroot(x[0],n), x[1]);
471 if ((n == 0) || (x[0].max() < 0))
496 if ((n == 0) || (x[0].max() < 0))
498 return eq(nroot(x[0],n), x[0]);
514 return eq(abs(x[0]), x[1]);
533 return eq(abs(x[0]), x[0]);
549 return eq(min(x[0],x[1]), x[2]);
568 return eq(min(x[0],x[0]), x[1]);
584 return eq(min(x[0],x[1]), x[0]);
600 return eq(min(x[0],x[1]), x[1]);
616 return eq(min(x[0],x[0]), x[0]);
632 return eq(max(x[0],x[1]), x[2]);
651 return eq(max(x[0],x[0]), x[1]);
667 return eq(max(x[0],x[1]), x[0]);
683 return eq(max(x[0],x[1]), x[1]);
699 return eq(max(x[0],x[0]), x[0]);
715 return eq(min(min(x[0],x[1]),x[2]), x[3]);
720 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
736 return eq(min(min(x[0],x[1]),x[2]), x[1]);
741 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
754 return eq(max(max(x[0],x[1]),x[2]), x[3]);
759 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
775 return eq(max(max(x[0],x[1]),x[2]), x[1]);
780 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
Test for absolute value constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
AbsXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for absolute value constraint
AbsXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for division constraint when solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
DivSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for division constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Div(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for n-ary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxNaryShared(void)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for n-ary maximum constraint
MaxNary(void)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
MaxXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for binary maximum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MaxXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary maximum constraint
MaxXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint with shared variables
MinNaryShared(void)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MinNary(void)
Create and register test.
Test for binary minimum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MinXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
MinXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary minimum constraint with shared variables
MinXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MinXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MinXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MultXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables when solution is ensured
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
MultXXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MultXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MultXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for multiplication constraint with shared variables
MultXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for multiplication constraint when solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
MultXYZSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint
MultXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for nroot constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for nroot constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Test for nroot constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for pow constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
PowXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for pow constraint where solution is ensured
PowXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
PowXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for squaring constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for squaring constraint where solution is ensured
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for squaring constraint
SqrXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for square root constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrtXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for square root constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
SqrtXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for square root constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrtXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Base class for assignments
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
bool flip(void)
Flip a coin and return true or false randomly.
Gecode::FloatVal dom
Domain of variables.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
double FloatNum
Floating point number base type.
@ FRT_GQ
Greater or equal ( )
bool subset(const FloatVal &x, const FloatVal &y)
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
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 mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Tests for arithmetic constraints
AbsXY abs_xy_b("B", b, step)
SqrtXY sqrt_xy_b("B", b, step)
MinXYX min_xyx_b("B", b, step)
MultXYY mult_xyy_b("B", b, step)
AbsXY abs_xy_a("A", a, step)
PowXX pow_xx_b_3("B", b, 0, step)
MaxXYZ max_xyz_b("B", b, step)
MinXYY min_xyy_a("A", a, step)
MultXYY mult_xyy_c("C", c, step)
NRootXX nroot_xx_b_1("B", b, 2, step)
MaxXYZ max_xyz_c("C", c, step)
MinXXY min_xxy_c("C", c, step)
NRootXX nroot_xx_b_2("B", b, 3, step)
DivSol div_sol_a("A", a, step)
SqrtXYSol sqrt_xy_sol_a("A", a, step)
NRootXYSol nroot_xy_sol_c_3("C", c, 0, step)
SqrXYSol sqr_xy_sol_b("B", b, step)
AbsXX abs_xx_c("C", c, step)
PowXX pow_xx_b_2("B", b, 3, step)
PowXYSol pow_xy_sol_b_1("B", b, 2, step)
SqrXY sqr_xy_b("B", b, step)
PowXX pow_xx_c_1("C", c, 2, step)
SqrtXYSol sqrt_xy_sol_c("C", c, step)
Gecode::FloatVal c(-8, 8)
PowXY pow_xy_b_2("B", b, 3, step)
MultXXY mult_xxy_c("C", c, step)
NRootXX nroot_xx_a_2("A", a, 3, step)
PowXYSol pow_xy_sol_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_c_1("C", c, 2, step)
MinXYZ min_xyz_a("A", a, step)
NRootXYSol nroot_xy_sol_b_1("B", b, 2, step)
NRootXY nroot_xy_a_1("A", a, 2, step)
MaxXYX max_xyx_a("A", a, step)
MaxXYY max_xyy_a("A", a, step)
SqrtXX sqrt_xx_b("B", b, step)
SqrXX sqr_xx_c("C", c, step)
MinXYX min_xyx_a("A", a, step)
PowXX pow_xx_a_3("A", a, 0, step)
PowXY pow_xy_c_2("C", c, 3, step)
MultXYZ mult_xyz_b("B", b, step)
NRootXY nroot_xy_b_2("B", b, 3, step)
MultXYX mult_xyx_a("A", a, step)
MultXYZ mult_xyz_c("C", c, step)
MultXYZ mult_xyz_a("A", a, step)
MultXXX mult_xxx_c("C", c, step)
PowXYSol pow_xy_sol_a_1("A", a, 2, step)
MultXYZSol mult_xyz_sol_c("C", c, step)
NRootXY nroot_xy_b_3("B", b, 0, step)
MinXXX min_xxx_b("B", b, step)
MinXXY min_xxy_b("B", b, step)
NRootXY nroot_xy_c_1("C", c, 2, step)
MinXYY min_xyy_b("B", b, step)
MinXYY min_xyy_c("C", c, step)
NRootXX nroot_xx_c_3("C", c, 0, step)
NRootXY nroot_xy_c_2("C", c, 3, step)
MinXYX min_xyx_c("C", c, step)
SqrtXY sqrt_xy_c("C", c, step)
SqrXX sqr_xx_b("B", b, step)
SqrtXY sqrt_xy_a("A", a, step)
MaxXXY max_xxy_b("B", b, step)
PowXY pow_xy_b_3("B", b, 0, step)
NRootXX nroot_xx_a_3("A", a, 0, step)
SqrtXYSol sqrt_xy_sol_b("B", b, step)
Gecode::FloatVal b(9, 12)
MultXYX mult_xyx_b("B", b, step)
MaxXYZ max_xyz_a("A", a, step)
SqrXYSol sqr_xy_sol_a("A", a, step)
PowXYSol pow_xy_sol_b_2("B", b, 3, step)
NRootXYSol nroot_xy_sol_a_2("A", a, 3, step)
SqrXX sqr_xx_a("A", a, step)
PowXYSol pow_xy_sol_c_1("C", c, 2, step)
NRootXYSol nroot_xy_sol_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_c("C", c, step)
MaxXYY max_xyy_b("B", b, step)
PowXY pow_xy_a_1("A", a, 2, step)
SqrtXX sqrt_xx_a("A", a, step)
MaxXXX max_xxx_c("C", c, step)
PowXY pow_xy_a_2("A", a, 3, step)
NRootXYSol nroot_xy_sol_b_2("B", b, 3, step)
Gecode::FloatVal a(-8, 5)
SqrXY sqr_xy_c("C", c, step)
MultXXYSol mult_xxy_sol_b("B", b, step)
DivSol div_sol_c("C", c, step)
PowXX pow_xx_a_2("A", a, 3, step)
DivSol div_sol_b("B", b, step)
PowXY pow_xy_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_a_3("A", a, 0, step)
MaxXYX max_xyx_b("B", b, step)
MaxXXY max_xxy_c("C", c, step)
MaxXXX max_xxx_b("B", b, step)
PowXYSol pow_xy_sol_b_3("B", b, 0, step)
NRootXY nroot_xy_b_1("B", b, 2, step)
PowXYSol pow_xy_sol_a_2("A", a, 3, step)
MultXXY mult_xxy_b("B", b, step)
MinXXX min_xxx_c("C", c, step)
MultXYZSol mult_xyz_sol_b("B", b, step)
PowXY pow_xy_b_1("B", b, 2, step)
AbsXY abs_xy_c("C", c, step)
const Gecode::FloatNum step
MinXYZ min_xyz_b("B", b, step)
MultXYX mult_xyx_c("C", c, step)
MultXXX mult_xxx_a("A", a, step)
MinXYZ min_xyz_c("C", c, step)
NRootXX nroot_xx_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_a("A", a, step)
MaxXYY max_xyy_c("C", c, step)
MinXXX min_xxx_a("A", a, step)
PowXY pow_xy_a_3("A", a, 0, step)
NRootXY nroot_xy_a_2("A", a, 3, step)
PowXX pow_xx_b_1("B", b, 2, step)
MultXXY mult_xxy_a("A", a, step)
AbsXX abs_xx_b("B", b, step)
NRootXYSol nroot_xy_sol_a_1("A", a, 2, step)
PowXX pow_xx_c_2("C", c, 3, step)
MinXXY min_xxy_a("A", a, step)
MultXYZSol mult_xyz_sol_a("A", a, step)
MaxXYX max_xyx_c("C", c, step)
NRootXYSol nroot_xy_sol_c_2("C", c, 3, step)
PowXY pow_xy_c_1("C", c, 2, step)
PowXYSol pow_xy_sol_a_3("A", a, 0, step)
MultXXX mult_xxx_b("B", b, step)
NRootXX nroot_xx_a_1("A", a, 2, step)
SqrXY sqr_xy_a("A", a, step)
SqrXYSol sqr_xy_sol_c("C", c, step)
NRootXX nroot_xx_c_2("C", c, 3, step)
PowXX pow_xx_c_3("C", c, 0, step)
SqrtXX sqrt_xx_c("C", c, step)
PowXYSol pow_xy_sol_c_2("C", c, 3, step)
NRootXX nroot_xx_c_1("C", c, 2, step)
MaxXXY max_xxy_a("A", a, step)
AbsXX abs_xx_a("A", a, step)
MultXYY mult_xyy_a("A", a, step)
PowXX pow_xx_a_1("A", a, 2, step)
NRootXY nroot_xy_c_3("C", c, 0, step)
MaxXXX max_xxx_a("A", a, step)
NRootXY nroot_xy_a_3("A", a, 0, step)
MaybeType
Type for comparisons and solutions.