Generated on Mon Aug 25 11:35:35 2008 for Gecode by doxygen 1.5.6

arithmetic.cc

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Copyright:
00007  *     Christian Schulte, 2005
00008  *
00009  *  Last modified:
00010  *     $Date: 2008-07-11 10:52:20 +0200 (Fri, 11 Jul 2008) $ by $Author: tack $
00011  *     $Revision: 7351 $
00012  *
00013  *  This file is part of Gecode, the generic constraint
00014  *  development environment:
00015  *     http://www.gecode.org
00016  *
00017  *  Permission is hereby granted, free of charge, to any person obtaining
00018  *  a copy of this software and associated documentation files (the
00019  *  "Software"), to deal in the Software without restriction, including
00020  *  without limitation the rights to use, copy, modify, merge, publish,
00021  *  distribute, sublicense, and/or sell copies of the Software, and to
00022  *  permit persons to whom the Software is furnished to do so, subject to
00023  *  the following conditions:
00024  *
00025  *  The above copyright notice and this permission notice shall be
00026  *  included in all copies or substantial portions of the Software.
00027  *
00028  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00029  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00030  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00031  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00032  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00033  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00034  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  *
00036  */
00037 
00038 #include "test/int.hh"
00039 
00040 #include <cmath>
00041 #include <algorithm>
00042 
00043 namespace Test { namespace Int {
00044 
00046    namespace Arithmetic {
00047    
00053 
00054      class MultXYZ : public Test {
00055      public:
00057        MultXYZ(const std::string& s, const Gecode::IntSet& d,
00058                Gecode::IntConLevel icl)
00059          : Test("Arithmetic::Mult::XYZ::"+str(icl)+"::"+s,3,d,false,icl) {}
00061        virtual bool solution(const Assignment& x) const {
00062          double d0 = static_cast<double>(x[0]);
00063          double d1 = static_cast<double>(x[1]);
00064          double d2 = static_cast<double>(x[2]);
00065          return d0*d1 == d2;
00066        }
00068        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00069          Gecode::mult(home, x[0], x[1], x[2], icl);
00070        }
00071      };
00072    
00074      class MultXXY : public Test {
00075      public:
00077        MultXXY(const std::string& s, const Gecode::IntSet& d,
00078                Gecode::IntConLevel icl)
00079          : Test("Arithmetic::Mult::XXY::"+str(icl)+"::"+s,2,d,false,icl) {}
00081        virtual bool solution(const Assignment& x) const {
00082          double d0 = static_cast<double>(x[0]);
00083          double d1 = static_cast<double>(x[0]);
00084          double d2 = static_cast<double>(x[1]);
00085          return d0*d1 == d2;
00086        }
00088        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00089          Gecode::mult(home, x[0], x[0], x[1], icl);
00090        }
00091      };
00092    
00094      class MultXYX : public Test {
00095      public:
00097        MultXYX(const std::string& s, const Gecode::IntSet& d,
00098                Gecode::IntConLevel icl)
00099          : Test("Arithmetic::Mult::XYX::"+str(icl)+"::"+s,2,d,false,icl) {}
00101        virtual bool solution(const Assignment& x) const {
00102          double d0 = static_cast<double>(x[0]);
00103          double d1 = static_cast<double>(x[1]);
00104          double d2 = static_cast<double>(x[0]);
00105          return d0*d1 == d2;
00106        }
00108        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00109          Gecode::mult(home, x[0], x[1], x[0], icl);
00110        }
00111      };
00112    
00114      class MultXYY : public Test {
00115      public:
00117        MultXYY(const std::string& s, const Gecode::IntSet& d,
00118                Gecode::IntConLevel icl)
00119          : Test("Arithmetic::Mult::XYY::"+str(icl)+"::"+s,2,d,false,icl) {}
00121        virtual bool solution(const Assignment& x) const {
00122          double d0 = static_cast<double>(x[0]);
00123          double d1 = static_cast<double>(x[1]);
00124          double d2 = static_cast<double>(x[1]);
00125          return d0*d1 == d2;
00126        }
00128        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00129          Gecode::mult(home, x[0], x[1], x[1], icl);
00130        }
00131      };
00132    
00134      class MultXXX : public Test {
00135      public:
00137        MultXXX(const std::string& s, const Gecode::IntSet& d,
00138                Gecode::IntConLevel icl)
00139          : Test("Arithmetic::Mult::XXX::"+str(icl)+"::"+s,1,d,false,icl) {}
00141        virtual bool solution(const Assignment& x) const {
00142          double d0 = static_cast<double>(x[0]);
00143          double d1 = static_cast<double>(x[0]);
00144          double d2 = static_cast<double>(x[0]);
00145          return d0*d1 == d2;
00146        }
00148        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00149          Gecode::mult(home, x[0], x[0], x[0], icl);
00150        }
00151      };
00152    
00154      class SqrXY : public Test {
00155      public:
00157        SqrXY(const std::string& s, const Gecode::IntSet& d, 
00158              Gecode::IntConLevel icl)
00159          : Test("Arithmetic::Sqr::XY::"+str(icl)+"::"+s,2,d,false,icl) {}
00161        virtual bool solution(const Assignment& x) const {
00162          double d0 = static_cast<double>(x[0]);
00163          double d1 = static_cast<double>(x[1]);
00164          return d0*d0 == d1;
00165        }
00167        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00168          Gecode::sqr(home, x[0], x[1], icl);
00169        }
00170      };
00171    
00173      class SqrXX : public Test {
00174      public:
00176        SqrXX(const std::string& s, const Gecode::IntSet& d,
00177              Gecode::IntConLevel icl)
00178          : Test("Arithmetic::Sqr::XX::"+str(icl)+"::"+s,1,d,false,icl) {}
00180        virtual bool solution(const Assignment& x) const {
00181          double d0 = static_cast<double>(x[0]);
00182          return d0*d0 == d0;
00183        }
00185        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00186          Gecode::sqr(home, x[0], x[0], icl);
00187        }
00188      };
00189    
00191      class SqrtXY : public Test {
00192      public:
00194        SqrtXY(const std::string& s, const Gecode::IntSet& d,
00195               Gecode::IntConLevel icl)
00196          : Test("Arithmetic::Sqrt::XY::"+str(icl)+"::"+s,2,d,false,icl) {}
00198        virtual bool solution(const Assignment& x) const {
00199          double d0 = static_cast<double>(x[0]);
00200          double d1 = static_cast<double>(x[1]);
00201          return (d0 >= 0) && (d0 >= d1*d1) && (d0 < (d1+1)*(d1+1));
00202        }
00204        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00205          Gecode::sqrt(home, x[0], x[1], icl);
00206        }
00207      };
00208    
00210      class SqrtXX : public Test {
00211      public:
00213        SqrtXX(const std::string& s, const Gecode::IntSet& d,
00214               Gecode::IntConLevel icl)
00215          : Test("Arithmetic::Sqrt::XX::"+str(icl)+"::"+s,1,d,false,icl) {}
00217        virtual bool solution(const Assignment& x) const {
00218          double d0 = static_cast<double>(x[0]);
00219          return (d0 >= 0) && (d0 >= d0*d0) && (d0 < (d0+1)*(d0+1));
00220        }
00222        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00223          Gecode::sqrt(home, x[0], x[0], icl);
00224        }
00225      };
00226    
00228      class DivMod : public Test {
00229      private:
00230        static int abs(int a) { return a<0 ? -a:a; }
00231        static int sgn(int a) { return a<0 ? -1:1; }
00232      public:
00234        DivMod(const std::string& s, const Gecode::IntSet& d)
00235          : Test("Arithmetic::DivMod::"+s,4,d,false,icl) {}
00237        virtual bool solution(const Assignment& x) const {
00238          return x[0] == x[1]*x[2]+x[3] &&
00239                 abs(x[3]) < abs(x[1]) &&
00240                 (x[3] == 0 || sgn(x[3]) == sgn(x[1]));
00241        }
00243        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00244          Gecode::divmod(home, x[0], x[1], x[2], x[3], icl);
00245        }
00246      };
00247 
00249      class Div : public Test {
00250      public:
00252        Div(const std::string& s, const Gecode::IntSet& d)
00253          : Test("Arithmetic::Div::"+s,3,d,false,icl) {}
00255        virtual bool solution(const Assignment& x) const {
00256          if (x[1] == 0)
00257            return false;
00258          int divresult = 
00259            static_cast<int>(floor(static_cast<double>(x[0])/
00260                                   static_cast<double>(x[1])));
00261          return x[2] == divresult;
00262        }
00264        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00265          Gecode::div(home, x[0], x[1], x[2], icl);
00266        }
00267      };
00268 
00270      class Mod : public Test {
00271      public:
00273        Mod(const std::string& s, const Gecode::IntSet& d)
00274          : Test("Arithmetic::Mod::"+s,3,d,false,icl) {}
00276        virtual bool solution(const Assignment& x) const {
00277          if (x[1] == 0)
00278            return false;
00279          int divresult = 
00280            static_cast<int>(floor(static_cast<double>(x[0])/
00281                                   static_cast<double>(x[1])));
00282          return x[0] == x[1]*divresult+x[2];
00283        }
00285        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00286          Gecode::mod(home, x[0], x[1], x[2], icl);
00287        }
00288      };
00289    
00291      class AbsXY : public Test {
00292      public:
00294        AbsXY(const std::string& s, const Gecode::IntSet& d, 
00295              Gecode::IntConLevel icl)
00296          : Test("Arithmetic::Abs::XY::"+str(icl)+"::"+s,2,d,false,icl) {}
00298        virtual bool solution(const Assignment& x) const {
00299          double d0 = static_cast<double>(x[0]);
00300          double d1 = static_cast<double>(x[1]);
00301          return (d0<0 ? -d0 : d0) == d1;
00302        }
00304        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00305          Gecode::abs(home, x[0], x[1], icl);
00306        }
00307      };
00308    
00310      class AbsXX : public Test {
00311      public:
00313        AbsXX(const std::string& s, const Gecode::IntSet& d, 
00314              Gecode::IntConLevel icl)
00315          : Test("Arithmetic::Abs::XX::"+str(icl)+"::"+s,1,d,false,icl) {}
00317        virtual bool solution(const Assignment& x) const {
00318          double d0 = static_cast<double>(x[0]);
00319          double d1 = static_cast<double>(x[0]);
00320          return (d0<0 ? -d0 : d0) == d1;
00321        }
00323        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00324          Gecode::abs(home, x[0], x[0], icl);
00325        }
00326      };
00327    
00329      class MinXYZ : public Test {
00330      public:
00332        MinXYZ(const std::string& s, const Gecode::IntSet& d,
00333               Gecode::IntConLevel icl)
00334          : Test("Arithmetic::Min::Bin::XYZ::"+str(icl)+"::"+s,3,d,false,icl) {}
00336        virtual bool solution(const Assignment& x) const {
00337          return std::min(x[0],x[1]) == x[2];
00338        }
00340        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00341          Gecode::min(home, x[0], x[1], x[2], icl);
00342        }
00343      };
00344    
00346      class MinXXY : public Test {
00347      public:
00349        MinXXY(const std::string& s, const Gecode::IntSet& d,
00350               Gecode::IntConLevel icl)
00351          : Test("Arithmetic::Min::Bin::XYX::"+str(icl)+"::"+s,2,d) {}
00353        virtual bool solution(const Assignment& x) const {
00354          return std::min(x[0],x[0]) == x[1];
00355        }
00357        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00358          Gecode::min(home, x[0], x[0], x[1], icl);
00359        }
00360      };
00361    
00363      class MinXYX : public Test {
00364      public:
00366        MinXYX(const std::string& s, const Gecode::IntSet& d,
00367               Gecode::IntConLevel icl)
00368          : Test("Arithmetic::Min::Bin::XYX::"+str(icl)+"::"+s,2,d) {}
00370        virtual bool solution(const Assignment& x) const {
00371          return std::min(x[0],x[1]) == x[0];
00372        }
00374        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00375          Gecode::min(home, x[0], x[1], x[0], icl);
00376        }
00377      };
00378    
00380      class MinXYY : public Test {
00381      public:
00383        MinXYY(const std::string& s, const Gecode::IntSet& d,
00384               Gecode::IntConLevel icl)
00385          : Test("Arithmetic::Min::Bin::XYY::"+str(icl)+"::"+s,2,d) {}
00387        virtual bool solution(const Assignment& x) const {
00388          return std::min(x[0],x[1]) == x[1];
00389        }
00391        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00392          Gecode::min(home, x[0], x[1], x[1], icl);
00393        }
00394      };
00395    
00397      class MinXXX : public Test {
00398      public:
00400        MinXXX(const std::string& s, const Gecode::IntSet& d,
00401               Gecode::IntConLevel icl)
00402          : Test("Arithmetic::Min::Bin::XXX::"+str(icl)+"::"+s,1,d) {}
00404        virtual bool solution(const Assignment& x) const {
00405          return std::min(x[0],x[0]) == x[0];
00406        }
00408        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00409          Gecode::min(home, x[0], x[0], x[0], icl);
00410        }
00411      };
00412    
00414      class MaxXYZ : public Test {
00415      public:
00417        MaxXYZ(const std::string& s, const Gecode::IntSet& d,
00418               Gecode::IntConLevel icl)
00419          : Test("Arithmetic::Max::Bin::XYZ::"+str(icl)+"::"+s,3,d) {}
00421        virtual bool solution(const Assignment& x) const {
00422          return std::max(x[0],x[1]) == x[2];
00423        }
00425        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00426          Gecode::max(home, x[0], x[1], x[2], icl);
00427        }
00428      };
00429    
00431      class MaxXXY : public Test {
00432      public:
00434        MaxXXY(const std::string& s, const Gecode::IntSet& d,
00435               Gecode::IntConLevel icl)
00436          : Test("Arithmetic::Max::Bin::XXY::"+str(icl)+"::"+s,2,d) {}
00438        virtual bool solution(const Assignment& x) const {
00439          return std::max(x[0],x[0]) == x[1];
00440        }
00442        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00443          Gecode::max(home, x[0], x[0], x[1], icl);
00444        }
00445      };
00446    
00448      class MaxXYX : public Test {
00449      public:
00451        MaxXYX(const std::string& s, const Gecode::IntSet& d,
00452               Gecode::IntConLevel icl)
00453          : Test("Arithmetic::Max::Bin::XYX::"+str(icl)+"::"+s,2,d) {}
00455        virtual bool solution(const Assignment& x) const {
00456          return std::max(x[0],x[1]) == x[0];
00457        }
00459        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00460          Gecode::max(home, x[0], x[1], x[0], icl);
00461        }
00462      };
00463    
00465      class MaxXYY : public Test {
00466      public:
00468        MaxXYY(const std::string& s, const Gecode::IntSet& d,
00469               Gecode::IntConLevel icl)
00470          : Test("Arithmetic::Max::Bin::XYY::"+str(icl)+"::"+s,2,d) {}
00472        virtual bool solution(const Assignment& x) const {
00473          return std::max(x[0],x[1]) == x[1];
00474        }
00476        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00477          Gecode::max(home, x[0], x[1], x[1], icl);
00478        }
00479      };
00480    
00482      class MaxXXX : public Test {
00483      public:
00485        MaxXXX(const std::string& s, const Gecode::IntSet& d,
00486               Gecode::IntConLevel icl)
00487          : Test("Arithmetic::Max::Bin::XXX::"+str(icl)+"::"+s,1,d) {}
00489        virtual bool solution(const Assignment& x) const {
00490          return std::max(x[0],x[0]) == x[0];
00491        }
00493        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00494          Gecode::max(home, x[0], x[0], x[0], icl);
00495        }
00496      };
00497    
00499      class MinNary : public Test {
00500      public:
00502        MinNary(Gecode::IntConLevel icl) 
00503          : Test("Arithmetic::Min::Nary::"+str(icl),4,-4,4,false,icl) {}
00505        virtual bool solution(const Assignment& x) const {
00506          return std::min(std::min(x[0],x[1]), x[2]) == x[3];
00507        }
00509        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00510          Gecode::IntVarArgs m(3);
00511          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00512          Gecode::min(home, m, x[3], icl);
00513        }
00514      };
00515    
00517      class MinNaryShared : public Test {
00518      public:
00520        MinNaryShared(Gecode::IntConLevel icl) 
00521          : Test("Arithmetic::Min::Nary::Shared::"+str(icl),3,-4,4,false,icl) {}
00523        virtual bool solution(const Assignment& x) const {
00524          return std::min(std::min(x[0],x[1]), x[2]) == x[1];
00525        }
00527        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00528          Gecode::IntVarArgs m(3);
00529          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00530          Gecode::min(home, m, x[1], icl);
00531        }
00532      };
00533    
00535      class MaxNary : public Test {
00536      public:
00538        MaxNary(Gecode::IntConLevel icl) 
00539          : Test("Arithmetic::Max::Nary::"+str(icl),4,-4,4,false,icl) {}
00541        virtual bool solution(const Assignment& x) const {
00542          return std::max(std::max(x[0],x[1]), x[2]) == x[3];
00543        }
00545        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00546          Gecode::IntVarArgs m(3);
00547          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00548          Gecode::max(home, m, x[3], icl);
00549        }
00550      };
00551    
00553      class MaxNaryShared : public Test {
00554      public:
00556        MaxNaryShared(Gecode::IntConLevel icl) 
00557          : Test("Arithmetic::Max::Nary::Shared::"+str(icl),3,-4,4,false,icl) {}
00559        virtual bool solution(const Assignment& x) const {
00560          return std::max(std::max(x[0],x[1]), x[2]) == x[1];
00561        }
00563        virtual void post(Gecode::Space* home, Gecode::IntVarArray& x) {
00564          Gecode::IntVarArgs m(3);
00565          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00566          Gecode::max(home, m, x[1], icl);
00567        }
00568      };
00569    
00570    
00571    
00572      const int va[7] = {
00573        Gecode::Int::Limits::min, Gecode::Int::Limits::min+1,
00574        -1,0,1,
00575        Gecode::Int::Limits::max-1, Gecode::Int::Limits::max
00576      };
00577      const int vb[9] = {
00578        static_cast<int>(-sqrt(static_cast<double>
00579                               (-Gecode::Int::Limits::min))),
00580        -4,-2,-1,0,1,2,4,
00581        static_cast<int>(sqrt(static_cast<double>
00582                              (Gecode::Int::Limits::max)))
00583      };
00584      
00585      Gecode::IntSet a(va,7);
00586      Gecode::IntSet b(vb,9);
00587      Gecode::IntSet c(-8,8);
00588    
00589      MultXYZ mult_xyz_b_a("A",a,Gecode::ICL_BND);
00590      MultXYZ mult_xyz_b_b("B",b,Gecode::ICL_BND);
00591      MultXYZ mult_xyz_b_c("C",c,Gecode::ICL_BND);
00592    
00593      MultXXY mult_xxy_b_a("A",a,Gecode::ICL_BND);
00594      MultXXY mult_xxy_b_b("B",b,Gecode::ICL_BND);
00595      MultXXY mult_xxy_b_c("C",c,Gecode::ICL_BND);
00596    
00597      MultXYX mult_xyx_b_a("A",a,Gecode::ICL_BND);
00598      MultXYX mult_xyx_b_b("B",b,Gecode::ICL_BND);
00599      MultXYX mult_xyx_b_c("C",c,Gecode::ICL_BND);
00600    
00601      MultXYY mult_xyy_b_a("A",a,Gecode::ICL_BND);
00602      MultXYY mult_xyy_b_b("B",b,Gecode::ICL_BND);
00603      MultXYY mult_xyy_b_c("C",c,Gecode::ICL_BND);
00604    
00605      MultXXX mult_xxx_b_a("A",a,Gecode::ICL_BND);
00606      MultXXX mult_xxx_b_b("B",b,Gecode::ICL_BND);
00607      MultXXX mult_xxx_b_c("C",c,Gecode::ICL_BND);
00608    
00609      MultXYZ mult_xyz_d_a("A",a,Gecode::ICL_DOM);
00610      MultXYZ mult_xyz_d_b("B",b,Gecode::ICL_DOM);
00611      MultXYZ mult_xyz_d_c("C",c,Gecode::ICL_DOM);
00612    
00613      MultXXY mult_xxy_d_a("A",a,Gecode::ICL_DOM);
00614      MultXXY mult_xxy_d_b("B",b,Gecode::ICL_DOM);
00615      MultXXY mult_xxy_d_c("C",c,Gecode::ICL_DOM);
00616    
00617      MultXYX mult_xyx_d_a("A",a,Gecode::ICL_DOM);
00618      MultXYX mult_xyx_d_b("B",b,Gecode::ICL_DOM);
00619      MultXYX mult_xyx_d_c("C",c,Gecode::ICL_DOM);
00620    
00621      MultXYY mult_xyy_d_a("A",a,Gecode::ICL_DOM);
00622      MultXYY mult_xyy_d_b("B",b,Gecode::ICL_DOM);
00623      MultXYY mult_xyy_d_c("C",c,Gecode::ICL_DOM);
00624    
00625      MultXXX mult_xxx_d_a("A",a,Gecode::ICL_DOM);
00626      MultXXX mult_xxx_d_b("B",b,Gecode::ICL_DOM);
00627      MultXXX mult_xxx_d_c("C",c,Gecode::ICL_DOM);
00628    
00629      SqrXY sqr_xy_b_a("A",a,Gecode::ICL_BND);
00630      SqrXY sqr_xy_b_b("B",b,Gecode::ICL_BND);
00631      SqrXY sqr_xy_b_c("C",c,Gecode::ICL_BND);
00632      SqrXY sqr_xy_d_a("A",a,Gecode::ICL_DOM);
00633      SqrXY sqr_xy_d_b("B",b,Gecode::ICL_DOM);
00634      SqrXY sqr_xy_d_c("C",c,Gecode::ICL_DOM);
00635    
00636      SqrXX sqr_xx_b_a("A",a,Gecode::ICL_BND);
00637      SqrXX sqr_xx_b_b("B",b,Gecode::ICL_BND);
00638      SqrXX sqr_xx_b_c("C",c,Gecode::ICL_BND);
00639      SqrXX sqr_xx_d_a("A",a,Gecode::ICL_DOM);
00640      SqrXX sqr_xx_d_b("B",b,Gecode::ICL_DOM);
00641      SqrXX sqr_xx_d_c("C",c,Gecode::ICL_DOM);
00642    
00643      SqrtXY sqrt_xy_b_a("A",a,Gecode::ICL_BND);
00644      SqrtXY sqrt_xy_b_b("B",b,Gecode::ICL_BND);
00645      SqrtXY sqrt_xy_b_c("C",c,Gecode::ICL_BND);
00646      SqrtXY sqrt_xy_d_a("A",a,Gecode::ICL_DOM);
00647      SqrtXY sqrt_xy_d_b("B",b,Gecode::ICL_DOM);
00648      SqrtXY sqrt_xy_d_c("C",c,Gecode::ICL_DOM);
00649    
00650      SqrtXX sqrt_xx_b_a("A",a,Gecode::ICL_BND);
00651      SqrtXX sqrt_xx_b_b("B",b,Gecode::ICL_BND);
00652      SqrtXX sqrt_xx_b_c("C",c,Gecode::ICL_BND);
00653      SqrtXX sqrt_xx_d_a("A",a,Gecode::ICL_DOM);
00654      SqrtXX sqrt_xx_d_b("B",b,Gecode::ICL_DOM);
00655      SqrtXX sqrt_xx_d_c("C",c,Gecode::ICL_DOM);
00656    
00657      DivMod divmod_a_bnd("A",a);
00658      DivMod divmod_b_bnd("B",b);
00659      DivMod divmod_c_bnd("C",c);
00660 
00661      Div div_a_bnd("A",a);
00662      Div div_b_bnd("B",b);
00663      Div div_c_bnd("C",c);
00664                         
00665      Mod mod_a_bnd("A",a);
00666      Mod mod_b_bnd("B",b);
00667      Mod mod_c_bnd("C",c);
00668    
00669      AbsXY abs_xy_b_a("A",a,Gecode::ICL_BND);
00670      AbsXY abs_xy_b_b("B",b,Gecode::ICL_BND);
00671      AbsXY abs_xy_b_c("C",c,Gecode::ICL_BND);
00672      AbsXY abs_xy_d_a("A",a,Gecode::ICL_DOM);
00673      AbsXY abs_xy_d_b("B",b,Gecode::ICL_DOM);
00674      AbsXY abs_xy_d_c("C",c,Gecode::ICL_DOM);
00675 
00676      AbsXX abs_xx_b_a("A",a,Gecode::ICL_BND);
00677      AbsXX abs_xx_b_b("B",b,Gecode::ICL_BND);
00678      AbsXX abs_xx_b_c("C",c,Gecode::ICL_BND);
00679      AbsXX abs_xx_d_a("A",a,Gecode::ICL_DOM);
00680      AbsXX abs_xx_d_b("B",b,Gecode::ICL_DOM);
00681      AbsXX abs_xx_d_c("C",c,Gecode::ICL_DOM);
00682    
00683      MinXYZ min_xyz_b_a("A",a,Gecode::ICL_BND);
00684      MinXYZ min_xyz_b_b("B",b,Gecode::ICL_BND);
00685      MinXYZ min_xyz_b_c("C",c,Gecode::ICL_BND);
00686      MinXYZ min_xyz_d_a("A",a,Gecode::ICL_DOM);
00687      MinXYZ min_xyz_d_b("B",b,Gecode::ICL_DOM);
00688      MinXYZ min_xyz_d_c("C",c,Gecode::ICL_DOM);
00689    
00690      MinXXY min_xxy_b_a("A",a,Gecode::ICL_BND);
00691      MinXXY min_xxy_b_b("B",b,Gecode::ICL_BND);
00692      MinXXY min_xxy_b_c("C",c,Gecode::ICL_BND);
00693      MinXXY min_xxy_d_a("A",a,Gecode::ICL_DOM);
00694      MinXXY min_xxy_d_b("B",b,Gecode::ICL_DOM);
00695      MinXXY min_xxy_d_c("C",c,Gecode::ICL_DOM);
00696    
00697      MinXYX min_xyx_b_a("A",a,Gecode::ICL_BND);
00698      MinXYX min_xyx_b_b("B",b,Gecode::ICL_BND);
00699      MinXYX min_xyx_b_c("C",c,Gecode::ICL_BND);
00700      MinXYX min_xyx_d_a("A",a,Gecode::ICL_DOM);
00701      MinXYX min_xyx_d_b("B",b,Gecode::ICL_DOM);
00702      MinXYX min_xyx_d_c("C",c,Gecode::ICL_DOM);
00703    
00704      MinXYY min_xyy_b_a("A",a,Gecode::ICL_BND);
00705      MinXYY min_xyy_b_b("B",b,Gecode::ICL_BND);
00706      MinXYY min_xyy_b_c("C",c,Gecode::ICL_BND);
00707      MinXYY min_xyy_d_a("A",a,Gecode::ICL_DOM);
00708      MinXYY min_xyy_d_b("B",b,Gecode::ICL_DOM);
00709      MinXYY min_xyy_d_c("C",c,Gecode::ICL_DOM);
00710    
00711      MinXXX min_xxx_b_a("A",a,Gecode::ICL_BND);
00712      MinXXX min_xxx_b_b("B",b,Gecode::ICL_BND);
00713      MinXXX min_xxx_b_c("C",c,Gecode::ICL_BND);
00714      MinXXX min_xxx_d_a("A",a,Gecode::ICL_DOM);
00715      MinXXX min_xxx_d_b("B",b,Gecode::ICL_DOM);
00716      MinXXX min_xxx_d_c("C",c,Gecode::ICL_DOM);
00717    
00718      MaxXYZ max_xyz_b_a("A",a,Gecode::ICL_BND);
00719      MaxXYZ max_xyz_b_b("B",b,Gecode::ICL_BND);
00720      MaxXYZ max_xyz_b_c("C",c,Gecode::ICL_BND);
00721      MaxXYZ max_xyz_d_a("A",a,Gecode::ICL_DOM);
00722      MaxXYZ max_xyz_d_b("B",b,Gecode::ICL_DOM);
00723      MaxXYZ max_xyz_d_c("C",c,Gecode::ICL_DOM);
00724    
00725      MaxXXY max_xxy_b_a("A",a,Gecode::ICL_BND);
00726      MaxXXY max_xxy_b_b("B",b,Gecode::ICL_BND);
00727      MaxXXY max_xxy_b_c("C",c,Gecode::ICL_BND);
00728      MaxXXY max_xxy_d_a("A",a,Gecode::ICL_DOM);
00729      MaxXXY max_xxy_d_b("B",b,Gecode::ICL_DOM);
00730      MaxXXY max_xxy_d_c("C",c,Gecode::ICL_DOM);
00731    
00732      MaxXYX max_xyx_b_a("A",a,Gecode::ICL_BND);
00733      MaxXYX max_xyx_b_b("B",b,Gecode::ICL_BND);
00734      MaxXYX max_xyx_b_c("C",c,Gecode::ICL_BND);
00735      MaxXYX max_xyx_d_a("A",a,Gecode::ICL_DOM);
00736      MaxXYX max_xyx_d_b("B",b,Gecode::ICL_DOM);
00737      MaxXYX max_xyx_d_c("C",c,Gecode::ICL_DOM);
00738    
00739      MaxXYY max_xyy_b_a("A",a,Gecode::ICL_BND);
00740      MaxXYY max_xyy_b_b("B",b,Gecode::ICL_BND);
00741      MaxXYY max_xyy_b_c("C",c,Gecode::ICL_BND);
00742      MaxXYY max_xyy_d_a("A",a,Gecode::ICL_DOM);
00743      MaxXYY max_xyy_d_b("B",b,Gecode::ICL_DOM);
00744      MaxXYY max_xyy_d_c("C",c,Gecode::ICL_DOM);
00745    
00746      MaxXXX max_xxx_b_a("A",a,Gecode::ICL_BND);
00747      MaxXXX max_xxx_b_b("B",b,Gecode::ICL_BND);
00748      MaxXXX max_xxx_b_c("C",c,Gecode::ICL_BND);
00749      MaxXXX max_xxx_d_a("A",a,Gecode::ICL_DOM);
00750      MaxXXX max_xxx_d_b("B",b,Gecode::ICL_DOM);
00751      MaxXXX max_xxx_d_c("C",c,Gecode::ICL_DOM);
00752    
00753      MinNary       min_nary_b(Gecode::ICL_BND);
00754      MinNary       min_nary_d(Gecode::ICL_DOM);
00755      MinNaryShared min_s_nary_b(Gecode::ICL_BND);
00756      MinNaryShared min_s_nary_d(Gecode::ICL_DOM);
00757      MaxNary       max_nary_b(Gecode::ICL_BND);
00758      MaxNary       max_nary_d(Gecode::ICL_DOM);
00759      MaxNaryShared max_s_nary_b(Gecode::ICL_BND);
00760      MaxNaryShared max_s_nary_d(Gecode::ICL_DOM);
00762    
00763    }
00764 }}
00765 
00766 // STATISTICS: test-int