| 252 | } |
| 253 | |
| 254 | void |
| 255 | TestSpace::assign(const Assignment& a, bool skip, Gecode::Support::RandomGenerator& rand) { |
| 256 | using namespace Gecode; |
| 257 | int i = skip ? |
| 258 | static_cast<int>(rand(static_cast<unsigned int>(a.size()))) : -1; |
| 259 | for (int j=a.size(); j--; ) |
| 260 | if (i != j) { |
| 261 | rel(j, IRT_EQ, a[j]); |
| 262 | if (Base::fixpoint(rand) && failed()) |
| 263 | return; |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | void |
| 268 | TestSpace::bound(Gecode::Support::RandomGenerator& rand) { |