| 166 | } |
| 167 | |
| 168 | int |
| 169 | TestSpace::rndvar(Gecode::Support::RandomGenerator& rand) { |
| 170 | assert(!assigned()); |
| 171 | // Select variable to be pruned |
| 172 | int i = static_cast<int>(rand(static_cast<unsigned int>(x.size()))); |
| 173 | while (x[i].assigned()) { |
| 174 | i = (i+1) % x.size(); |
| 175 | } |
| 176 | return i; |
| 177 | } |
| 178 | |
| 179 | void |
| 180 | TestSpace::rndrel(const Assignment& a, int i, Gecode::IntRelType& irt, int& v, |