61 x = v.
x;
return *
this;
79 return boost::numeric::width(
x);
83 return boost::numeric::median(
x);
89 (nextafter(
x.lower(),
x.upper()) ==
x.upper()));
97 return boost::numeric::in(n,
x);
101 return boost::numeric::zero_in(
x);
110 FloatVal p(boost::numeric::interval_lib::pi_half<FloatValImpType>());
115 FloatVal p(boost::numeric::interval_lib::pi<FloatValImpType>());
120 FloatVal p(boost::numeric::interval_lib::pi_twice<FloatValImpType>());
126 x +=
n;
return *
this;
130 x -=
n;
return *
this;
134 x *=
n;
return *
this;
138 x /=
n;
return *
this;
143 x += v.
x;
return *
this;
147 x -= v.
x;
return *
this;
151 x *= v.
x;
return *
this;
155 x /= v.
x;
return *
this;
229 }
catch (boost::numeric::interval_lib::comparison_error&) {
237 }
catch (boost::numeric::interval_lib::comparison_error&) {
246 }
catch (boost::numeric::interval_lib::comparison_error&) {
254 }
catch (boost::numeric::interval_lib::comparison_error&) {
263 }
catch (boost::numeric::interval_lib::comparison_error&) {
271 }
catch (boost::numeric::interval_lib::comparison_error&) {
280 }
catch (boost::numeric::interval_lib::comparison_error&) {
288 }
catch (boost::numeric::interval_lib::comparison_error&) {
297 }
catch (boost::numeric::interval_lib::comparison_error&) {
303 if (!boost::numeric::interval_lib::checking_strict<FloatNum>
304 ::is_empty(x.
x.lower(), x.
x.upper())) {
305 if ((x.
x.lower() ==
y) && (x.
x.upper() ==
y))
308 if (((x.
x.lower() ==
y) &&
309 (nextafter(x.
x.lower(),x.
x.upper()) == x.
x.upper())) ||
310 ((x.
x.upper() ==
y) &&
311 (nextafter(x.
x.upper(),x.
x.lower()) == x.
x.lower())))
320 }
catch (boost::numeric::interval_lib::comparison_error&) {
328 }
catch (boost::numeric::interval_lib::comparison_error&) {
358 template<
class Char,
class Traits>
359 std::basic_ostream<Char,Traits>&
360 operator <<(std::basic_ostream<Char,Traits>& os,
const FloatVal&
x) {
361 return os <<
'[' <<
x.min() <<
".." <<
x.max() <<
']';
410 #ifdef GECODE_HAS_MPFR 487 namespace Gecode {
namespace Float {
SetExpr singleton(const LinIntExpr &e)
Singleton expression.
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)
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.
int n
Number of negative literals for node type.
FloatVal & operator*=(const FloatNum &n)
Multiply by n.
Gecode::IntArgs i({1, 2, 3, 4})
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)
union Gecode::@593::NNF::@62 u
Union depending on nodetype t.
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)
boost::numeric::interval< FloatNum, boost::numeric::interval_lib::policies< R, P > > FloatValImpType
Implementation type for float value.
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)