Go to the documentation of this file.
43 #ifdef GECODE_HAS_MPFR
48 namespace Test {
namespace Float {
51 namespace Transcendental {
122 if (
x[0].
max() < 0.0)
143 if (
x[0].
max() < 0.0)
149 if (
x[0].
max() < 0.0)
return false;
172 if (
x[0].
max() < 0.0)
191 if ((
x[0].
max() <= 0.0) || (base <= 0.0))
210 if ((
x[0].
max() <= 0.0) || (base <= 0.0))
216 if ((
x[0].
max() <= 0.0) || (base <= 0.0))
241 if ((
x[0].
max() <= 0.0) || (base <= 0.0))
285 if (base <= 0.0)
return false;
309 if ((
x[0].
max() <= 0.0) || (base <= 0.0))
ExpXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
PowXYSol pow_xy_sol_c_3("C", c, 0, step)
ExpXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
PowXX pow_xx_c_3("C", c, 0, step)
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
void log(Home home, FloatNum base, FloatVar x0, FloatVar x1)
Post propagator for .
Gecode::FloatVal dom
Domain of variables.
Test for logarithm constraint
LogNXY logn_xy_b_1("B", b,-1.5, step)
LogNXY logn_xy_c_3("C", c, 0, step)
LogNXY logn_xy_b_2("B", b, 1.5, step)
LogXX log_xx_a("A", a, step)
PowXYSol pow_xy_sol_b_3("B", b, 0, step)
ExpXX exp_xx_c("C", c, step)
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
PowXY pow_xy_a_3("A", a, 0, step)
LogNXYSol logn_xy_sol_a_2("A", a, 1.5, step)
LogXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
PowXY pow_xy_b_1("B", b,-1.5, step)
PowXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
PowXX pow_xx_a_3("A", a, 0, step)
ExpXY exp_xy_b("B", b, step)
Test for exponent constraint where solution is ensured
PowXYSol pow_xy_sol_c_1("C", c,-1.5, step)
PowXY pow_xy_a_2("A", a, 1.5, step)
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
ExpXY exp_xy_a("A", a, step)
PowXYSol pow_xy_sol_b_1("B", b,-1.5, step)
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
LogNXYSol logn_xy_sol_b_3("B", b, 0, step)
LogNXYSol logn_xy_sol_b_2("B", b, 1.5, step)
Gecode::FloatVal c(-8, 8)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
LogNXX logn_xx_a_3("A", a, 0, step)
PowXY pow_xy_b_2("B", b, 1.5, step)
LogNXYSol logn_xy_sol_a_3("A", a, 0, step)
PowXX pow_xx_b_2("B", b, 1.5, step)
Gecode::FloatVal a(-8, 5)
LogNXX logn_xx_a_2("A", a, 1.5, step)
Test for exponent constraint with shared variables
PowXY pow_xy_b_3("B", b, 0, step)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
LogNXYSol logn_xy_sol_c_3("C", c, 0, step)
PowXX pow_xx_c_1("C", c,-1.5, step)
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.
PowXYSol pow_xy_sol_b_2("B", b, 1.5, step)
LogNXYSol logn_xy_sol_a_1("A", a,-1.5, step)
Test for logarithm base n constraint where solution is ensured
LogNXX logn_xx_b_2("B", b, 1.5, step)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
LogXX log_xx_c("C", c, step)
ExpXX exp_xx_a("A", a, step)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
PowXX pow_xx_b_1("B", b,-1.5, step)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
LogNXX logn_xx_c_2("C", c, 1.5, step)
Test for pow exponent n constraint with shared variables
Test for pow exponent n constraint where solution is ensured
ExpXY exp_xy_c("C", c, step)
Node * x
Pointer to corresponding Boolean expression node.
LogNXY logn_xy_c_1("C", c,-1.5, step)
LogNXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
ExpXYSol exp_xy_sol_c("C", c, step)
LogXY(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 MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
bool flip(void)
Flip a coin and return true or false randomly.
const Gecode::FloatNum step2
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
double FloatNum
Floating point number base type.
LogXY log_xy_c("C", c, step)
bool subset(const FloatVal &x, const FloatVal &y)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
ExpXYSol exp_xy_sol_a("A", a, step)
LogXYSol log_xy_sol_b("B", b, step)
PowXY pow_xy_c_2("C", c, 1.5, step)
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 logarithm constraint where solution is ensured
LogNXY logn_xy_b_3("B", b, 0, step)
LogXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
PowXY pow_xy_c_1("C", c,-1.5, step)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for exponent constraint
Test for logarithm base n constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
PowXYSol pow_xy_sol_c_2("C", c, 1.5, step)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
ExpXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for logarithm constraint with shared variables
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
PowXX pow_xx_b_3("B", b, 0, step)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
PowXYSol pow_xy_sol_a_3("A", a, 0, step)
LogNXYSol logn_xy_sol_c_2("C", c, 1.5, step)
LogNXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
Test for pow exponent n constraint
PowXYSol pow_xy_sol_a_2("A", a, 1.5, step)
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.
MaybeType
Type for comparisons and solutions.
ExpXYSol exp_xy_sol_b("B", b, step)
PowXY pow_xy_a_1("A", a,-1.5, step)
PowXX pow_xx_c_2("C", c, 1.5, step)
LogNXYSol logn_xy_sol_b_1("B", b,-1.5, step)
ExpXX exp_xx_b("B", b, step)
LogNXX logn_xx_c_1("C", c,-1.5, step)
LogXYSol log_xy_sol_c("C", c, step)
Base class for assignments
PowXY pow_xy_c_3("C", c, 0, step)
PowXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
LogNXY logn_xy_a_2("A", a, 1.5, step)
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Gecode::FloatVal b(9, 12)
LogNXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum _base, Gecode::FloatNum st)
Create and register test.
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
const Gecode::FloatNum step
PowXX pow_xx_a_1("A", a,-1.5, step)
LogXX log_xx_b("B", b, step)
LogXY log_xy_a("A", a, step)
LogNXY logn_xy_a_3("A", a, 0, step)
LogXY log_xy_b("B", b, step)
LogNXX logn_xx_c_3("C", c, 0, step)
LogNXY logn_xy_a_1("A", a,-1.5, step)
LogNXYSol logn_xy_sol_c_1("C", c,-1.5, step)
LogNXX logn_xx_a_1("A", a,-1.5, step)
const FloatNum max
Largest allowed float value.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
LogNXX logn_xx_b_3("B", b, 0, step)
LogNXY logn_xy_c_2("C", c, 1.5, step)
LogXYSol log_xy_sol_a("A", a, step)
PowXYSol pow_xy_sol_a_1("A", a,-1.5, step)
Test for logarithm base n constraint with shared variables
PowXX pow_xx_a_2("A", a, 1.5, step)
LogNXX logn_xx_b_1("B", b,-1.5, step)