Check status of brancher, return true if alternatives left
| 91 | public: |
| 92 | /// Check status of brancher, return true if alternatives left |
| 93 | virtual bool status(const Space&) const { |
| 94 | // A path to follow can be at most x.size() long |
| 95 | for (int n=x.size(); n--; ) { |
| 96 | if (!x[start].assigned()) |
| 97 | return true; |
| 98 | // Follow path of assigned variables |
| 99 | start = x[start].val(); |
| 100 | } |
| 101 | return false; |
| 102 | } |
| 103 | /// Return choice |
| 104 | virtual Gecode::Choice* choice(Space&) { |
| 105 | Int::ViewValues<Int::IntView> iv(x[start]); |