Generated on Fri Oct 19 11:24:57 2018 for Gecode by doxygen 1.6.3

trigonometric.hh

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Vincent Barichard <Vincent.Barichard@univ-angers.fr>
00005  *
00006  *  Copyright:
00007  *     Vincent Barichard, 2012
00008  *
00009  *  This file is part of Gecode, the generic constraint
00010  *  development environment:
00011  *     http://www.gecode.org
00012  *
00013  *  Permission is hereby granted, free of charge, to any person obtaining
00014  *  a copy of this software and associated documentation files (the
00015  *  "Software"), to deal in the Software without restriction, including
00016  *  without limitation the rights to use, copy, modify, merge, publish,
00017  *  distribute, sublicense, and/or sell copies of the Software, and to
00018  *  permit persons to whom the Software is furnished to do so, subject to
00019  *  the following conditions:
00020  *
00021  *  The above copyright notice and this permission notice shall be
00022  *  included in all copies or substantial portions of the Software.
00023  *
00024  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00025  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00026  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00027  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00028  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00029  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00030  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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 // STATISTICS: float-prop