Generated on Mon Jul 6 18:09:03 2009 for Gecode by doxygen 1.5.9

arithmetic.cpp

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: 2009-01-20 23:44:27 +0100 (Tue, 20 Jan 2009) $ by $Author: schulte $
00011  *     $Revision: 8082 $
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) {
00420          contest = CTL_BOUNDS_Z;
00421        }
00423        virtual bool solution(const Assignment& x) const {
00424          return std::max(x[0],x[1]) == x[2];
00425        }
00427        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00428          Gecode::max(home, x[0], x[1], x[2], icl);
00429        }
00430      };
00431 
00433      class MaxXXY : public Test {
00434      public:
00436        MaxXXY(const std::string& s, const Gecode::IntSet& d,
00437               Gecode::IntConLevel icl)
00438          : Test("Arithmetic::Max::Bin::XXY::"+str(icl)+"::"+s,2,d) {}
00440        virtual bool solution(const Assignment& x) const {
00441          return std::max(x[0],x[0]) == x[1];
00442        }
00444        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00445          Gecode::max(home, x[0], x[0], x[1], icl);
00446        }
00447      };
00448 
00450      class MaxXYX : public Test {
00451      public:
00453        MaxXYX(const std::string& s, const Gecode::IntSet& d,
00454               Gecode::IntConLevel icl)
00455          : Test("Arithmetic::Max::Bin::XYX::"+str(icl)+"::"+s,2,d) {}
00457        virtual bool solution(const Assignment& x) const {
00458          return std::max(x[0],x[1]) == x[0];
00459        }
00461        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00462          Gecode::max(home, x[0], x[1], x[0], icl);
00463        }
00464      };
00465 
00467      class MaxXYY : public Test {
00468      public:
00470        MaxXYY(const std::string& s, const Gecode::IntSet& d,
00471               Gecode::IntConLevel icl)
00472          : Test("Arithmetic::Max::Bin::XYY::"+str(icl)+"::"+s,2,d) {}
00474        virtual bool solution(const Assignment& x) const {
00475          return std::max(x[0],x[1]) == x[1];
00476        }
00478        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00479          Gecode::max(home, x[0], x[1], x[1], icl);
00480        }
00481      };
00482 
00484      class MaxXXX : public Test {
00485      public:
00487        MaxXXX(const std::string& s, const Gecode::IntSet& d,
00488               Gecode::IntConLevel icl)
00489          : Test("Arithmetic::Max::Bin::XXX::"+str(icl)+"::"+s,1,d) {}
00491        virtual bool solution(const Assignment& x) const {
00492          return std::max(x[0],x[0]) == x[0];
00493        }
00495        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00496          Gecode::max(home, x[0], x[0], x[0], icl);
00497        }
00498      };
00499 
00501      class MinNary : public Test {
00502      public:
00504        MinNary(Gecode::IntConLevel icl)
00505          : Test("Arithmetic::Min::Nary::"+str(icl),4,-4,4,false,icl) {}
00507        virtual bool solution(const Assignment& x) const {
00508          return std::min(std::min(x[0],x[1]), x[2]) == x[3];
00509        }
00511        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00512          Gecode::IntVarArgs m(3);
00513          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00514          Gecode::min(home, m, x[3], icl);
00515        }
00516      };
00517 
00519      class MinNaryShared : public Test {
00520      public:
00522        MinNaryShared(Gecode::IntConLevel icl)
00523          : Test("Arithmetic::Min::Nary::Shared::"+str(icl),3,-4,4,false,icl) {}
00525        virtual bool solution(const Assignment& x) const {
00526          return std::min(std::min(x[0],x[1]), x[2]) == x[1];
00527        }
00529        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00530          Gecode::IntVarArgs m(3);
00531          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00532          Gecode::min(home, m, x[1], icl);
00533        }
00534      };
00535 
00537      class MaxNary : public Test {
00538      public:
00540        MaxNary(Gecode::IntConLevel icl)
00541          : Test("Arithmetic::Max::Nary::"+str(icl),4,-4,4,false,icl) {}
00543        virtual bool solution(const Assignment& x) const {
00544          return std::max(std::max(x[0],x[1]), x[2]) == x[3];
00545        }
00547        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00548          Gecode::IntVarArgs m(3);
00549          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00550          Gecode::max(home, m, x[3], icl);
00551        }
00552      };
00553 
00555      class MaxNaryShared : public Test {
00556      public:
00558        MaxNaryShared(Gecode::IntConLevel icl)
00559          : Test("Arithmetic::Max::Nary::Shared::"+str(icl),3,-4,4,false,icl) {}
00561        virtual bool solution(const Assignment& x) const {
00562          return std::max(std::max(x[0],x[1]), x[2]) == x[1];
00563        }
00565        virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
00566          Gecode::IntVarArgs m(3);
00567          m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
00568          Gecode::max(home, m, x[1], icl);
00569        }
00570      };
00571 
00572 
00573 
00574      const int va[7] = {
00575        Gecode::Int::Limits::min, Gecode::Int::Limits::min+1,
00576        -1,0,1,
00577        Gecode::Int::Limits::max-1, Gecode::Int::Limits::max
00578      };
00579      const int vb[9] = {
00580        static_cast<int>(-sqrt(static_cast<double>
00581                               (-Gecode::Int::Limits::min))),
00582        -4,-2,-1,0,1,2,4,
00583        static_cast<int>(sqrt(static_cast<double>
00584                              (Gecode::Int::Limits::max)))
00585      };
00586 
00587      Gecode::IntSet a(va,7);
00588      Gecode::IntSet b(vb,9);
00589      Gecode::IntSet c(-8,8);
00590 
00591      MultXYZ mult_xyz_b_a("A",a,Gecode::ICL_BND);
00592      MultXYZ mult_xyz_b_b("B",b,Gecode::ICL_BND);
00593      MultXYZ mult_xyz_b_c("C",c,Gecode::ICL_BND);
00594 
00595      MultXXY mult_xxy_b_a("A",a,Gecode::ICL_BND);
00596      MultXXY mult_xxy_b_b("B",b,Gecode::ICL_BND);
00597      MultXXY mult_xxy_b_c("C",c,Gecode::ICL_BND);
00598 
00599      MultXYX mult_xyx_b_a("A",a,Gecode::ICL_BND);
00600      MultXYX mult_xyx_b_b("B",b,Gecode::ICL_BND);
00601      MultXYX mult_xyx_b_c("C",c,Gecode::ICL_BND);
00602 
00603      MultXYY mult_xyy_b_a("A",a,Gecode::ICL_BND);
00604      MultXYY mult_xyy_b_b("B",b,Gecode::ICL_BND);
00605      MultXYY mult_xyy_b_c("C",c,Gecode::ICL_BND);
00606 
00607      MultXXX mult_xxx_b_a("A",a,Gecode::ICL_BND);
00608      MultXXX mult_xxx_b_b("B",b,Gecode::ICL_BND);
00609      MultXXX mult_xxx_b_c("C",c,Gecode::ICL_BND);
00610 
00611      MultXYZ mult_xyz_d_a("A",a,Gecode::ICL_DOM);
00612      MultXYZ mult_xyz_d_b("B",b,Gecode::ICL_DOM);
00613      MultXYZ mult_xyz_d_c("C",c,Gecode::ICL_DOM);
00614 
00615      MultXXY mult_xxy_d_a("A",a,Gecode::ICL_DOM);
00616      MultXXY mult_xxy_d_b("B",b,Gecode::ICL_DOM);
00617      MultXXY mult_xxy_d_c("C",c,Gecode::ICL_DOM);
00618 
00619      MultXYX mult_xyx_d_a("A",a,Gecode::ICL_DOM);
00620      MultXYX mult_xyx_d_b("B",b,Gecode::ICL_DOM);
00621      MultXYX mult_xyx_d_c("C",c,Gecode::ICL_DOM);
00622 
00623      MultXYY mult_xyy_d_a("A",a,Gecode::ICL_DOM);
00624      MultXYY mult_xyy_d_b("B",b,Gecode::ICL_DOM);
00625      MultXYY mult_xyy_d_c("C",c,Gecode::ICL_DOM);
00626 
00627      MultXXX mult_xxx_d_a("A",a,Gecode::ICL_DOM);
00628      MultXXX mult_xxx_d_b("B",b,Gecode::ICL_DOM);
00629      MultXXX mult_xxx_d_c("C",c,Gecode::ICL_DOM);
00630 
00631      SqrXY sqr_xy_b_a("A",a,Gecode::ICL_BND);
00632      SqrXY sqr_xy_b_b("B",b,Gecode::ICL_BND);
00633      SqrXY sqr_xy_b_c("C",c,Gecode::ICL_BND);
00634      SqrXY sqr_xy_d_a("A",a,Gecode::ICL_DOM);
00635      SqrXY sqr_xy_d_b("B",b,Gecode::ICL_DOM);
00636      SqrXY sqr_xy_d_c("C",c,Gecode::ICL_DOM);
00637 
00638      SqrXX sqr_xx_b_a("A",a,Gecode::ICL_BND);
00639      SqrXX sqr_xx_b_b("B",b,Gecode::ICL_BND);
00640      SqrXX sqr_xx_b_c("C",c,Gecode::ICL_BND);
00641      SqrXX sqr_xx_d_a("A",a,Gecode::ICL_DOM);
00642      SqrXX sqr_xx_d_b("B",b,Gecode::ICL_DOM);
00643      SqrXX sqr_xx_d_c("C",c,Gecode::ICL_DOM);
00644 
00645      SqrtXY sqrt_xy_b_a("A",a,Gecode::ICL_BND);
00646      SqrtXY sqrt_xy_b_b("B",b,Gecode::ICL_BND);
00647      SqrtXY sqrt_xy_b_c("C",c,Gecode::ICL_BND);
00648      SqrtXY sqrt_xy_d_a("A",a,Gecode::ICL_DOM);
00649      SqrtXY sqrt_xy_d_b("B",b,Gecode::ICL_DOM);
00650      SqrtXY sqrt_xy_d_c("C",c,Gecode::ICL_DOM);
00651 
00652      SqrtXX sqrt_xx_b_a("A",a,Gecode::ICL_BND);
00653      SqrtXX sqrt_xx_b_b("B",b,Gecode::ICL_BND);
00654      SqrtXX sqrt_xx_b_c("C",c,Gecode::ICL_BND);
00655      SqrtXX sqrt_xx_d_a("A",a,Gecode::ICL_DOM);
00656      SqrtXX sqrt_xx_d_b("B",b,Gecode::ICL_DOM);
00657      SqrtXX sqrt_xx_d_c("C",c,Gecode::ICL_DOM);
00658 
00659      DivMod divmod_a_bnd("A",a);
00660      DivMod divmod_b_bnd("B",b);
00661      DivMod divmod_c_bnd("C",c);
00662 
00663      Div div_a_bnd("A",a);
00664      Div div_b_bnd("B",b);
00665      Div div_c_bnd("C",c);
00666 
00667      Mod mod_a_bnd("A",a);
00668      Mod mod_b_bnd("B",b);
00669      Mod mod_c_bnd("C",c);
00670 
00671      AbsXY abs_xy_b_a("A",a,Gecode::ICL_BND);
00672      AbsXY abs_xy_b_b("B",b,Gecode::ICL_BND);
00673      AbsXY abs_xy_b_c("C",c,Gecode::ICL_BND);
00674      AbsXY abs_xy_d_a("A",a,Gecode::ICL_DOM);
00675      AbsXY abs_xy_d_b("B",b,Gecode::ICL_DOM);
00676      AbsXY abs_xy_d_c("C",c,Gecode::ICL_DOM);
00677 
00678      AbsXX abs_xx_b_a("A",a,Gecode::ICL_BND);
00679      AbsXX abs_xx_b_b("B",b,Gecode::ICL_BND);
00680      AbsXX abs_xx_b_c("C",c,Gecode::ICL_BND);
00681      AbsXX abs_xx_d_a("A",a,Gecode::ICL_DOM);
00682      AbsXX abs_xx_d_b("B",b,Gecode::ICL_DOM);
00683      AbsXX abs_xx_d_c("C",c,Gecode::ICL_DOM);
00684 
00685      MinXYZ min_xyz_b_a("A",a,Gecode::ICL_BND);
00686      MinXYZ min_xyz_b_b("B",b,Gecode::ICL_BND);
00687      MinXYZ min_xyz_b_c("C",c,Gecode::ICL_BND);
00688      MinXYZ min_xyz_d_a("A",a,Gecode::ICL_DOM);
00689      MinXYZ min_xyz_d_b("B",b,Gecode::ICL_DOM);
00690      MinXYZ min_xyz_d_c("C",c,Gecode::ICL_DOM);
00691 
00692      MinXXY min_xxy_b_a("A",a,Gecode::ICL_BND);
00693      MinXXY min_xxy_b_b("B",b,Gecode::ICL_BND);
00694      MinXXY min_xxy_b_c("C",c,Gecode::ICL_BND);
00695      MinXXY min_xxy_d_a("A",a,Gecode::ICL_DOM);
00696      MinXXY min_xxy_d_b("B",b,Gecode::ICL_DOM);
00697      MinXXY min_xxy_d_c("C",c,Gecode::ICL_DOM);
00698 
00699      MinXYX min_xyx_b_a("A",a,Gecode::ICL_BND);
00700      MinXYX min_xyx_b_b("B",b,Gecode::ICL_BND);
00701      MinXYX min_xyx_b_c("C",c,Gecode::ICL_BND);
00702      MinXYX min_xyx_d_a("A",a,Gecode::ICL_DOM);
00703      MinXYX min_xyx_d_b("B",b,Gecode::ICL_DOM);
00704      MinXYX min_xyx_d_c("C",c,Gecode::ICL_DOM);
00705 
00706      MinXYY min_xyy_b_a("A",a,Gecode::ICL_BND);
00707      MinXYY min_xyy_b_b("B",b,Gecode::ICL_BND);
00708      MinXYY min_xyy_b_c("C",c,Gecode::ICL_BND);
00709      MinXYY min_xyy_d_a("A",a,Gecode::ICL_DOM);
00710      MinXYY min_xyy_d_b("B",b,Gecode::ICL_DOM);
00711      MinXYY min_xyy_d_c("C",c,Gecode::ICL_DOM);
00712 
00713      MinXXX min_xxx_b_a("A",a,Gecode::ICL_BND);
00714      MinXXX min_xxx_b_b("B",b,Gecode::ICL_BND);
00715      MinXXX min_xxx_b_c("C",c,Gecode::ICL_BND);
00716      MinXXX min_xxx_d_a("A",a,Gecode::ICL_DOM);
00717      MinXXX min_xxx_d_b("B",b,Gecode::ICL_DOM);
00718      MinXXX min_xxx_d_c("C",c,Gecode::ICL_DOM);
00719 
00720      MaxXYZ max_xyz_b_a("A",a,Gecode::ICL_BND);
00721      MaxXYZ max_xyz_b_b("B",b,Gecode::ICL_BND);
00722      MaxXYZ max_xyz_b_c("C",c,Gecode::ICL_BND);
00723      MaxXYZ max_xyz_d_a("A",a,Gecode::ICL_DOM);
00724      MaxXYZ max_xyz_d_b("B",b,Gecode::ICL_DOM);
00725      MaxXYZ max_xyz_d_c("C",c,Gecode::ICL_DOM);
00726 
00727      MaxXXY max_xxy_b_a("A",a,Gecode::ICL_BND);
00728      MaxXXY max_xxy_b_b("B",b,Gecode::ICL_BND);
00729      MaxXXY max_xxy_b_c("C",c,Gecode::ICL_BND);
00730      MaxXXY max_xxy_d_a("A",a,Gecode::ICL_DOM);
00731      MaxXXY max_xxy_d_b("B",b,Gecode::ICL_DOM);
00732      MaxXXY max_xxy_d_c("C",c,Gecode::ICL_DOM);
00733 
00734      MaxXYX max_xyx_b_a("A",a,Gecode::ICL_BND);
00735      MaxXYX max_xyx_b_b("B",b,Gecode::ICL_BND);
00736      MaxXYX max_xyx_b_c("C",c,Gecode::ICL_BND);
00737      MaxXYX max_xyx_d_a("A",a,Gecode::ICL_DOM);
00738      MaxXYX max_xyx_d_b("B",b,Gecode::ICL_DOM);
00739      MaxXYX max_xyx_d_c("C",c,Gecode::ICL_DOM);
00740 
00741      MaxXYY max_xyy_b_a("A",a,Gecode::ICL_BND);
00742      MaxXYY max_xyy_b_b("B",b,Gecode::ICL_BND);
00743      MaxXYY max_xyy_b_c("C",c,Gecode::ICL_BND);
00744      MaxXYY max_xyy_d_a("A",a,Gecode::ICL_DOM);
00745      MaxXYY max_xyy_d_b("B",b,Gecode::ICL_DOM);
00746      MaxXYY max_xyy_d_c("C",c,Gecode::ICL_DOM);
00747 
00748      MaxXXX max_xxx_b_a("A",a,Gecode::ICL_BND);
00749      MaxXXX max_xxx_b_b("B",b,Gecode::ICL_BND);
00750      MaxXXX max_xxx_b_c("C",c,Gecode::ICL_BND);
00751      MaxXXX max_xxx_d_a("A",a,Gecode::ICL_DOM);
00752      MaxXXX max_xxx_d_b("B",b,Gecode::ICL_DOM);
00753      MaxXXX max_xxx_d_c("C",c,Gecode::ICL_DOM);
00754 
00755      MinNary       min_nary_b(Gecode::ICL_BND);
00756      MinNary       min_nary_d(Gecode::ICL_DOM);
00757      MinNaryShared min_s_nary_b(Gecode::ICL_BND);
00758      MinNaryShared min_s_nary_d(Gecode::ICL_DOM);
00759      MaxNary       max_nary_b(Gecode::ICL_BND);
00760      MaxNary       max_nary_d(Gecode::ICL_DOM);
00761      MaxNaryShared max_s_nary_b(Gecode::ICL_BND);
00762      MaxNaryShared max_s_nary_d(Gecode::ICL_DOM);
00764 
00765    }
00766 }}
00767 
00768 // STATISTICS: test-int