Generated on Thu Apr 11 13:59:21 2019 for Gecode by doxygen 1.6.3

assign.hh

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  *  Contributing authors:
00007  *     Vincent Barichard <Vincent.Barichard@univ-angers.fr>
00008  *
00009  *  Copyright:
00010  *     Christian Schulte, 2008
00011  *     Vincent Barichard, 2012
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 #ifndef __GECODE_TEST_ASSIGN_HH__
00039 #define __GECODE_TEST_ASSIGN_HH__
00040 
00041 #include <gecode/kernel.hh>
00042 #include <gecode/int.hh>
00043 #ifdef GECODE_HAS_SET_VARS
00044 #include <gecode/set.hh>
00045 #endif
00046 #ifdef GECODE_HAS_FLOAT_VARS
00047 #include <gecode/float.hh>
00048 #endif
00049 
00050 #include "test/test.hh"
00051 
00052 namespace Test {
00053 
00055   namespace Assign {
00056 
00061     class IntTest : public Base {
00062     protected:
00064       int arity;
00066       Gecode::IntSet dom;
00067     public:
00069       IntTest(const std::string& s, int a, const Gecode::IntSet& d);
00071       virtual bool run(void);
00073       virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) = 0;
00074     };
00075 
00080     class BoolTest : public Base {
00081     protected:
00083       int arity;
00084     public:
00086       BoolTest(const std::string& s, int a);
00088       virtual bool run(void);
00090       virtual void post(Gecode::Space& home, Gecode::BoolVarArray& x) = 0;
00091     };
00092 
00093 #ifdef GECODE_HAS_SET_VARS
00094 
00099     class SetTest : public Base {
00100     protected:
00102       int arity;
00104       Gecode::IntSet dom;
00105     public:
00107       SetTest(const std::string& s, int a, const Gecode::IntSet& d);
00109       virtual bool run(void);
00111       virtual void post(Gecode::Space& home, Gecode::SetVarArray& x) = 0;
00112     };
00113 
00114 #endif
00115 
00116 #ifdef GECODE_HAS_FLOAT_VARS
00117 
00122     class FloatTest : public Base {
00123     protected:
00125       int arity;
00127       Gecode::FloatVal dom;
00128     public:
00130       FloatTest(const std::string& s, int a, const Gecode::FloatVal& d);
00132       virtual bool run(void);
00134       virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) = 0;
00135     };
00136 
00137 #endif
00138 
00139   }
00140 
00141 }
00142 
00143 #endif
00144 
00145 // STATISTICS: test-branch