branch.hh
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef __GECODE_TEST_BRANCH_HH__
00045 #define __GECODE_TEST_BRANCH_HH__
00046
00047 #include <gecode/kernel.hh>
00048
00049 #include <gecode/int.hh>
00050
00051 #ifdef GECODE_HAS_SET_VARS
00052 #include <gecode/set.hh>
00053 #endif
00054
00055 #ifdef GECODE_HAS_FLOAT_VARS
00056 #include <gecode/float.hh>
00057 #endif
00058
00059 #include "test/test.hh"
00060
00061 namespace Test {
00062
00064 namespace Branch {
00065
00070 class IntTest : public Base {
00071 protected:
00073 int arity;
00075 Gecode::IntSet dom;
00076 public:
00078 IntTest(const std::string& s, int a, const Gecode::IntSet& d);
00080 virtual bool run(void);
00082 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) = 0;
00083 };
00084
00089 class BoolTest : public Base {
00090 protected:
00092 int arity;
00093 public:
00095 BoolTest(const std::string& s, int a);
00097 virtual bool run(void);
00099 virtual void post(Gecode::Space& home, Gecode::BoolVarArray& x) = 0;
00100 };
00101
00102 #ifdef GECODE_HAS_SET_VARS
00103
00107 class SetTest : public Base {
00108 protected:
00110 int arity;
00112 Gecode::IntSet dom;
00113 public:
00115 SetTest(const std::string& s, int a, const Gecode::IntSet& d);
00117 virtual bool run(void);
00119 virtual void post(Gecode::Space& home, Gecode::SetVarArray& x) = 0;
00120 };
00121 #endif
00122
00123 #ifdef GECODE_HAS_FLOAT_VARS
00124
00128 class FloatTest : public Base {
00129 protected:
00131 int arity;
00133 Gecode::FloatVal dom;
00135 int nbSols;
00136 public:
00138 FloatTest(const std::string& s, int a, const Gecode::FloatVal& d, int nbs);
00140 virtual bool run(void);
00142 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) = 0;
00143 };
00144 #endif
00145
00146 }
00147
00148 }
00149
00150 #endif
00151
00152