44namespace Test {
namespace Float {
47 namespace Trigonometric {
57 return eq(sin(
x[0]),
x[1]);
76 return eq(sin(
x[0]),
x[1]);
102 return eq(sin(
x[0]),
x[0]);
118 return eq(cos(
x[0]),
x[1]);
137 return eq(cos(
x[0]),
x[1]);
163 return eq(cos(
x[0]),
x[0]);
179 return eq(tan(
x[0]),
x[1]);
198 return eq(tan(
x[0]),
x[1]);
224 return eq(tan(
x[0]),
x[0]);
240 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
242 return eq(asin(
x[0]),
x[1]);
261 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
263 return eq(asin(
x[0]),
x[1]);
267 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
291 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
293 return eq(asin(
x[0]),
x[0]);
309 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
311 return eq(acos(
x[0]),
x[1]);
330 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
332 return eq(acos(
x[0]),
x[1]);
336 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
360 if ((
x[0].min() > 1.0) || (
x[0].max() < -1.0))
362 return eq(acos(
x[0]),
x[0]);
378 return eq(atan(
x[0]),
x[1]);
397 return eq(atan(
x[0]),
x[1]);
423 return eq(atan(
x[0]),
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.
bool flip(void)
Flip a coin and return true or false randomly.
Gecode::FloatVal dom
Domain of variables.
Test for acosinus 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
ACosXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for acosinus constraint where solution is ensured
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
ACosXYSol(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 acosinus constraint
ACosXY(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 asinus constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
ASinXX(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 asinus constraint where solution is ensured
ASinXYSol(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
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for asinus constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
ASinXY(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 atangent 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
ATanXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for atangent constraint where 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.
ATanXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for atangent constraint
ATanXY(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 cosinus constraint with shared variables
CosXX(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 cosinus constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
CosXYSol(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.
Test for cosinus constraint
CosXY(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 sinus constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SinXX(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 sinus 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.
SinXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for sinus 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.
SinXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for tangent 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
TanXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for tangent constraint where solution is ensured
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
TanXYSol(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 tangent 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.
TanXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
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 sin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void cos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void acos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void asin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
TanXX tan_xx_c("C", c, step)
ACosXYSol acos_xy_sol_c("C", c, step)
CosXYSol cos_xy_sol_a("A", a, step)
ASinXX asin_xx_b("B", b, step)
CosXY cos_xy_a("A", a, step)
ACosXX acos_xx_b("B", b, step)
CosXX cos_xx_a("A", a, step)
CosXYSol cos_xy_sol_b("B", b, step)
ATanXYSol atan_xy_sol_b("B", b, step)
TanXYSol tan_xy_sol_b("B", b, step)
Gecode::FloatVal c(-8, 8)
ACosXY acos_xy_c("C", c, step)
SinXYSol sin_xy_sol_c("C", c, step)
TanXY tan_xy_a("A", a, step)
SinXY sin_xy_c("C", c, step)
ATanXY atan_xy_c("C", c, step)
SinXY sin_xy_a("A", a, step)
ATanXX atan_xx_c("C", c, step)
TanXYSol tan_xy_sol_a("A", a, step)
TanXYSol tan_xy_sol_c("C", c, step)
CosXX cos_xx_b("B", b, step)
ATanXYSol atan_xy_sol_c("C", c, step)
SinXYSol sin_xy_sol_b("B", b, step)
CosXYSol cos_xy_sol_c("C", c, step)
SinXX sin_xx_c("C", c, step)
CosXY cos_xy_b("B", b, step)
Gecode::FloatVal a(-8, 5)
TanXX tan_xx_a("A", a, step)
ACosXYSol acos_xy_sol_b("B", b, step)
SinXY sin_xy_b("B", b, step)
const Gecode::FloatNum step2
ATanXY atan_xy_b("B", b, step)
ASinXX asin_xx_a("A", a, step)
ASinXYSol asin_xy_sol_a("A", a, step)
ACosXY acos_xy_a("A", a, step)
ATanXYSol atan_xy_sol_a("A", a, step)
TanXY tan_xy_c("C", c, step)
CosXX cos_xx_c("C", c, step)
ACosXYSol acos_xy_sol_a("A", a, step)
SinXX sin_xx_a("A", a, step)
TanXY tan_xy_b("B", b, step)
SinXX sin_xx_b("B", b, step)
ASinXY asin_xy_c("C", c, step)
TanXX tan_xx_b("B", b, step)
const Gecode::FloatNum step
ACosXX acos_xx_c("C", c, step)
ASinXX asin_xx_c("C", c, step)
ACosXY acos_xy_b("B", b, step)
ASinXYSol asin_xy_sol_b("B", b, step)
Gecode::FloatVal b(9, 12)
ATanXX atan_xx_b("B", b, step)
ACosXX acos_xx_a("A", a, step)
SinXYSol sin_xy_sol_a("A", a, step)
ASinXY asin_xy_b("B", b, step)
ASinXYSol asin_xy_sol_c("C", c, step)
CosXY cos_xy_c("C", c, step)
ATanXX atan_xx_a("A", a, step)
ASinXY asin_xy_a("A", a, step)
ATanXY atan_xy_a("A", a, step)
MaybeType
Type for comparisons and solutions.