65 x = v.
x;
return *
this;
83 return gecode_boost::numeric::width(
x);
87 return gecode_boost::numeric::median(
x);
93 (nextafter(
x.lower(),
x.upper()) ==
x.upper()));
101 return gecode_boost::numeric::in(n,
x);
105 return gecode_boost::numeric::zero_in(
x);
114 FloatVal p(gecode_boost::numeric::interval_lib::pi_half<FloatValImpType>());
119 FloatVal p(gecode_boost::numeric::interval_lib::pi<FloatValImpType>());
124 FloatVal p(gecode_boost::numeric::interval_lib::pi_twice<FloatValImpType>());
130 x +=
n;
return *
this;
134 x -=
n;
return *
this;
138 x *=
n;
return *
this;
142 x /=
n;
return *
this;
147 x += v.
x;
return *
this;
151 x -= v.
x;
return *
this;
155 x *= v.
x;
return *
this;
159 x /= v.
x;
return *
this;
233 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
241 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
250 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
258 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
267 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
275 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
284 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
292 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
301 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
307 if (!gecode_boost::numeric::interval_lib::checking_strict<FloatNum>
308 ::is_empty(x.
x.lower(), x.
x.upper())) {
309 if ((x.
x.lower() ==
y) && (x.
x.upper() ==
y))
312 if (((x.
x.lower() ==
y) &&
313 (nextafter(x.
x.lower(),x.
x.upper()) == x.
x.upper())) ||
314 ((x.
x.upper() ==
y) &&
315 (nextafter(x.
x.upper(),x.
x.lower()) == x.
x.lower())))
324 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
332 }
catch (gecode_boost::numeric::interval_lib::comparison_error&) {
362 template<
class Char,
class Traits>
363 std::basic_ostream<Char,Traits>&
364 operator <<(std::basic_ostream<Char,Traits>& os,
const FloatVal&
x) {
414 #ifdef GECODE_HAS_MPFR 491 namespace Gecode {
namespace Float {
SetExpr singleton(const LinIntExpr &e)
Singleton expression.
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
friend bool operator>(const FloatVal &x, const FloatVal &y)
friend FloatVal cosh(const FloatVal &x)
friend FloatVal exp(const FloatVal &x)
FloatVal & operator/=(const FloatNum &n)
Divide by n.
bool subset(const FloatVal &x, const FloatVal &y)
Test whether x is a subset of y.
friend FloatVal sqr(const FloatVal &x)
bool singleton(void) const
Test whether float is a singleton.
friend FloatVal sinh(const FloatVal &x)
bool zero_in(void) const
Test whether zero is included.
friend FloatVal fmod(const FloatVal &x, const FloatVal &y)
FloatVal & operator-=(const FloatNum &n)
Subtract by n.
static FloatVal pi_twice(void)
Return .
friend FloatVal acos(const FloatVal &x)
friend FloatVal asin(const FloatVal &x)
gecode_boost::numeric::interval< FloatNum, gecode_boost::numeric::interval_lib::policies< R, P > > FloatValImpType
Implementation type for float value.
bool in(FloatNum n) const
Test whether n is included.
FloatVal(void)
Default constructor.
friend bool operator<=(const FloatVal &x, const FloatVal &y)
static FloatVal hull(FloatNum x, FloatNum y)
Return hull of x and y.
FloatValImpType x
Implementation of float value.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
FloatVal & operator*=(const FloatNum &n)
Multiply by n.
friend bool operator==(const FloatVal &x, const FloatVal &y)
friend FloatVal cos(const FloatVal &x)
bool tight(void) const
Test whether float is tight.
friend FloatVal nroot(const FloatVal &x, int n)
friend FloatVal operator*(const FloatVal &x, const FloatVal &y)
FloatNum med(void) const
Return median of float value.
static FloatVal pi(void)
Return lower bound of .
FloatVal & operator=(const FloatNum &n)
Assignment operator.
friend FloatVal atanh(const FloatVal &x)
friend FloatVal tanh(const FloatVal &x)
FloatVal & operator+=(const FloatNum &n)
Increment by n.
friend FloatVal asinh(const FloatVal &x)
Post propagator for SetVar SetOpType SetVar y
friend FloatVal abs(const FloatVal &x)
bool proper_subset(const FloatVal &x, const FloatVal &y)
Test whether x is a proper subset of y.
FloatNum max(void) const
Return upper bound.
bool overlap(const FloatVal &x, const FloatVal &y)
Test whether x and y overlap.
static FloatVal pi_half(void)
Return .
friend FloatVal tan(const FloatVal &x)
friend FloatVal operator+(const FloatVal &x)
FloatNum min(void) const
Return lower bound.
friend FloatVal acosh(const FloatVal &x)
friend bool operator<(const FloatVal &x, const FloatVal &y)
friend FloatVal pow(const FloatVal &x, int n)
friend FloatVal sqrt(const FloatVal &x)
void assign(FloatNum const &l, FloatNum const &u)
Assign lower bound l and upper bound u.
friend FloatVal operator/(const FloatVal &x, const FloatVal &y)
friend bool operator!=(const FloatVal &x, const FloatVal &y)
FloatVal intersect(const FloatVal &x, const FloatVal &y)
Return intersection of x and y.
Gecode toplevel namespace
friend FloatVal log(const FloatVal &x)
FloatNum size(void) const
Return size of float value (distance between maximum and minimum)
friend FloatVal sin(const FloatVal &x)
friend FloatVal atan(const FloatVal &x)
friend FloatVal max(const FloatVal &x, const FloatVal &y)
friend FloatVal min(const FloatVal &x, const FloatVal &y)
double FloatNum
Floating point number base type.
friend FloatVal operator-(const FloatVal &x)
friend bool operator>=(const FloatVal &x, const FloatVal &y)