00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __GECODE_FLOAT_TRIGONOMETRIC_HH__
00035 #define __GECODE_FLOAT_TRIGONOMETRIC_HH__
00036
00037 #include <gecode/float.hh>
00038
00043 namespace Gecode { namespace Float { namespace Trigonometric {
00044
00053 template<class A, class B>
00054 class Sin : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00055 protected:
00056 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00057 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00059 static ExecStatus dopropagate(Space& home, A x0, B x1);
00061 Sin(Space& home, Sin& p);
00063 Sin(Home home, A x0, B x1);
00064 public:
00066 virtual Actor* copy(Space& home);
00068 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00070 static ExecStatus post(Home home, A x0, B x1);
00071 };
00072
00073
00082 template<class A, class B>
00083 class Cos : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00084 protected:
00085 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00086 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00088 static ExecStatus dopropagate(Space& home, A x0, B x1);
00090 Cos(Space& home, Cos& p);
00092 Cos(Home home, A x0, B x1);
00093 public:
00095 virtual Actor* copy(Space& home);
00097 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00099 static ExecStatus post(Home home, A x0, B x1);
00100 };
00101
00110 template<class A, class B>
00111 class ASin : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00112 protected:
00113 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00114 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00115
00117 ASin(Space& home, ASin& p);
00119 ASin(Home home, A x0, B x1);
00120 public:
00122 virtual Actor* copy(Space& home);
00124 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00126 static ExecStatus post(Home home, A x0, B x1);
00127 };
00128
00129
00138 template<class A, class B>
00139 class ACos : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00140 protected:
00141 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00142 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00143
00145 ACos(Space& home, ACos& p);
00147 ACos(Home home, A x0, B x1);
00148 public:
00150 virtual Actor* copy(Space& home);
00152 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00154 static ExecStatus post(Home home, A x0, B x1);
00155 };
00156
00165 template<class A, class B>
00166 class Tan : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00167 protected:
00168 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00169 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00171 static ExecStatus dopropagate(Space& home, A x0, B x1);
00173 Tan(Space& home, Tan& p);
00175 Tan(Home home, A x0, B x1);
00176 public:
00178 virtual Actor* copy(Space& home);
00180 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00182 static ExecStatus post(Home home, A x0, B x1);
00183 };
00184
00193 template<class A, class B>
00194 class ATan : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
00195 protected:
00196 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x0;
00197 using MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND>::x1;
00198
00200 ATan(Space& home, ATan& p);
00202 ATan(Home home, A x0, B x1);
00203 public:
00205 virtual Actor* copy(Space& home);
00207 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00209 static ExecStatus post(Home home, A x0, B x1);
00210 };
00211 }}}
00212
00213 #include <gecode/float/trigonometric/sincos.hpp>
00214 #include <gecode/float/trigonometric/asinacos.hpp>
00215 #include <gecode/float/trigonometric/tanatan.hpp>
00216
00217 #endif
00218
00219