Generated on Sat Feb 7 2015 02:01:28 for Gecode by doxygen 1.8.9.1
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  }
52  LinFloatRel
53  operator ==(const FloatVal& l, const LinFloatExpr& r) {
54  return LinFloatRel(l,FRT_EQ,r);
55  }
56  LinFloatRel
57  operator ==(const FloatVar& l, const FloatVal& r) {
58  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,r);
59  }
60  LinFloatRel
61  operator ==(const LinFloatExpr& l, const FloatVal& r) {
62  return LinFloatRel(l,FRT_EQ,r);
63  }
64  LinFloatRel
65  operator ==(const FloatVar& l, const FloatVar& r) {
66  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,(const LinFloatExpr&)r);
67  }
68  LinFloatRel
69  operator ==(const FloatVar& l, const LinFloatExpr& r) {
70  return LinFloatRel((const LinFloatExpr&)l,FRT_EQ,r);
71  }
72  LinFloatRel
73  operator ==(const LinFloatExpr& l, const FloatVar& r) {
74  return LinFloatRel(l,FRT_EQ,(const LinFloatExpr&)r);
75  }
76  LinFloatRel
78  return LinFloatRel(l,FRT_EQ,r);
79  }
80 
81  LinFloatRel
82  operator !=(const FloatVal& l, const FloatVar& r) {
83  return LinFloatRel(l,FRT_NQ,(const LinFloatExpr&)r);
84  }
85  LinFloatRel
86  operator !=(const FloatVal& l, const LinFloatExpr& r) {
87  return LinFloatRel(l,FRT_NQ,r);
88  }
89  LinFloatRel
90  operator !=(const FloatVar& l, const FloatVal& r) {
91  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,r);
92  }
93  LinFloatRel
94  operator !=(const LinFloatExpr& l, const FloatVal& r) {
95  return LinFloatRel(l,FRT_NQ,r);
96  }
97  LinFloatRel
98  operator !=(const FloatVar& l, const FloatVar& r) {
99  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,(const LinFloatExpr&)r);
100  }
101  LinFloatRel
102  operator !=(const FloatVar& l, const LinFloatExpr& r) {
103  return LinFloatRel((const LinFloatExpr&)l,FRT_NQ,r);
104  }
105  LinFloatRel
106  operator !=(const LinFloatExpr& l, const FloatVar& r) {
107  return LinFloatRel(l,FRT_NQ,(const LinFloatExpr&)r);
108  }
109  LinFloatRel
111  return LinFloatRel(l,FRT_NQ,r);
112  }
113 
114  LinFloatRel
115  operator <=(const FloatVal& l, const FloatVar& r) {
116  return LinFloatRel(l,FRT_LQ,(const LinFloatExpr&)r);
117  }
118  LinFloatRel
119  operator <=(const FloatVal& l, const LinFloatExpr& r) {
120  return LinFloatRel(l,FRT_LQ,r);
121  }
122  LinFloatRel
123  operator <=(const FloatVar& l, const FloatVal& r) {
124  return LinFloatRel(l,FRT_LQ,r);
125  }
126  LinFloatRel
127  operator <=(const LinFloatExpr& l, const FloatVal& r) {
128  return LinFloatRel(l,FRT_LQ,r);
129  }
130  LinFloatRel
131  operator <=(const FloatVar& l, const FloatVar& r) {
132  return LinFloatRel((const LinFloatExpr&)l,FRT_LQ,(const LinFloatExpr&)r);
133  }
134  LinFloatRel
135  operator <=(const FloatVar& l, const LinFloatExpr& r) {
136  return LinFloatRel((const LinFloatExpr&)l,FRT_LQ,r);
137  }
138  LinFloatRel
139  operator <=(const LinFloatExpr& l, const FloatVar& r) {
140  return LinFloatRel(l,FRT_LQ,(const LinFloatExpr&)r);
141  }
142  LinFloatRel
144  return LinFloatRel(l,FRT_LQ,r);
145  }
146 
147  LinFloatRel
148  operator <(const FloatVal& l, const FloatVar& r) {
149  return LinFloatRel(l,FRT_LE,(const LinFloatExpr&)r);
150  }
151  LinFloatRel
152  operator <(const FloatVal& l, const LinFloatExpr& r) {
153  return LinFloatRel(l,FRT_LE,r);
154  }
155  LinFloatRel
156  operator <(const FloatVar& l, const FloatVal& r) {
157  return LinFloatRel(l,FRT_LE,r);
158  }
159  LinFloatRel
160  operator <(const LinFloatExpr& l, const FloatVal& r) {
161  return LinFloatRel(l,FRT_LE,r);
162  }
163  LinFloatRel
164  operator <(const FloatVar& l, const FloatVar& r) {
165  return LinFloatRel((const LinFloatExpr&)l,FRT_LE,(const LinFloatExpr&)r);
166  }
167  LinFloatRel
168  operator <(const FloatVar& l, const LinFloatExpr& r) {
169  return LinFloatRel((const LinFloatExpr&)l,FRT_LE,r);
170  }
171  LinFloatRel
172  operator <(const LinFloatExpr& l, const FloatVar& r) {
173  return LinFloatRel(l,FRT_LE,(const LinFloatExpr&)r);
174  }
175  LinFloatRel
177  return LinFloatRel(l,FRT_LE,r);
178  }
179 
180  LinFloatRel
181  operator >=(const FloatVal& l, const FloatVar& r) {
182  return LinFloatRel(l,FRT_GQ,(const LinFloatExpr&)r);
183  }
184  LinFloatRel
185  operator >=(const FloatVal& l, const LinFloatExpr& r) {
186  return LinFloatRel(l,FRT_GQ,r);
187  }
188  LinFloatRel
189  operator >=(const FloatVar& l, const FloatVal& r) {
190  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,r);
191  }
192  LinFloatRel
193  operator >=(const LinFloatExpr& l, const FloatVal& r) {
194  return LinFloatRel(l,FRT_GQ,r);
195  }
196  LinFloatRel
197  operator >=(const FloatVar& l, const FloatVar& r) {
198  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,(const LinFloatExpr&)r);
199  }
200  LinFloatRel
201  operator >=(const FloatVar& l, const LinFloatExpr& r) {
202  return LinFloatRel((const LinFloatExpr&)l,FRT_GQ,r);
203  }
204  LinFloatRel
205  operator >=(const LinFloatExpr& l, const FloatVar& r) {
206  return LinFloatRel(l,FRT_GQ,(const LinFloatExpr&)r);
207  }
208  LinFloatRel
210  return LinFloatRel(l,FRT_GQ,r);
211  }
212 
213  LinFloatRel
214  operator >(const FloatVal& l, const FloatVar& r) {
215  return LinFloatRel(l,FRT_GR,(const LinFloatExpr&)r);
216  }
217  LinFloatRel
218  operator >(const FloatVal& l, const LinFloatExpr& r) {
219  return LinFloatRel(l,FRT_GR,r);
220  }
221  LinFloatRel
222  operator >(const FloatVar& l, const FloatVal& r) {
223  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,r);
224  }
225  LinFloatRel
226  operator >(const LinFloatExpr& l, const FloatVal& r) {
227  return LinFloatRel(l,FRT_GR,r);
228  }
229  LinFloatRel
230  operator >(const FloatVar& l, const FloatVar& r) {
231  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,(const LinFloatExpr&)r);
232  }
233  LinFloatRel
234  operator >(const FloatVar& l, const LinFloatExpr& r) {
235  return LinFloatRel((const LinFloatExpr&)l,FRT_GR,r);
236  }
237  LinFloatRel
238  operator >(const LinFloatExpr& l, const FloatVar& r) {
239  return LinFloatRel(l,FRT_GR,(const LinFloatExpr&)r);
240  }
241  LinFloatRel
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:1056
Less or equal ( )
Definition: float.hh:1057
Less ( )
Definition: float.hh:1058
Greater or equal ( )
Definition: float.hh:1059
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
Linear relations.
Definition: minimodel.hh:789
bool operator!=(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:321
Float expressions
Definition: minimodel.hh:715
Equality ( )
Definition: float.hh:1055
Greater ( )
Definition: float.hh:1060
Float value type.
Definition: float.hh:321
bool operator>=(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:281
Float variables.
Definition: float.hh:857
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