42 #ifndef __GECODE_FLOAT_HH__
43 #define __GECODE_FLOAT_HH__
56 #if !defined(GECODE_STATIC_LIBS) && \
57 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
59 #ifdef GECODE_BUILD_FLOAT
60 #define GECODE_FLOAT_EXPORT __declspec( dllexport )
62 #define GECODE_FLOAT_EXPORT __declspec( dllimport )
67 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
68 #define GECODE_FLOAT_EXPORT __attribute__ ((visibility("default")))
70 #define GECODE_FLOAT_EXPORT
76 #ifndef GECODE_BUILD_FLOAT
77 #define GECODE_LIBRARY_NAME "Float"
82 #include <gecode/third-party/boost/numeric/interval.hpp>
130 namespace Gecode {
namespace Float {
138 public boost::numeric::interval_lib::rounded_arith_opp<FloatNum> {
141 typedef boost::numeric::interval_lib::rounded_arith_opp<FloatNum>
Base;
185 #ifdef GECODE_HAS_MPFR
268 namespace Gecode {
namespace Float {
274 bool subset(
const FloatVal&
x,
const FloatVal& y);
284 bool overlap(
const FloatVal&
x,
const FloatVal& y);
290 FloatVal
intersect(
const FloatVal&
x,
const FloatVal& y);
295 FloatVal
hull(
const FloatVal&
x,
const FloatVal& y);
356 template<
class Char,
class Traits>
357 friend std::basic_ostream<Char,Traits>&
358 operator <<(std::basic_ostream<Char,Traits>& os,
const FloatVal&
x);
373 #ifdef GECODE_HAS_MPFR
403 typedef boost::numeric::interval_lib::save_state<Float::Rounding>
R;
405 typedef boost::numeric::interval_lib::checking_strict<FloatNum>
P;
407 typedef boost::numeric::interval
409 boost::numeric::interval_lib::policies<R, P> >
451 bool tight(
void)
const;
664 template<
class Char,
class Traits>
665 std::basic_ostream<Char,Traits>&
666 operator <<(std::basic_ostream<Char,Traits>& os,
const FloatVal&
x);
725 #ifdef GECODE_HAS_MPFR
822 namespace Gecode {
namespace Float {
926 template<
class Char,
class Traits>
927 std::basic_ostream<Char,Traits>&
928 operator <<(std::basic_ostream<Char,Traits>& os,
const FloatVar&
x);
950 template<
class InputIterator>
981 template<
class InputIterator>
1072 dom(Home home, FloatVar
x, FloatVal
n);
1075 dom(Home home,
const FloatVarArgs&
x, FloatVal
n);
1084 dom(Home home, FloatVar
x, FloatVal
n, Reify
r);
1090 dom(Home home, FloatVar
x, FloatVar
d);
1093 dom(Home home,
const FloatVarArgs&
x,
const FloatVarArgs&
d);
1146 min(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1151 min(Home home,
const FloatVarArgs&
x, FloatVar y);
1155 max(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1160 max(Home home,
const FloatVarArgs&
x, FloatVar y);
1165 abs(Home home, FloatVar x0, FloatVar x1);
1170 mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1175 sqr(Home home, FloatVar x0, FloatVar x1);
1180 sqrt(Home home, FloatVar x0, FloatVar x1);
1185 pow(Home home, FloatVar x0,
int n, FloatVar x1);
1190 nroot(Home home, FloatVar x0,
int n, FloatVar x1);
1195 div(Home home, FloatVar x0, FloatVar x1, FloatVar x2);
1196 #ifdef GECODE_HAS_MPFR
1200 exp(Home home, FloatVar x0, FloatVar x1);
1204 log(Home home, FloatVar x0, FloatVar x1);
1208 pow(Home home,
FloatNum base, FloatVar x0, FloatVar x1);
1212 log(Home home,
FloatNum base, FloatVar x0, FloatVar x1);
1216 asin(Home home, FloatVar x0, FloatVar x1);
1220 sin(Home home, FloatVar x0, FloatVar x1);
1224 acos(Home home, FloatVar x0, FloatVar x1);
1228 cos(Home home, FloatVar x0, FloatVar x1);
1232 atan(Home home, FloatVar x0, FloatVar x1);
1236 tan(Home home, FloatVar x0, FloatVar x1);
1248 linear(Home home,
const FloatVarArgs&
x,
1254 linear(Home home,
const FloatVarArgs&
x,
1260 linear(Home home,
const FloatVarArgs&
x,
1266 linear(Home home,
const FloatVarArgs&
x,
1275 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1284 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1293 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1302 linear(Home home,
const FloatValArgs&
a,
const FloatVarArgs&
x,
1313 channel(Home home, FloatVar x0, IntVar x1);
1316 channel(Home home, IntVar x0, FloatVar x1);
1330 wait(Home home, FloatVar
x,
void (*
c)(Space& home));
1333 wait(Home home,
const FloatVarArgs& x,
void (*
c)(Space& home));
1718 branch(Home home,
const FloatVarArgs& x,
1719 FloatVarBranch vars, FloatValBranch vals,
1727 branch(Home home,
const FloatVarArgs& x,
1728 TieBreak<FloatVarBranch> vars, FloatValBranch vals,
1736 branch(Home home, FloatVar x, FloatValBranch vals);
1744 assign(Home home,
const FloatVarArgs& x, FloatAssign vals,
1752 assign(Home home, FloatVar x, FloatAssign vals);