40 namespace Gecode {
namespace Float {
namespace Arithmetic {
46 return x.min() >= 0.0;
52 return x.max() <= 0.0;
58 return (x.min() <= 0.0) && (x.max() >= 0.0);
140 template<
class VA,
class VB,
class VC>
146 template<
class VA,
class VB,
class VC>
152 template<
class VA,
class VB,
class VC>
158 template<
class VA,
class VB,
class VC>
166 if (
x0.assigned() &&
x1.assigned() &&
x2.assigned())
171 template<
class VA,
class VB,
class VC>
218 if (
pos(
x2))
goto rewrite_ppp;
219 if (
neg(
x2))
goto rewrite_npn;
223 if (
pos(
x2))
goto rewrite_nnp;
224 if (
neg(
x2))
goto rewrite_pnn;
248 assert((
x0.val() == 0.0) && (
x2.val() == 0.0));
253 assert((
x1.val() == 0.0) && (
x2.val() == 0.0));
267 if (
pos(
x2))
goto rewrite_ppp;
268 if (
neg(
x2))
goto rewrite_pnn;
273 if (
x0.assigned() &&
x1.assigned()) {
288 if (
pos(
x2))
goto rewrite_nnp;
289 if (
neg(
x2))
goto rewrite_npn;
291 if (
x0.max() != 0.0) {
296 if (
x0.assigned() &&
x1.assigned()) {
326 if (
pos(x1) ||
pos(x2))
goto post_ppp;
327 if (
neg(x1) ||
neg(x2))
goto post_pnn;
328 }
else if (
neg(x0)) {
329 if (
neg(x1) ||
pos(x2))
goto post_nnp;
330 if (
pos(x1) ||
neg(x2))
goto post_npn;
331 }
else if (
pos(x1)) {
332 if (
pos(x2))
goto post_ppp;
333 if (
neg(x2))
goto post_npn;
334 }
else if (
neg(x1)) {
335 if (
pos(x2))
goto post_nnp;
336 if (
neg(x2))
goto post_pnn;
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
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: )
MultZeroOne(Space &home, MultZeroOne< View > &p)
Constructor for cloning p.
ExecStatus ES_SUBSUMED(Propagator &p)
const FloatNum max
Largest allowed float value.
bool neg(const View &x)
Test whether x is negative.
bool any(const View &x)
Test whether x is neither positive nor negative.
bool pos(const View &x)
Test whether x is postive.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
MultPlus(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
Bounds consistent positive multiplication propagator.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
static ExecStatus post(Home home, View x0, View x1)
Post propagator for .
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
int p
Number of positive literals for node type.
const FloatNum min
Smallest allowed float value.
Mixed ternary propagator.
Bounds or domain consistent propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Bounds consistent multiplication propagator.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Floating point rounding policy.
Mult(Space &home, Mult< View > &p)
Constructor for cloning p.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
Post propagator for SetVar SetOpType SetVar SetRelType r
RelTest rtest_eq(View x, View y)
Test whether views x and y are equal.
FloatNum div_down(FloatNum x, FloatNum y)
Return lower bound of x divided by y (domain: )
Post propagator for SetVar x
Propagation has not computed fixpoint.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Gecode toplevel namespace
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Relation may hold or not.
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
#define GECODE_NEVER
Assert that this command is never executed.
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.