34 namespace Gecode {
namespace Float {
namespace Trigonometric {
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>
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: )
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator for bounds consistent arc tangent operator
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Propagator for bounds consistent tangent operator
int p
Number of positive literals for node type.
Execution has resulted in failure.
virtual Actor * copy(Space &home)
Create copy during cloning.
static ExecStatus dopropagate(Space &home, A x0, B x1)
Perform actual propagation.
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: )
Post propagator for SetVar SetOpType SetVar SetRelType r
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 .
Tan(Space &home, Tan &p)
Constructor for cloning p.
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: )
ATan(Space &home, ATan &p)
Constructor for cloning p.
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.
virtual Actor * copy(Space &home)
Create copy during cloning.
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 .