42 #define I0_PI_2I FloatVal(0,pi_half_upper())
43 #define POS(X) ((I0_PI_2I.in(X))?0:1)
44 #define ATANINF_DOWN r.atan_down(aTanIv.min())
45 #define ATANSUP_UP r.atan_up(aTanIv.max())
49 switch (
POS(iv_min) )
66 switch (
POS(iv_max) )
91 template<
class A,
class B>
99 #define I0_PI_2I FloatVal(0,pi_half_upper())
112 if (r.
tan_down(x0_min) > x0_min) n_min++;
114 }
while (t > x0_min);
118 if (r.
tan_down(x0_max) < x0_max) n_max--;
120 }
while (t > x0_max);
129 if (
x0.min() < 0) n_min--;
130 if (
x0.max() < 0) n_max--;
136 if (n_iv_min > n_iv_max)
return ES_FAILED;
144 template<
class A,
class B>
149 template<
class A,
class B>
153 #define I0_PI_2I FloatVal(0,pi_half_upper())
163 template<
class A,
class B>
168 template<
class A,
class B>
171 return new (home)
Tan<A,B>(home,*
this);
174 template<
class A,
class B>
186 template<
class A,
class B>
191 template<
class A,
class B>
205 template<
class A,
class B>
210 template<
class A,
class B>
216 template<
class A,
class B>
Base-class for both propagators and branchers.
Floating point rounding policy.
FloatNum sub_up(FloatNum x, FloatNum y)
Return upper bound of x minus y (domain: ).
FloatNum add_up(FloatNum x, FloatNum y)
Return upper bound of x plus y (domain: ).
FloatNum tan_down(FloatNum x)
Return lower bound of tangent of x (domain: ).
FloatNum sub_down(FloatNum x, FloatNum y)
Return lower bound of x minus y (domain: ).
FloatNum mul_up(FloatNum x, FloatNum y)
Return upper bound of x times y (domain: ).
FloatNum div_up(FloatNum x, FloatNum y)
Return upper bound of x divided y (domain: ).
FloatNum mul_down(FloatNum x, FloatNum y)
Return lower bound of x times y (domain: ).
FloatNum tan_up(FloatNum x)
Return upper bound of tangent of x (domain: ).
FloatNum add_down(FloatNum x, FloatNum y)
Return lower bound of x plus y (domain: ).
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
ATan(Space &home, ATan &p)
Constructor for cloning p.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
static ExecStatus dopropagate(Space &home, A x0, B x1)
Perform actual propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
Tan(Space &home, Tan &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Home class for posting propagators
MixBinaryPropagator(Space &home, MixBinaryPropagator &p)
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
double FloatNum
Floating point number base type.
Trigonometric propagators
void aTanProject(Rounding &r, const V &aTanIv, FloatNum &iv_min, FloatNum &iv_max, int &n_min, int &n_max)
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
FloatNum pi_upper(void)
Return upper bound of .
FloatNum pi_half_upper(void)
Return upper bound of .
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
#define GECODE_NEVER
Assert that this command is never executed.