Generated on Wed Jan 24 2018 21:22:26 for Gecode by doxygen 1.8.13
float-rel.cpp
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  * Last modified:
10  * $Date: 2013-01-22 13:48:12 +0100 (Tue, 22 Jan 2013) $ by $Author: schulte $
11  * $Revision: 13227 $
12  *
13  * This file is part of Gecode, the generic constraint
14  * development environment:
15  * http://www.gecode.org
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining
18  * a copy of this software and associated documentation files (the
19  * "Software"), to deal in the Software without restriction, including
20  * without limitation the rights to use, copy, modify, merge, publish,
21  * distribute, sublicense, and/or sell copies of the Software, and to
22  * permit persons to whom the Software is furnished to do so, subject to
23  * the following conditions:
24  *
25  * The above copyright notice and this permission notice shall be
26  * included in all copies or substantial portions of the Software.
27  *
28  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35  *
36  */
37 
38 #include <gecode/minimodel.hh>
39 
40 #ifdef GECODE_HAS_FLOAT_VARS
41 
42 namespace Gecode {
43 
44  /*
45  * Construction of linear float relations
46  *
47  */
48  LinFloatRel
49  operator ==(const FloatVal& l, const FloatVar& r) {
50  return LinFloatRel(l,FRT_EQ,(const LinFloatExpr&)r);
51  }
53  operator ==(const FloatVal& l, const LinFloatExpr& r) {
54  return LinFloatRel(l,FRT_EQ,r);
55  }
57  operator ==(const FloatVar& l, const FloatVal& r) {
58  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,r);
59  }
61  operator ==(const LinFloatExpr& l, const FloatVal& r) {
62  return LinFloatRel(l,FRT_EQ,r);
63  }
65  operator ==(const FloatVar& l, const FloatVar& r) {
66  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,(const LinFloatExpr&)r);
67  }
69  operator ==(const FloatVar& l, const LinFloatExpr& r) {
70  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,r);
71  }
73  operator ==(const LinFloatExpr& l, const FloatVar& r) {
74  return LinFloatRel(l,FRT_EQ,(const LinFloatExpr&)r);
75  }
78  return LinFloatRel(l,FRT_EQ,r);
79  }
80 
82  operator !=(const FloatVal& l, const FloatVar& r) {
83  return LinFloatRel(l,FRT_NQ,(const LinFloatExpr&)r);
84  }
86  operator !=(const FloatVal& l, const LinFloatExpr& r) {
87  return LinFloatRel(l,FRT_NQ,r);
88  }
90  operator !=(const FloatVar& l, const FloatVal& r) {
91  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,r);
92  }
94  operator !=(const LinFloatExpr& l, const FloatVal& r) {
95  return LinFloatRel(l,FRT_NQ,r);
96  }
98  operator !=(const FloatVar& l, const FloatVar& r) {
99  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,(const LinFloatExpr&)r);
100  }
102  operator !=(const FloatVar& l, const LinFloatExpr& r) {
103  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,r);
104  }
106  operator !=(const LinFloatExpr& l, const FloatVar& r) {
107  return LinFloatRel(l,FRT_NQ,(const LinFloatExpr&)r);
108  }
111  return LinFloatRel(l,FRT_NQ,r);
112  }
113 
115  operator <=(const FloatVal& l, const FloatVar& r) {
116  return LinFloatRel(l,FRT_LQ,(const LinFloatExpr&)r);
117  }
119  operator <=(const FloatVal& l, const LinFloatExpr& r) {
120  return LinFloatRel(l,FRT_LQ,r);
121  }
123  operator <=(const FloatVar& l, const FloatVal& r) {
124  return LinFloatRel(l,FRT_LQ,r);
125  }
127  operator <=(const LinFloatExpr& l, const FloatVal& r) {
128  return LinFloatRel(l,FRT_LQ,r);
129  }
131  operator <=(const FloatVar& l, const FloatVar& r) {
132  return LinFloatRel((const LinFloatExpr&)l,FRT_LQ,(const LinFloatExpr&)r);
133  }
135  operator <=(const FloatVar& l, const LinFloatExpr& r) {
136  return LinFloatRel((const LinFloatExpr&)l,FRT_LQ,r);
137  }
139  operator <=(const LinFloatExpr& l, const FloatVar& r) {
140  return LinFloatRel(l,FRT_LQ,(const LinFloatExpr&)r);
141  }
144  return LinFloatRel(l,FRT_LQ,r);
145  }
146 
148  operator <(const FloatVal& l, const FloatVar& r) {
149  return LinFloatRel(l,FRT_LE,(const LinFloatExpr&)r);
150  }
152  operator <(const FloatVal& l, const LinFloatExpr& r) {
153  return LinFloatRel(l,FRT_LE,r);
154  }
156  operator <(const FloatVar& l, const FloatVal& r) {
157  return LinFloatRel(l,FRT_LE,r);
158  }
160  operator <(const LinFloatExpr& l, const FloatVal& r) {
161  return LinFloatRel(l,FRT_LE,r);
162  }
164  operator <(const FloatVar& l, const FloatVar& r) {
165  return LinFloatRel((const LinFloatExpr&)l,FRT_LE,(const LinFloatExpr&)r);
166  }
168  operator <(const FloatVar& l, const LinFloatExpr& r) {
169  return LinFloatRel((const LinFloatExpr&)l,FRT_LE,r);
170  }
172  operator <(const LinFloatExpr& l, const FloatVar& r) {
173  return LinFloatRel(l,FRT_LE,(const LinFloatExpr&)r);
174  }
177  return LinFloatRel(l,FRT_LE,r);
178  }
179 
181  operator >=(const FloatVal& l, const FloatVar& r) {
182  return LinFloatRel(l,FRT_GQ,(const LinFloatExpr&)r);
183  }
185  operator >=(const FloatVal& l, const LinFloatExpr& r) {
186  return LinFloatRel(l,FRT_GQ,r);
187  }
189  operator >=(const FloatVar& l, const FloatVal& r) {
190  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,r);
191  }
193  operator >=(const LinFloatExpr& l, const FloatVal& r) {
194  return LinFloatRel(l,FRT_GQ,r);
195  }
197  operator >=(const FloatVar& l, const FloatVar& r) {
198  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,(const LinFloatExpr&)r);
199  }
201  operator >=(const FloatVar& l, const LinFloatExpr& r) {
202  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,r);
203  }
205  operator >=(const LinFloatExpr& l, const FloatVar& r) {
206  return LinFloatRel(l,FRT_GQ,(const LinFloatExpr&)r);
207  }
210  return LinFloatRel(l,FRT_GQ,r);
211  }
212 
214  operator >(const FloatVal& l, const FloatVar& r) {
215  return LinFloatRel(l,FRT_GR,(const LinFloatExpr&)r);
216  }
218  operator >(const FloatVal& l, const LinFloatExpr& r) {
219  return LinFloatRel(l,FRT_GR,r);
220  }
222  operator >(const FloatVar& l, const FloatVal& r) {
223  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,r);
224  }
226  operator >(const LinFloatExpr& l, const FloatVal& r) {
227  return LinFloatRel(l,FRT_GR,r);
228  }
230  operator >(const FloatVar& l, const FloatVar& r) {
231  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,(const LinFloatExpr&)r);
232  }
234  operator >(const FloatVar& l, const LinFloatExpr& r) {
235  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,r);
236  }
238  operator >(const LinFloatExpr& l, const FloatVar& r) {
239  return LinFloatRel(l,FRT_GR,(const LinFloatExpr&)r);
240  }
243  return LinFloatRel(l,FRT_GR,r);
244  }
245 
246 }
247 
248 #endif
249 
250 // STATISTICS: minimodel-any
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
Disequality ( )
Definition: float.hh:1071
Less or equal ( )
Definition: float.hh:1072
Less ( )
Definition: float.hh:1073
Greater or equal ( )
Definition: float.hh:1074
Linear relations.
Definition: minimodel.hh:794
bool operator!=(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:321
Float expressions
Definition: minimodel.hh:720
Equality ( )
Definition: float.hh:1070
Greater ( )
Definition: float.hh:1075
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:784
Float value type.
Definition: float.hh:338
bool operator>=(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:281
Float variables.
Definition: float.hh:874
bool operator>(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:264
bool operator<(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:230
bool operator==(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:298
bool operator<=(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:247
Gecode toplevel namespace