38 namespace Gecode {
namespace Float {
namespace Trigonometric {
46 #define I0__PI_2I FloatVal(0,pi_half_upper())
47 #define POS(X) ((I0__PI_2I.in(X))?0:1)
48 #define ATANINF_DOWN r.atan_down(aTanIv.min())
49 #define ATANSUP_UP r.atan_up(aTanIv.max())
53 switch (
POS(iv_min) )
70 switch (
POS(iv_max) )
95 template<
class A,
class B>
100 template<
class A,
class B>
104 #define I0__PI_2I FloatVal(0,pi_half_upper())
110 (void)
new (home)
Tan<A,B>(home,x0,x1);
114 template<
class A,
class B>
119 template<
class A,
class B>
122 return new (home)
Tan<A,B>(home,share,*
this);
125 template<
class A,
class B>
133 #define I0__PI_2I FloatVal(0,pi_half_upper())
146 if (r.
tan_down(x0_min) > x0_min) n_min++;
148 }
while (t > x0_min);
152 if (r.
tan_down(x0_max) < x0_max) n_max--;
154 }
while (t > x0_max);
163 if (x0.min() < 0) n_min--;
164 if (x0.max() < 0) n_max--;
170 if (n_iv_min > n_iv_max)
return ES_FAILED;
183 template<
class A,
class B>
188 template<
class A,
class B>
200 template<
class A,
class B>
205 template<
class A,
class B>
208 return new (home)
ATan<A,B>(home,share,*
this);
211 template<
class A,
class B>
FloatNum pi_half_upper(void)
Return upper bound of .
void aTanProject(Rounding &r, const V &aTanIv, FloatNum &iv_min, FloatNum &iv_max, int &n_min, int &n_max)
FloatNum add_down(FloatNum x, FloatNum y)
Return lower bound of x plus 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: )
Tan(Space &home, bool share, Tan &p)
Constructor for cloning p.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
ExecStatus ES_SUBSUMED(Propagator &p)
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Propagator for bounds consistent arc tangent operator
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
Propagator for bounds consistent tangent operator
int p
Number of positive literals for node type.
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
Execution has resulted in failure.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Floating point rounding policy.
FloatNum tan_up(FloatNum x)
Return upper bound of tangent of x (domain: )
ATan(Space &home, bool share, ATan &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
FloatNum sub_down(FloatNum x, FloatNum y)
Return lower bound of x minus y (domain: )
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
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: )
Gecode toplevel namespace
FloatNum mul_up(FloatNum x, FloatNum y)
Return upper bound of x times y (domain: )
int ModEventDelta
Modification event deltas.
Home class for posting propagators
double FloatNum
Floating point number base type.
#define GECODE_NEVER
Assert that this command is never executed.
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatNum tan_down(FloatNum x)
Return lower bound of tangent of x (domain: )
FloatNum pi_upper(void)
Return upper bound of .