44namespace Test {
namespace Float {
47 namespace Transcendental {
57 return eq(exp(
x[0]),
x[1]);
76 return eq(exp(
x[0]),
x[1]);
102 return eq(exp(
x[0]),
x[0]);
118 if (
x[0].max() < 0.0)
120 return eq(log(
x[0]),
x[1]);
139 if (
x[0].max() < 0.0)
141 return eq(log(
x[0]),
x[1]);
145 if (
x[0].max() < 0.0)
return false;
168 if (
x[0].max() < 0.0)
170 return eq(log(
x[0]),
x[0]);
187 if ((
x[0].max() <= 0.0) || (base <= 0.0))
189 return eq(log(
x[0]) / log(base),
x[1]);
206 if ((
x[0].max() <= 0.0) || (base <= 0.0))
208 return eq(log(
x[0]) / log(base),
x[1]);
212 if ((
x[0].max() <= 0.0) || (base <= 0.0))
237 if ((
x[0].max() <= 0.0) || (base <= 0.0))
239 return eq(log(
x[0]) / log(base),
x[0]);
258 return eq(exp(
x[0] * log(base)),
x[1]);
277 return eq(exp(
x[0] * log(base)),
x[1]);
281 if (base <= 0.0)
return false;
305 if ((
x[0].max() <= 0.0) || (base <= 0.0))
307 return eq(exp(
x[0] * log(base)),
x[0]);
Node * x
Pointer to corresponding Boolean expression node.
Base class for assignments
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
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.
Test for exponent 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
ExpXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for exponent constraint where solution is ensured
ExpXYSol(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 bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for exponent 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.
ExpXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for logarithm base n constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
LogNXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for logarithm base n constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
LogNXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for logarithm base n constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
LogNXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for logarithm constraint with shared variables
LogXX(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 logarithm 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.
LogXYSol(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 logarithm 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.
LogXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for pow exponent n constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
PowXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for pow exponent n constraint where solution is ensured
PowXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, 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
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for pow exponent n constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
PowXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
double FloatNum
Floating point number base type.
bool subset(const FloatVal &x, const FloatVal &y)
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
LogNXYSol logn_xy_sol_b_1("B", b,-1.5, step)
LogNXYSol logn_xy_sol_c_1("C", c,-1.5, step)
PowXX pow_xx_b_3("B", b, 0, step)
LogNXX logn_xx_b_1("B", b,-1.5, step)
ExpXYSol exp_xy_sol_a("A", a, step)
LogNXY logn_xy_a_2("A", a, 1.5, step)
LogXY log_xy_c("C", c, step)
ExpXY exp_xy_b("B", b, step)
PowXY pow_xy_a_2("A", a, 1.5, step)
PowXX pow_xx_b_2("B", b, 1.5, step)
LogNXYSol logn_xy_sol_b_3("B", b, 0, step)
LogXYSol log_xy_sol_c("C", c, step)
PowXX pow_xx_c_2("C", c, 1.5, step)
PowXYSol pow_xy_sol_a_1("A", a,-1.5, step)
ExpXYSol exp_xy_sol_c("C", c, step)
LogNXY logn_xy_b_3("B", b, 0, step)
PowXY pow_xy_a_1("A", a,-1.5, step)
LogNXY logn_xy_a_3("A", a, 0, step)
ExpXX exp_xx_c("C", c, step)
ExpXX exp_xx_b("B", b, step)
LogXY log_xy_b("B", b, step)
LogNXYSol logn_xy_sol_a_3("A", a, 0, step)
PowXY pow_xy_b_3("B", b, 0, step)
LogNXX logn_xx_a_2("A", a, 1.5, step)
LogXYSol log_xy_sol_a("A", a, step)
ExpXX exp_xx_a("A", a, step)
LogNXYSol logn_xy_sol_b_2("B", b, 1.5, step)
LogNXY logn_xy_c_1("C", c,-1.5, step)
PowXYSol pow_xy_sol_c_1("C", c,-1.5, step)
PowXYSol pow_xy_sol_c_2("C", c, 1.5, step)
LogNXY logn_xy_b_2("B", b, 1.5, step)
LogNXY logn_xy_c_3("C", c, 0, step)
PowXY pow_xy_b_1("B", b,-1.5, step)
LogNXY logn_xy_b_1("B", b,-1.5, step)
PowXYSol pow_xy_sol_c_3("C", c, 0, step)
PowXYSol pow_xy_sol_b_2("B", b, 1.5, step)
LogNXX logn_xx_c_1("C", c,-1.5, step)
PowXY pow_xy_c_3("C", c, 0, step)
ExpXYSol exp_xy_sol_b("B", b, step)
LogXX log_xx_b("B", b, step)
PowXX pow_xx_c_1("C", c,-1.5, step)
LogNXX logn_xx_c_2("C", c, 1.5, step)
LogNXYSol logn_xy_sol_a_1("A", a,-1.5, step)
LogNXYSol logn_xy_sol_a_2("A", a, 1.5, step)
LogNXYSol logn_xy_sol_c_2("C", c, 1.5, step)
PowXX pow_xx_b_1("B", b,-1.5, step)
PowXYSol pow_xy_sol_a_2("A", a, 1.5, step)
LogNXX logn_xx_b_2("B", b, 1.5, step)
LogNXY logn_xy_c_2("C", c, 1.5, step)
LogNXYSol logn_xy_sol_c_3("C", c, 0, step)
LogNXX logn_xx_c_3("C", c, 0, step)
PowXX pow_xx_a_2("A", a, 1.5, step)
LogNXX logn_xx_a_1("A", a,-1.5, step)
ExpXY exp_xy_c("C", c, step)
PowXY pow_xy_b_2("B", b, 1.5, step)
PowXYSol pow_xy_sol_a_3("A", a, 0, step)
LogNXX logn_xx_a_3("A", a, 0, step)
PowXYSol pow_xy_sol_b_3("B", b, 0, step)
Gecode::FloatVal c(-8, 8)
PowXX pow_xx_a_1("A", a,-1.5, step)
LogNXY logn_xy_a_1("A", a,-1.5, step)
Gecode::FloatVal a(-8, 5)
PowXX pow_xx_c_3("C", c, 0, step)
PowXY pow_xy_c_2("C", c, 1.5, step)
LogNXX logn_xx_b_3("B", b, 0, step)
Gecode::FloatVal b(9, 12)
const Gecode::FloatNum step2
LogXYSol log_xy_sol_b("B", b, step)
LogXX log_xx_c("C", c, step)
PowXY pow_xy_c_1("C", c,-1.5, step)
PowXYSol pow_xy_sol_b_1("B", b,-1.5, step)
const Gecode::FloatNum step
ExpXY exp_xy_a("A", a, step)
LogXX log_xx_a("A", a, step)
PowXY pow_xy_a_3("A", a, 0, step)
LogXY log_xy_a("A", a, step)
PowXX pow_xx_a_3("A", a, 0, step)
MaybeType
Type for comparisons and solutions.