Generated on Sat Apr 10 2021 00:00:00 for Gecode by doxygen 1.9.1
arithmetic.cpp
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  * Vincent Barichard <Vincent.Barichard@univ-angers.fr>
6  *
7  * Copyright:
8  * Christian Schulte, 2005
9  * Vincent Barichard, 2012
10  *
11  * This file is part of Gecode, the generic constraint
12  * development environment:
13  * http://www.gecode.org
14  *
15  * Permission is hereby granted, free of charge, to any person obtaining
16  * a copy of this software and associated documentation files (the
17  * "Software"), to deal in the Software without restriction, including
18  * without limitation the rights to use, copy, modify, merge, publish,
19  * distribute, sublicense, and/or sell copies of the Software, and to
20  * permit persons to whom the Software is furnished to do so, subject to
21  * the following conditions:
22  *
23  * The above copyright notice and this permission notice shall be
24  * included in all copies or substantial portions of the Software.
25  *
26  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33  *
34  */
35 
36 #include "test/float.hh"
37 
38 #include <gecode/minimodel.hh>
39 
40 #include <cmath>
41 #include <algorithm>
42 
43 namespace Test { namespace Float {
44 
46  namespace Arithmetic {
47 
54  class MultXYZ : public Test {
55  public:
57  MultXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
58  : Test("Arithmetic::Mult::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
60  virtual MaybeType solution(const Assignment& x) const {
61  return eq(x[0] * x[1], x[2]);
62  }
64  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
65  if (flip())
66  Gecode::mult(home, x[0], x[1], x[2]);
67  else
68  Gecode::rel(home, x[0] * x[1] == x[2]);
69  }
70  };
71 
73  class MultXYZSol : public Test {
74  public:
76  MultXYZSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
77  : Test("Arithmetic::Mult::XYZ::Sol::"+s,3,d,st,EXTEND_ASSIGNMENT,false) {}
79  virtual MaybeType solution(const Assignment& x) const {
80  return eq(x[0] * x[1], x[2]);
81  }
83  virtual bool extendAssignement(Assignment& x) const {
84  Gecode::FloatVal d = x[0]*x[1];
85  if (Gecode::Float::subset(d, dom)) {
86  x.set(2, d);
87  return true;
88  } else {
89  return false;
90  }
91  }
93  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
94  Gecode::mult(home, x[0], x[1], x[2]);
95  }
96  };
97 
99  class MultXXY : public Test {
100  public:
102  MultXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
103  : Test("Arithmetic::Mult::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
105  virtual MaybeType solution(const Assignment& x) const {
106  return eq(x[0] * x[0], x[1]);
107  }
109  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
110  Gecode::mult(home, x[0], x[0], x[1]);
111  }
112  };
113 
115  class MultXXYSol : public Test {
116  public:
118  MultXXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
119  : Test("Arithmetic::Mult::XXY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
121  virtual MaybeType solution(const Assignment& x) const {
122  return eq(x[0] * x[0], x[1]);
123  }
125  virtual bool extendAssignement(Assignment& x) const {
126  Gecode::FloatVal d = x[0]*x[0];
127  if (Gecode::Float::subset(d, dom)) {
128  x.set(1, d);
129  return true;
130  } else {
131  return false;
132  }
133  }
135  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
136  Gecode::mult(home, x[0], x[0], x[1]);
137  }
138  };
139 
141  class MultXYX : public Test {
142  public:
144  MultXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
145  : Test("Arithmetic::Mult::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
147  virtual MaybeType solution(const Assignment& x) const {
148  return eq(x[0] * x[1], x[0]);
149  }
151  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
152  Gecode::mult(home, x[0], x[1], x[0]);
153  }
154  };
155 
157  class MultXYY : public Test {
158  public:
160  MultXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
161  : Test("Arithmetic::Mult::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
163  virtual MaybeType solution(const Assignment& x) const {
164  return eq(x[0] * x[1], x[1]);
165  }
167  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
168  Gecode::mult(home, x[0], x[1], x[1]);
169  }
170  };
171 
173  class MultXXX : public Test {
174  public:
176  MultXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
177  : Test("Arithmetic::Mult::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
179  virtual MaybeType solution(const Assignment& x) const {
180  return eq(x[0] * x[0], x[0]);
181  }
183  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
184  Gecode::mult(home, x[0], x[0], x[0]);
185  }
186  };
187 
189  class Div : public Test {
190  public:
192  Div(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
193  : Test("Arithmetic::Div::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
195  virtual MaybeType solution(const Assignment& x) const {
196  return eq(x[0] / x[1], x[2]);
197  }
199  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
200  if (flip())
201  Gecode::div(home, x[0], x[1], x[2]);
202  else
203  Gecode::rel(home, x[0] / x[1] == x[2]);
204  }
205  };
206 
208  class DivSol : public Test {
209  public:
211  DivSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
212  : Test("Arithmetic::Div::Sol::"+s,3,d,st,EXTEND_ASSIGNMENT,false) {}
214  virtual MaybeType solution(const Assignment& x) const {
215  return eq(x[0] / x[1], x[2]);
216  }
218  virtual bool extendAssignement(Assignment& x) const {
219  Gecode::FloatVal d = x[0]/x[1];
220  if (Gecode::Float::subset(d, dom)) {
221  x.set(2, d);
222  return true;
223  } else {
224  return false;
225  }
226  }
228  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
229  Gecode::div(home, x[0], x[1], x[2]);
230  }
231  };
232 
234  class SqrXY : public Test {
235  public:
237  SqrXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
238  : Test("Arithmetic::Sqr::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
240  virtual MaybeType solution(const Assignment& x) const {
241  return eq(x[0] * x[0], x[1]);
242  }
244  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
245  if (flip())
246  Gecode::sqr(home, x[0], x[1]);
247  else
248  Gecode::rel(home, sqr(x[0]) == x[1]);
249  }
250  };
251 
253  class SqrXYSol : public Test {
254  public:
256  SqrXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
257  : Test("Arithmetic::Sqr::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
259  virtual MaybeType solution(const Assignment& x) const {
260  return eq(x[0] * x[0], x[1]);
261  }
263  virtual bool extendAssignement(Assignment& x) const {
264  Gecode::FloatVal d = sqr(x[0]);
265  if (Gecode::Float::subset(d, dom)) {
266  x.set(1, d);
267  return true;
268  } else {
269  return false;
270  }
271  }
273  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
274  Gecode::sqr(home, x[0], x[1]);
275  }
276  };
277 
279  class SqrXX : public Test {
280  public:
282  SqrXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
283  : Test("Arithmetic::Sqr::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
285  virtual MaybeType solution(const Assignment& x) const {
286  return eq(x[0] * x[0], x[0]);
287  }
289  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
290  Gecode::sqr(home, x[0], x[0]);
291  }
292  };
293 
295  class SqrtXY : public Test {
296  public:
298  SqrtXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
299  : Test("Arithmetic::Sqrt::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
301  virtual MaybeType solution(const Assignment& x) const {
302  switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
303  case MT_FALSE: return MT_FALSE;
304  case MT_MAYBE: return MT_MAYBE;
305  default:
306  return eq(sqrt(x[0]), x[1]);
307  }
308  }
310  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
311  if (flip())
312  Gecode::sqrt(home, x[0], x[1]);
313  else
314  Gecode::rel(home, sqrt(x[0]) == x[1]);
315  }
316  };
317 
319  class SqrtXYSol : public Test {
320  public:
322  SqrtXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
323  : Test("Arithmetic::Sqrt::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
325  virtual MaybeType solution(const Assignment& x) const {
326  switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
327  case MT_FALSE: return MT_FALSE;
328  case MT_MAYBE: return MT_MAYBE;
329  default:
330  return eq(sqrt(x[0]), x[1]);
331  }
332  }
334  virtual bool extendAssignement(Assignment& x) const {
335  Gecode::FloatVal d = sqrt(abs(x[0]));
336  if (Gecode::Float::subset(d, dom)) {
337  x.set(1, d);
338  return true;
339  } else {
340  return false;
341  }
342  }
344  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
345  Gecode::sqrt(home, x[0], x[1]);
346  }
347  };
348 
350  class SqrtXX : public Test {
351  public:
353  SqrtXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
354  : Test("Arithmetic::Sqrt::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
356  virtual MaybeType solution(const Assignment& x) const {
357  switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
358  case MT_FALSE: return MT_FALSE;
359  case MT_MAYBE: return MT_MAYBE;
360  default:
361  return eq(sqrt(x[0]), x[0]);
362  }
363  }
365  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
366  Gecode::sqrt(home, x[0], x[0]);
367  }
368  };
369 
371  class PowXY : public Test {
372  unsigned int n;
373  public:
375  PowXY(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
376  : Test("Arithmetic::Pow::N::"+str(_n)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), n(_n) {}
378  virtual MaybeType solution(const Assignment& x) const {
379  return eq(pow(x[0],n), x[1]);
380  }
382  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
383  if (flip())
384  Gecode::pow(home, x[0], n, x[1]);
385  else
386  Gecode::rel(home, pow(x[0],n) == x[1]);
387  }
388  };
389 
391  class PowXYSol : public Test {
392  unsigned int n;
393  public:
395  PowXYSol(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
396  : Test("Arithmetic::Pow::N::"+str(_n)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), n(_n) {}
398  virtual MaybeType solution(const Assignment& x) const {
399  return eq(pow(x[0],n), x[1]);
400  }
402  virtual bool extendAssignement(Assignment& x) const {
403  Gecode::FloatVal d = pow(x[0],n);
404  if (Gecode::Float::subset(d, dom)) {
405  x.set(1, d);
406  return true;
407  } else {
408  return false;
409  }
410  }
412  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
413  Gecode::pow(home, x[0], n, x[1]);
414  }
415  };
416 
418  class PowXX : public Test {
419  unsigned int n;
420  public:
422  PowXX(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
423  : Test("Arithmetic::Pow::N::"+str(_n)+"::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
425  virtual MaybeType solution(const Assignment& x) const {
426  return eq(pow(x[0],n), x[0]);
427  }
429  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
430  Gecode::pow(home, x[0], n, x[0]);
431  }
432  };
433 
435  class NRootXY : public Test {
436  unsigned int n;
437  public:
439  NRootXY(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
440  : Test("Arithmetic::NRoot::N::"+str(_n)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), n(_n) {}
442  virtual MaybeType solution(const Assignment& x) const {
443  if ((n == 0) || (x[0].max() < 0.0))
444  return MT_FALSE;
445  return eq(nroot(x[0],n), x[1]);
446  }
448  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
449  if (flip())
450  Gecode::nroot(home, x[0], n, x[1]);
451  else
452  Gecode::rel(home, nroot(x[0],n) == x[1]);
453  }
454  };
455 
457  class NRootXYSol : public Test {
458  unsigned int n;
459  public:
461  NRootXYSol(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
462  : Test("Arithmetic::NRoot::N::"+str(_n)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), n(_n) {}
464  virtual MaybeType solution(const Assignment& x) const {
465  if ((n == 0) || (x[0].max() < 0.0))
466  return MT_FALSE;
467  return eq(nroot(x[0],n), x[1]);
468  }
470  virtual bool extendAssignement(Assignment& x) const {
471  if ((n == 0) || (x[0].max() < 0))
472  return false;
473  Gecode::FloatVal d = nroot(x[0],n);
474  if (Gecode::Float::subset(d, dom)) {
475  x.set(1, d);
476  return true;
477  } else {
478  return false;
479  }
480  }
482  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
483  Gecode::nroot(home, x[0], n, x[1]);
484  }
485  };
486 
488  class NRootXX : public Test {
489  unsigned int n;
490  public:
492  NRootXX(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
493  : Test("Arithmetic::NRoot::N::"+str(_n)+"::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
495  virtual MaybeType solution(const Assignment& x) const {
496  if ((n == 0) || (x[0].max() < 0))
497  return MT_FALSE;
498  return eq(nroot(x[0],n), x[0]);
499  }
501  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
502  Gecode::nroot(home, x[0], n, x[0]);
503  }
504  };
505 
507  class AbsXY : public Test {
508  public:
510  AbsXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
511  : Test("Arithmetic::Abs::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
513  virtual MaybeType solution(const Assignment& x) const {
514  return eq(abs(x[0]), x[1]);
515  }
517  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
518  if (flip())
519  Gecode::abs(home, x[0], x[1]);
520  else
521  Gecode::rel(home, abs(x[0]) == x[1]);
522  }
523  };
524 
526  class AbsXX : public Test {
527  public:
529  AbsXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
530  : Test("Arithmetic::Abs::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
532  virtual MaybeType solution(const Assignment& x) const {
533  return eq(abs(x[0]), x[0]);
534  }
536  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
537  Gecode::abs(home, x[0], x[0]);
538  }
539  };
540 
542  class MinXYZ : public Test {
543  public:
545  MinXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
546  : Test("Arithmetic::Min::Bin::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
548  virtual MaybeType solution(const Assignment& x) const {
549  return eq(min(x[0],x[1]), x[2]);
550  }
552  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
553  if (flip())
554  Gecode::min(home, x[0], x[1], x[2]);
555  else
556  Gecode::rel(home, min(x[0],x[1]) == x[2]);
557  }
558  };
559 
561  class MinXXY : public Test {
562  public:
564  MinXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
565  : Test("Arithmetic::Min::Bin::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
567  virtual MaybeType solution(const Assignment& x) const {
568  return eq(min(x[0],x[0]), x[1]);
569  }
571  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
572  Gecode::min(home, x[0], x[0], x[1]);
573  }
574  };
575 
577  class MinXYX : public Test {
578  public:
580  MinXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
581  : Test("Arithmetic::Min::Bin::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
583  virtual MaybeType solution(const Assignment& x) const {
584  return eq(min(x[0],x[1]), x[0]);
585  }
587  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
588  Gecode::min(home, x[0], x[1], x[0]);
589  }
590  };
591 
593  class MinXYY : public Test {
594  public:
596  MinXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
597  : Test("Arithmetic::Min::Bin::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
599  virtual MaybeType solution(const Assignment& x) const {
600  return eq(min(x[0],x[1]), x[1]);
601  }
603  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
604  Gecode::min(home, x[0], x[1], x[1]);
605  }
606  };
607 
609  class MinXXX : public Test {
610  public:
612  MinXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
613  : Test("Arithmetic::Min::Bin::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
615  virtual MaybeType solution(const Assignment& x) const {
616  return eq(min(x[0],x[0]), x[0]);
617  }
619  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
620  Gecode::min(home, x[0], x[0], x[0]);
621  }
622  };
623 
625  class MaxXYZ : public Test {
626  public:
628  MaxXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
629  : Test("Arithmetic::Max::Bin::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
631  virtual MaybeType solution(const Assignment& x) const {
632  return eq(max(x[0],x[1]), x[2]);
633  }
635  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
636  if (flip())
637  Gecode::max(home, x[0], x[1], x[2]);
638  else
639  Gecode::rel(home, max(x[0], x[1]) == x[2]);
640  }
641  };
642 
644  class MaxXXY : public Test {
645  public:
647  MaxXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
648  : Test("Arithmetic::Max::Bin::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
650  virtual MaybeType solution(const Assignment& x) const {
651  return eq(max(x[0],x[0]), x[1]);
652  }
654  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
655  Gecode::max(home, x[0], x[0], x[1]);
656  }
657  };
658 
660  class MaxXYX : public Test {
661  public:
663  MaxXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
664  : Test("Arithmetic::Max::Bin::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
666  virtual MaybeType solution(const Assignment& x) const {
667  return eq(max(x[0],x[1]), x[0]);
668  }
670  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
671  Gecode::max(home, x[0], x[1], x[0]);
672  }
673  };
674 
676  class MaxXYY : public Test {
677  public:
679  MaxXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
680  : Test("Arithmetic::Max::Bin::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
682  virtual MaybeType solution(const Assignment& x) const {
683  return eq(max(x[0],x[1]), x[1]);
684  }
686  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
687  Gecode::max(home, x[0], x[1], x[1]);
688  }
689  };
690 
692  class MaxXXX : public Test {
693  public:
695  MaxXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
696  : Test("Arithmetic::Max::Bin::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
698  virtual MaybeType solution(const Assignment& x) const {
699  return eq(max(x[0],x[0]), x[0]);
700  }
702  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
703  Gecode::max(home, x[0], x[0], x[0]);
704  }
705  };
706 
708  class MinNary : public Test {
709  public:
711  MinNary(void)
712  : Test("Arithmetic::Min::Nary",4,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
714  virtual MaybeType solution(const Assignment& x) const {
715  return eq(min(min(x[0],x[1]),x[2]), x[3]);
716  }
718  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
720  m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
721  if (flip())
722  Gecode::min(home, m, x[3]);
723  else
724  Gecode::rel(home, min(m) == x[3]);
725  }
726  };
727 
729  class MinNaryShared : public Test {
730  public:
733  : Test("Arithmetic::Min::Nary::Shared",3,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
735  virtual MaybeType solution(const Assignment& x) const {
736  return eq(min(min(x[0],x[1]),x[2]), x[1]);
737  }
739  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
741  m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
742  Gecode::min(home, m, x[1]);
743  }
744  };
745 
747  class MaxNary : public Test {
748  public:
750  MaxNary(void)
751  : Test("Arithmetic::Max::Nary",4,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
753  virtual MaybeType solution(const Assignment& x) const {
754  return eq(max(max(x[0],x[1]),x[2]), x[3]);
755  }
757  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
759  m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
760  if (flip())
761  Gecode::max(home, m, x[3]);
762  else
763  Gecode::rel(home, max(m) == x[3]);
764  }
765  };
766 
768  class MaxNaryShared : public Test {
769  public:
772  : Test("Arithmetic::Max::Nary::Shared",3,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
774  virtual MaybeType solution(const Assignment& x) const {
775  return eq(max(max(x[0],x[1]),x[2]), x[1]);
776  }
778  virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
780  m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
781  Gecode::max(home, m, x[1]);
782  }
783  };
784 
785  const Gecode::FloatNum step = 0.15;
789 
793 
797 
801 
805 
809 
813 
817 
818  Div div_a("A",a,step);
819  Div div_b("B",b,step);
820  Div div_c("C",c,step);
821 
825 
829 
833 
837 
841 
845 
849 
853 
857 
861 
865 
869 
873 
877 
881 
885 
889 
893 
897 
901 
905 
909 
913 
917 
921 
925 
929 
933 
937 
941 
945 
949 
953 
957 
961 
965 
969 
975 
976  }
977 }}
978 
979 // STATISTICS: test-float
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:234
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:249
Float value type.
Definition: float.hh:334
Passing float variables.
Definition: float.hh:979
Float variable array.
Definition: float.hh:1030
Computation spaces.
Definition: core.hpp:1742
Test for absolute value constraint with shared variables
Definition: arithmetic.cpp:526
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:532
AbsXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:529
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:536
Test for absolute value constraint
Definition: arithmetic.cpp:507
AbsXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:510
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:513
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:517
Test for division constraint when solution is ensured
Definition: arithmetic.cpp:208
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:214
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:228
DivSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:211
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:218
Test for division constraint
Definition: arithmetic.cpp:189
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:199
Div(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:192
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:195
Test for n-ary maximum constraint with shared variables
Definition: arithmetic.cpp:768
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:778
MaxNaryShared(void)
Create and register test.
Definition: arithmetic.cpp:771
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:774
Test for n-ary maximum constraint
Definition: arithmetic.cpp:747
MaxNary(void)
Create and register test.
Definition: arithmetic.cpp:750
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:757
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:753
Test for binary maximum constraint with shared variables
Definition: arithmetic.cpp:692
MaxXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:695
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:702
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:698
Test for binary maximum constraint with shared variables
Definition: arithmetic.cpp:644
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:654
MaxXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:647
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:650
Test for binary maximum constraint with shared variables
Definition: arithmetic.cpp:660
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:666
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:670
MaxXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:663
Test for binary maximum constraint with shared variables
Definition: arithmetic.cpp:676
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:682
MaxXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:679
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:686
Test for binary maximum constraint
Definition: arithmetic.cpp:625
MaxXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:628
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:631
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:635
Test for n-ary minimmum constraint with shared variables
Definition: arithmetic.cpp:729
MinNaryShared(void)
Create and register test.
Definition: arithmetic.cpp:732
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:735
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:739
Test for n-ary minimmum constraint
Definition: arithmetic.cpp:708
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:714
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:718
MinNary(void)
Create and register test.
Definition: arithmetic.cpp:711
Test for binary minimum constraint with shared variables
Definition: arithmetic.cpp:609
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:615
MinXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:612
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:619
Test for binary minimum constraint with shared variables
Definition: arithmetic.cpp:561
MinXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:564
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:571
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:567
Test for binary minimum constraint with shared variables
Definition: arithmetic.cpp:577
MinXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:580
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:583
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:587
Test for binary minimum constraint with shared variables
Definition: arithmetic.cpp:593
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:599
MinXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:596
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:603
Test for binary minimum constraint
Definition: arithmetic.cpp:542
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:548
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:552
MinXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:545
Test for multiplication constraint with shared variables
Definition: arithmetic.cpp:173
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:183
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:179
MultXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:176
Test for multiplication constraint with shared variables when solution is ensured
Definition: arithmetic.cpp:115
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:125
MultXXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:118
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:121
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:135
Test for multiplication constraint with shared variables
Definition: arithmetic.cpp:99
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:109
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:105
MultXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:102
Test for multiplication constraint with shared variables
Definition: arithmetic.cpp:141
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:151
MultXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:144
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:147
Test for multiplication constraint with shared variables
Definition: arithmetic.cpp:157
MultXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:160
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:163
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:167
Test for multiplication constraint when solution is ensured
Definition: arithmetic.cpp:73
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:79
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:93
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:83
MultXYZSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:76
Test for multiplication constraint
Definition: arithmetic.cpp:54
MultXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:57
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:60
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:64
Test for nroot constraint with shared variables
Definition: arithmetic.cpp:488
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:501
NRootXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:492
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:495
Test for nroot constraint where solution is ensured
Definition: arithmetic.cpp:457
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:464
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:470
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:482
NRootXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:461
Test for nroot constraint
Definition: arithmetic.cpp:435
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:448
NRootXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:439
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:442
Test for pow constraint with shared variables
Definition: arithmetic.cpp:418
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:429
PowXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:422
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:425
Test for pow constraint where solution is ensured
Definition: arithmetic.cpp:391
PowXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:395
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:402
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:398
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:412
Test for pow constraint
Definition: arithmetic.cpp:371
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:378
PowXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:375
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:382
Test for squaring constraint with shared variables
Definition: arithmetic.cpp:279
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:289
SqrXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:282
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:285
Test for squaring constraint where solution is ensured
Definition: arithmetic.cpp:253
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:273
SqrXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:256
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:259
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:263
Test for squaring constraint
Definition: arithmetic.cpp:234
SqrXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:237
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:240
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:244
Test for square root constraint with shared variables
Definition: arithmetic.cpp:350
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:365
SqrtXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:353
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:356
Test for square root constraint where solution is ensured
Definition: arithmetic.cpp:319
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:325
SqrtXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:322
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Definition: arithmetic.cpp:334
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:344
Test for square root constraint
Definition: arithmetic.cpp:295
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Definition: arithmetic.cpp:310
SqrtXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Definition: arithmetic.cpp:298
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Definition: arithmetic.cpp:301
Base class for assignments
Definition: float.hh:80
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
Definition: float.hpp:268
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
Definition: float.hpp:235
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
Definition: float.hpp:194
bool flip(void)
Flip a coin and return true or false randomly.
Definition: float.hpp:273
Gecode::FloatVal dom
Domain of variables.
Definition: float.hh:249
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:43
double FloatNum
Floating point number base type.
Definition: float.hh:106
@ FRT_GQ
Greater or equal ( )
Definition: float.hh:1073
bool subset(const FloatVal &x, const FloatVal &y)
Definition: val.hpp:490
AbsXY abs_xy_b("B", b, step)
Div div_b("B", b, step)
SqrtXY sqrt_xy_b("B", b, step)
MinXYX min_xyx_b("B", b, step)
MultXYY mult_xyy_b("B", b, step)
AbsXY abs_xy_a("A", a, step)
PowXX pow_xx_b_3("B", b, 0, step)
MaxXYZ max_xyz_b("B", b, step)
MinXYY min_xyy_a("A", a, step)
MultXYY mult_xyy_c("C", c, step)
NRootXX nroot_xx_b_1("B", b, 2, step)
MaxXYZ max_xyz_c("C", c, step)
MinXXY min_xxy_c("C", c, step)
NRootXX nroot_xx_b_2("B", b, 3, step)
DivSol div_sol_a("A", a, step)
SqrtXYSol sqrt_xy_sol_a("A", a, step)
NRootXYSol nroot_xy_sol_c_3("C", c, 0, step)
SqrXYSol sqr_xy_sol_b("B", b, step)
AbsXX abs_xx_c("C", c, step)
PowXX pow_xx_b_2("B", b, 3, step)
Div div_c("C", c, step)
PowXYSol pow_xy_sol_b_1("B", b, 2, step)
MaxNaryShared max_s_nary
Definition: arithmetic.cpp:973
SqrXY sqr_xy_b("B", b, step)
PowXX pow_xx_c_1("C", c, 2, step)
SqrtXYSol sqrt_xy_sol_c("C", c, step)
Gecode::FloatVal c(-8, 8)
PowXY pow_xy_b_2("B", b, 3, step)
MultXXY mult_xxy_c("C", c, step)
NRootXX nroot_xx_a_2("A", a, 3, step)
PowXYSol pow_xy_sol_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_c_1("C", c, 2, step)
MinXYZ min_xyz_a("A", a, step)
NRootXYSol nroot_xy_sol_b_1("B", b, 2, step)
NRootXY nroot_xy_a_1("A", a, 2, step)
MaxXYX max_xyx_a("A", a, step)
MaxXYY max_xyy_a("A", a, step)
SqrtXX sqrt_xx_b("B", b, step)
SqrXX sqr_xx_c("C", c, step)
MinXYX min_xyx_a("A", a, step)
PowXX pow_xx_a_3("A", a, 0, step)
PowXY pow_xy_c_2("C", c, 3, step)
MultXYZ mult_xyz_b("B", b, step)
NRootXY nroot_xy_b_2("B", b, 3, step)
MultXYX mult_xyx_a("A", a, step)
MultXYZ mult_xyz_c("C", c, step)
MultXYZ mult_xyz_a("A", a, step)
MultXXX mult_xxx_c("C", c, step)
PowXYSol pow_xy_sol_a_1("A", a, 2, step)
MultXYZSol mult_xyz_sol_c("C", c, step)
NRootXY nroot_xy_b_3("B", b, 0, step)
MinXXX min_xxx_b("B", b, step)
MinXXY min_xxy_b("B", b, step)
NRootXY nroot_xy_c_1("C", c, 2, step)
MinXYY min_xyy_b("B", b, step)
MinXYY min_xyy_c("C", c, step)
NRootXX nroot_xx_c_3("C", c, 0, step)
NRootXY nroot_xy_c_2("C", c, 3, step)
MinXYX min_xyx_c("C", c, step)
SqrtXY sqrt_xy_c("C", c, step)
SqrXX sqr_xx_b("B", b, step)
SqrtXY sqrt_xy_a("A", a, step)
MaxXXY max_xxy_b("B", b, step)
PowXY pow_xy_b_3("B", b, 0, step)
NRootXX nroot_xx_a_3("A", a, 0, step)
SqrtXYSol sqrt_xy_sol_b("B", b, step)
Gecode::FloatVal b(9, 12)
MultXYX mult_xyx_b("B", b, step)
MaxXYZ max_xyz_a("A", a, step)
SqrXYSol sqr_xy_sol_a("A", a, step)
PowXYSol pow_xy_sol_b_2("B", b, 3, step)
NRootXYSol nroot_xy_sol_a_2("A", a, 3, step)
SqrXX sqr_xx_a("A", a, step)
PowXYSol pow_xy_sol_c_1("C", c, 2, step)
NRootXYSol nroot_xy_sol_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_c("C", c, step)
MaxXYY max_xyy_b("B", b, step)
PowXY pow_xy_a_1("A", a, 2, step)
SqrtXX sqrt_xx_a("A", a, step)
MaxXXX max_xxx_c("C", c, step)
PowXY pow_xy_a_2("A", a, 3, step)
NRootXYSol nroot_xy_sol_b_2("B", b, 3, step)
Gecode::FloatVal a(-8, 5)
SqrXY sqr_xy_c("C", c, step)
MultXXYSol mult_xxy_sol_b("B", b, step)
DivSol div_sol_c("C", c, step)
PowXX pow_xx_a_2("A", a, 3, step)
DivSol div_sol_b("B", b, step)
PowXY pow_xy_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_a_3("A", a, 0, step)
MaxXYX max_xyx_b("B", b, step)
MaxXXY max_xxy_c("C", c, step)
MinNaryShared min_s_nary
Definition: arithmetic.cpp:971
MaxXXX max_xxx_b("B", b, step)
PowXYSol pow_xy_sol_b_3("B", b, 0, step)
NRootXY nroot_xy_b_1("B", b, 2, step)
PowXYSol pow_xy_sol_a_2("A", a, 3, step)
MultXXY mult_xxy_b("B", b, step)
MinXXX min_xxx_c("C", c, step)
MultXYZSol mult_xyz_sol_b("B", b, step)
PowXY pow_xy_b_1("B", b, 2, step)
AbsXY abs_xy_c("C", c, step)
const Gecode::FloatNum step
Definition: arithmetic.cpp:785
MinXYZ min_xyz_b("B", b, step)
MultXYX mult_xyx_c("C", c, step)
MultXXX mult_xxx_a("A", a, step)
MinXYZ min_xyz_c("C", c, step)
NRootXX nroot_xx_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_a("A", a, step)
MaxXYY max_xyy_c("C", c, step)
MinXXX min_xxx_a("A", a, step)
PowXY pow_xy_a_3("A", a, 0, step)
NRootXY nroot_xy_a_2("A", a, 3, step)
PowXX pow_xx_b_1("B", b, 2, step)
MultXXY mult_xxy_a("A", a, step)
AbsXX abs_xx_b("B", b, step)
NRootXYSol nroot_xy_sol_a_1("A", a, 2, step)
PowXX pow_xx_c_2("C", c, 3, step)
MinXXY min_xxy_a("A", a, step)
Div div_a("A", a, step)
MultXYZSol mult_xyz_sol_a("A", a, step)
MaxXYX max_xyx_c("C", c, step)
NRootXYSol nroot_xy_sol_c_2("C", c, 3, step)
PowXY pow_xy_c_1("C", c, 2, step)
PowXYSol pow_xy_sol_a_3("A", a, 0, step)
MultXXX mult_xxx_b("B", b, step)
NRootXX nroot_xx_a_1("A", a, 2, step)
SqrXY sqr_xy_a("A", a, step)
SqrXYSol sqr_xy_sol_c("C", c, step)
NRootXX nroot_xx_c_2("C", c, 3, step)
PowXX pow_xx_c_3("C", c, 0, step)
SqrtXX sqrt_xx_c("C", c, step)
PowXYSol pow_xy_sol_c_2("C", c, 3, step)
NRootXX nroot_xx_c_1("C", c, 2, step)
MaxXXY max_xxy_a("A", a, step)
AbsXX abs_xx_a("A", a, step)
MultXYY mult_xyy_a("A", a, step)
PowXX pow_xx_a_1("A", a, 2, step)
NRootXY nroot_xy_c_3("C", c, 0, step)
MaxXXX max_xxx_a("A", a, step)
NRootXY nroot_xy_a_3("A", a, 0, step)
@ EXTEND_ASSIGNMENT
Definition: float.hh:64
@ CPLT_ASSIGNMENT
Definition: float.hh:62
MaybeType
Type for comparisons and solutions.
Definition: float.hh:51
@ MT_MAYBE
Definition: float.hh:54
@ MT_FALSE
Definition: float.hh:52
Gecode::IntSet d(v, 7)
General test support.
Definition: afc.cpp:39