Generated on Wed Jan 1 2020 10:37:59 for Gecode by doxygen 1.8.16
trigonometric.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Vincent Barichard <Vincent.Barichard@univ-angers.fr>
5  *
6  * Copyright:
7  * Vincent Barichard, 2012
8  *
9  * This file is part of Gecode, the generic constraint
10  * development environment:
11  * http://www.gecode.org
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining
14  * a copy of this software and associated documentation files (the
15  * "Software"), to deal in the Software without restriction, including
16  * without limitation the rights to use, copy, modify, merge, publish,
17  * distribute, sublicense, and/or sell copies of the Software, and to
18  * permit persons to whom the Software is furnished to do so, subject to
19  * the following conditions:
20  *
21  * The above copyright notice and this permission notice shall be
22  * included in all copies or substantial portions of the Software.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31  *
32  */
33 
34 #ifndef __GECODE_FLOAT_TRIGONOMETRIC_HH__
35 #define __GECODE_FLOAT_TRIGONOMETRIC_HH__
36 
37 #include <gecode/float.hh>
38 
43 namespace Gecode { namespace Float { namespace Trigonometric {
44 
53  template<class A, class B>
54  class Sin : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
55  protected:
59  static ExecStatus dopropagate(Space& home, A x0, B x1);
61  Sin(Space& home, Sin& p);
63  Sin(Home home, A x0, B x1);
64  public:
66  virtual Actor* copy(Space& home);
68  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
70  static ExecStatus post(Home home, A x0, B x1);
71  };
72 
73 
82  template<class A, class B>
83  class Cos : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
84  protected:
88  static ExecStatus dopropagate(Space& home, A x0, B x1);
90  Cos(Space& home, Cos& p);
92  Cos(Home home, A x0, B x1);
93  public:
95  virtual Actor* copy(Space& home);
97  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
99  static ExecStatus post(Home home, A x0, B x1);
100  };
101 
110  template<class A, class B>
111  class ASin : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
112  protected:
115 
117  ASin(Space& home, ASin& p);
119  ASin(Home home, A x0, B x1);
120  public:
122  virtual Actor* copy(Space& home);
124  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
126  static ExecStatus post(Home home, A x0, B x1);
127  };
128 
129 
138  template<class A, class B>
139  class ACos : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
140  protected:
143 
145  ACos(Space& home, ACos& p);
147  ACos(Home home, A x0, B x1);
148  public:
150  virtual Actor* copy(Space& home);
152  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
154  static ExecStatus post(Home home, A x0, B x1);
155  };
156 
165  template<class A, class B>
166  class Tan : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
167  protected:
171  static ExecStatus dopropagate(Space& home, A x0, B x1);
173  Tan(Space& home, Tan& p);
175  Tan(Home home, A x0, B x1);
176  public:
178  virtual Actor* copy(Space& home);
180  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
182  static ExecStatus post(Home home, A x0, B x1);
183  };
184 
193  template<class A, class B>
194  class ATan : public MixBinaryPropagator<A,PC_FLOAT_BND,B,PC_FLOAT_BND> {
195  protected:
198 
200  ATan(Space& home, ATan& p);
202  ATan(Home home, A x0, B x1);
203  public:
205  virtual Actor* copy(Space& home);
207  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
209  static ExecStatus post(Home home, A x0, B x1);
210  };
211 }}}
212 
216 
217 #endif
218 
219 // STATISTICS: float-prop
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: asinacos.hpp:128
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: tanatan.hpp:193
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: tanatan.hpp:212
Propagator for bounds consistent cosinus operator
Tan(Space &home, Tan &p)
Constructor for cloning p.
Definition: tanatan.hpp:165
Sin(Space &home, Sin &p)
Constructor for cloning p.
Definition: sincos.hpp:161
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: sincos.hpp:166
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: sincos.hpp:172
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: asinacos.hpp:69
A x0
View of type View0.
Definition: pattern.hpp:207
static ExecStatus dopropagate(Space &home, A x0, B x1)
Perform actual propagation.
Definition: sincos.hpp:120
Propagator for bounds consistent arc cosinus operator
Computation spaces.
Definition: core.hpp:1742
Base-class for both propagators and branchers.
Definition: core.hpp:628
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: sincos.hpp:236
Propagator for bounds consistent tangent operator
B x1
View of type View1.
Definition: pattern.hpp:209
Gecode toplevel namespace
Mixed binary propagator.
Definition: pattern.hpp:204
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: asinacos.hpp:75
Home class for posting propagators
Definition: core.hpp:856
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: tanatan.hpp:176
Propagator for bounds consistent arc tangent operator
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: sincos.hpp:145
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1075
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: tanatan.hpp:151
static ExecStatus dopropagate(Space &home, A x0, B x1)
Perform actual propagation.
Definition: sincos.hpp:184
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: asinacos.hpp:95
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: asinacos.hpp:122
Propagator for bounds consistent sinus operator
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: sincos.hpp:242
ATan(Space &home, ATan &p)
Constructor for cloning p.
Definition: tanatan.hpp:207
ACos(Space &home, ACos &p)
Constructor for cloning p.
Definition: asinacos.hpp:117
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: asinacos.hpp:48
Propagator for bounds consistent arc sinus operator
ASin(Space &home, ASin &p)
Constructor for cloning p.
Definition: asinacos.hpp:64
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: tanatan.hpp:218
static ExecStatus dopropagate(Space &home, A x0, B x1)
Perform actual propagation.
Definition: tanatan.hpp:93
int ModEventDelta
Modification event deltas.
Definition: core.hpp:89
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: tanatan.hpp:170
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:232
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
Definition: sincos.hpp:210
ExecStatus
Definition: core.hpp:472
Cos(Space &home, Cos &p)
Constructor for cloning p.
Definition: sincos.hpp:231