| 267 | } |
| 268 | |
| 269 | void |
| 270 | TestSpace::assign(const Assignment& a, MaybeType& sol, bool skip, Gecode::Support::RandomGenerator& rand) { |
| 271 | using namespace Gecode; |
| 272 | int i = skip ? static_cast<int>(rand(a.size())) : -1; |
| 273 | |
| 274 | for (int j=a.size(); j--; ) |
| 275 | if (i != j) { |
| 276 | if ((x[j].min() == a[j].max()) || (x[j].max() == a[j].min())) |
| 277 | { |
| 278 | sol = MT_MAYBE; |
| 279 | return; |
| 280 | } |
| 281 | rel(j, FRT_EQ, a[j]); |
| 282 | if (Base::fixpoint(rand) && failed()) |
| 283 | return; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | void |
| 288 | TestSpace::bound(Gecode::Support::RandomGenerator& rand) { |