42 namespace Test {
namespace Assign {
54 : Gecode::
Space(share,s) {
70 :
x(*this, n, 0, 1) {}
73 : Gecode::
Space(share,s) {
82 #ifdef GECODE_HAS_SET_VARS
91 :
x(*this, n, Gecode::IntSet::empty, d) {}
94 : Gecode::
Space(share,s) {
118 const int n_int_assign =
121 const char* int_assign_name[] = {
130 :
Base(
"Int::Assign::"+s), arity(a),
dom(d) {
135 using namespace Gecode;
137 post(*root, root->x);
138 (void) root->status();
140 for (
int val = n_int_assign; val--; ) {
145 assign(*clone, clone->
x, int_assign[val]);
152 delete s; solutions++;
154 if (solutions != 1) {
155 std::cout <<
"FAILURE" << std::endl
156 <<
"\tc_d=" << o.
c_d <<
", a_d=" << o.
a_d << std::endl
157 <<
"\t" << int_assign_name[val] << std::endl;
172 using namespace Gecode;
174 post(*root, root->x);
175 (void) root->status();
177 for (
int val = n_int_assign; val--; ) {
182 assign(*clone, clone->
x, int_assign[val]);
189 delete s; solutions++;
191 if (solutions != 1) {
192 std::cout <<
"FAILURE" << std::endl
193 <<
"\tc_d=" << o.
c_d <<
", a_d=" << o.
a_d << std::endl
194 <<
"\t" << int_assign_name[val] << std::endl;
203 #ifdef GECODE_HAS_SET_VARS
222 const int n_set_assign =
225 const char* set_assign_name[] = {
226 "SET_ASSIGN_MIN_INC",
227 "SET_ASSIGN_MIN_EXC",
228 "SET_ASSIGN_MED_INC",
229 "SET_ASSIGN_MED_EXC",
230 "SET_ASSIGN_MAX_INC",
231 "SET_ASSIGN_MAX_EXC",
232 "SET_ASSIGN_RND_INC",
243 using namespace Gecode;
245 post(*root, root->x);
246 (void) root->status();
248 for (
int val = n_int_assign; val--; ) {
253 assign(*clone, clone->
x, set_assign[val]);
260 delete s; solutions++;
262 if (solutions != 1) {
263 std::cout <<
"FAILURE" << std::endl
264 <<
"\tc_d=" << o.
c_d <<
", a_d=" << o.
a_d << std::endl
265 <<
"\t" << set_assign_name[val] << std::endl;