42 namespace Gecode {
namespace Float {
namespace Arithmetic {
48 template<
class VA,
class VB>
53 template<
class VA,
class VB>
68 template<
class VA,
class VB>
73 template<
class VA,
class VB>
79 template<
class VA,
class VB>
90 if (x0.assigned() || x1.assigned())
return home.
ES_SUBSUMED(*
this);
135 return new (home)
Sqr<View>(home,share,*
this);
141 assert(x1.min() >= 0);
151 if (x0.min() > -r.sqrt_up(x1.min()))
153 else if (x0.max() < r.sqrt_down(x1.min()))
167 template<
class A,
class B>
172 template<
class A,
class B>
188 template<
class A,
class B>
193 template<
class A,
class B>
196 return new (home)
Sqrt<A,B>(home,share,*
this);
199 template<
class A,
class B>
210 if (x0.assigned() || x1.assigned())
return home.
ES_SUBSUMED(*
this);
221 template<
class A,
class B>
226 template<
class A,
class B>
229 (void)
new (home)
Abs<A,B>(home,x0,x1);
233 template<
class A,
class B>
238 template<
class A,
class B>
241 return new (home)
Abs<A,B>(home,share,*
this);
244 template<
class A,
class B>
250 else if (x0.max() <= 0)
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
ExecStatus ES_SUBSUMED(Propagator &p)
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Sqrt(Space &home, bool share, Sqrt &p)
Constructor for cloning p.
FloatVal hull(const FloatVal &x, const FloatVal &y)
Propagation has computed fixpoint.
Sqr(Space &home, bool share, Sqr &p)
Constructor for cloning p.
Base-class for both propagators and branchers.
static ExecStatus post(Home home, View x0, View x1)
Post propagator for .
static ExecStatus post(Home home, VA x0, VB x1)
Post propagator .
int p
Number of positive literals for node type.
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
Bounds consistent positive square propagator.
Propagator for bounds consistent square operator
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Execution has resulted in failure.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Propagator for bounds consistent square root operator
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Propagator for bounds consistent absolute operator
Abs(Space &home, bool share, Abs &p)
Constructor for cloning p.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Floating point rounding policy.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Propagation has not computed fixpoint.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Home class for posting propagators
SqrPlus(Home home, VA x0, VB x1)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.