50 if ((x.max() < 0.0) || (x.min() > 0.0))
52 if ((x.min() == 0.0) && (x.max() == 0.0))
63 if ((
x0.max() < 0.0) || (
x0.min() > 0.0))
65 return ((
x0.min() == 0.0) && (
x0.max() == 0.0))
73 typedef gecode_boost::numeric::interval_lib::rounded_arith_std<FloatNum>
75 typedef gecode_boost::numeric::interval_lib::save_state<DirectRoundingBase>
92 if (((n % 2) == 0) && (x.
min() == 0.0)) {
123 while (std::nextafter(l,u) < u) {
125 if (!(m > l) || !(m < u))
126 m = std::nextafter(l,u);
144 template<
class A,
class B>
149 template<
class A,
class B>
158 if ((
x1.min() == 0.0) && (
x1.max() == 0.0)) {
169 else if (
x0.max() <= 0)
190 template<
class A,
class B>
195 template<
class A,
class B>
198 return new (home)
Pow<A,B>(home,*
this);
201 template<
class A,
class B>
206 if ((
x1.min() == 0.0) && (
x1.max() == 0.0)) {
211 if ((
m_n % 2) == 0) {
217 else if (
x0.max() <= 0)
238 template<
class A,
class B>
243 template<
class A,
class B>
256 template<
class A,
class B>
261 template<
class A,
class B>
267 template<
class A,
class B>
Base-class for both propagators and branchers.
friend FloatVal max(const FloatVal &x, const FloatVal &y)
friend FloatVal min(const FloatVal &x, const FloatVal &y)
NonZero(Home home, View x)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &)
Perform propagation.
NonZero(Space &home, NonZero< View > &p)
Constructor for cloning a p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, View x)
Post a non-zero propagator.
NthRoot(Space &home, NthRoot &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
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 ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
Pow(Space &home, Pow &p)
Constructor for cloning p.
Home class for posting propagators
MixBinaryPropagator(Space &home, MixBinaryPropagator &p)
UnaryPropagator(Space &home, UnaryPropagator &p)
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
double FloatNum
Floating point number base type.
FloatNum positive_pow_down(FloatNum x, int n)
Return a downward-rounded positive integer power.
FloatVal positive_nroot(const FloatVal &x, int n)
Return nth root for a non-negative interval.
const FloatNum max
Largest allowed float value.
FloatVal hull(const FloatVal &x, const FloatVal &y)
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
@ ES_NOFIX
Propagation has not computed fixpoint.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .