38 namespace Gecode {
namespace Float {
namespace Arithmetic {
46 template<
class A,
class B>
51 template<
class A,
class B>
55 if ((x0.min() == 0.0) && (x0.max() == 0.0))
return ES_FAILED;
61 if ((x1.min() == 0.0) && (x1.max() == 0.0)) {
70 else if (x0.max() <= 0)
82 if (!x0.assigned()) (
void)
new (home)
Pow<A,B>(home,x0,x1,n);
86 template<
class A,
class B>
91 template<
class A,
class B>
94 return new (home)
Pow<A,B>(home,share,*
this);
97 template<
class A,
class B>
100 if ((x0.min() == 0.0) && (x0.max() == 0.0))
return ES_FAILED;
103 if ((x1.min() == 0.0) && (x1.max() == 0.0)) {
112 else if (x0.max() <= 0)
117 nroot(x1.domain(),m_n),
118 -
nroot(x1.domain(),m_n)
131 template<
class A,
class B>
136 template<
class A,
class B>
145 template<
class A,
class B>
150 template<
class A,
class B>
156 template<
class A,
class B>
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus ES_SUBSUMED(Propagator &p)
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
FloatVal hull(const FloatVal &x, const FloatVal &y)
Pow(Space &home, bool share, Pow &p)
Constructor for cloning p.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
NthRoot(Space &home, bool share, NthRoot &p)
Constructor for cloning p.
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Propagator for bounds consistent pow operator
Execution has resulted in failure.
static ExecStatus post(Home home, A x0, B x1, int n)
Post propagator for .
static ExecStatus post(Home home, A x0, B x1, int n)
Post propagator for .
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Propagator for bounds consistent nth root operator