36namespace Gecode {
namespace Float {
namespace Arithmetic {
42 return x.min() >= 0.0;
48 return x.max() <= 0.0;
54 return (
x.min() <= 0.0) && (
x.max() >= 0.0);
136 template<
class VA,
class VB,
class VC>
142 template<
class VA,
class VB,
class VC>
148 template<
class VA,
class VB,
class VC>
154 template<
class VA,
class VB,
class VC>
162 if (x0.assigned() && x1.assigned() && x2.assigned())
167 template<
class VA,
class VB,
class VC>
204 if (
pos(x1) ||
pos(x2))
goto rewrite_ppp;
205 if (
neg(x1) ||
neg(x2))
goto rewrite_pnn;
209 if (
neg(x1) ||
pos(x2))
goto rewrite_nnp;
210 if (
pos(x1) ||
neg(x2))
goto rewrite_npn;
214 if (
pos(x2))
goto rewrite_ppp;
215 if (
neg(x2))
goto rewrite_npn;
219 if (
pos(x2))
goto rewrite_nnp;
220 if (
neg(x2))
goto rewrite_pnn;
224 assert(
any(x0) &&
any(x1));
226 r.mul_up(x0.min(),x1.min()))));
228 r.mul_down(x0.max(),x1.min()))));
231 if (
r.div_up(x2.min(),x1.min()) < x0.min())
233 if (
r.div_up(x2.min(),x0.min()) < x1.min())
237 if (
r.div_up(x2.max(),x1.max()) < x0.min())
239 if (
r.div_up(x2.max(),x0.max()) < x1.min())
244 assert((x0.val() == 0.0) && (x2.val() == 0.0));
249 assert((x1.val() == 0.0) && (x2.val() == 0.0));
263 if (
pos(x2))
goto rewrite_ppp;
264 if (
neg(x2))
goto rewrite_pnn;
269 if (x0.assigned() && x1.assigned()) {
284 if (
pos(x2))
goto rewrite_nnp;
285 if (
neg(x2))
goto rewrite_npn;
287 if (x0.max() != 0.0) {
292 if (x0.assigned() && x1.assigned()) {
301 ::post(home(*
this),x0,x1,x2)));
322 if (
pos(x1) ||
pos(x2))
goto post_ppp;
323 if (
neg(x1) ||
neg(x2))
goto post_pnn;
324 }
else if (
neg(x0)) {
325 if (
neg(x1) ||
pos(x2))
goto post_nnp;
326 if (
pos(x1) ||
neg(x2))
goto post_npn;
327 }
else if (
pos(x1)) {
328 if (
pos(x2))
goto post_ppp;
329 if (
neg(x2))
goto post_npn;
330 }
else if (
neg(x1)) {
331 if (
pos(x2))
goto post_nnp;
332 if (
neg(x2))
goto post_pnn;
int p
Number of positive literals for node type.
bool neg
Is atomic formula negative.
Base-class for both propagators and branchers.
Bounds consistent positive multiplication propagator.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
MultPlus(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
Bounds or domain consistent propagator for .
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
MultZeroOne(Space &home, MultZeroOne< View > &p)
Constructor for cloning p.
Bounds consistent multiplication propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Mult(Space &home, Mult< View > &p)
Constructor for cloning p.
static ExecStatus post(Home home, View x0, View x1)
Post propagator for .
Floating point rounding policy.
Home class for posting propagators
Mixed ternary propagator.
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
bool any(const View &x)
Test whether x is neither positive nor negative.
bool pos(const View &x)
Test whether x is postive.
@ RT_TRUE
Relation does hold.
@ RT_FALSE
Relation does not hold.
@ RT_MAYBE
Relation may hold or not.
RelTest rtest_eq(View x, View y)
Test whether views x and y are equal.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
Post propagator for SetVar x
#define GECODE_NEVER
Assert that this command is never executed.