| 371 | } |
| 372 | |
| 373 | bool |
| 374 | SetTestSpace::same(SetTestSpace& c) { |
| 375 | if (opt.log) |
| 376 | olog << ind(3) << "Testing whether enabled space is the same" |
| 377 | << std::endl; |
| 378 | bool f = failed(); |
| 379 | bool cf = c.failed(); |
| 380 | if (f != cf) |
| 381 | return false; |
| 382 | if (f) |
| 383 | return true; |
| 384 | |
| 385 | for (int i=x.size(); i--; ) |
| 386 | if (x[i].glbSize() != c.x[i].glbSize() || |
| 387 | x[i].lubSize() != c.x[i].lubSize() || |
| 388 | x[i].cardMin() != c.x[i].cardMin() || |
| 389 | x[i].cardMax() != c.x[i].cardMax()) |
| 390 | return false; |
| 391 | |
| 392 | for (int i=y.size(); i--; ) |
| 393 | if (y[i].size() != c.y[i].size()) |
| 394 | return false; |
| 395 | |
| 396 | if (reified && (r.var().size() != c.r.var().size())) |
| 397 | return false; |
| 398 | if (opt.log) |
| 399 | olog << ind(3) << "Finished testing whether enabled space is the same" |
| 400 | << std::endl; |
| 401 | return true; |
| 402 | } |
| 403 | |
| 404 | bool |
| 405 | SetTestSpace::prune(const SetAssignment& a, Gecode::Support::RandomGenerator& rand) { |