Return choice
| 102 | } |
| 103 | /// Return choice |
| 104 | virtual Gecode::Choice* choice(Space&) { |
| 105 | Int::ViewValues<Int::IntView> iv(x[start]); |
| 106 | int n = iv.val(); |
| 107 | unsigned int min = x[n].size(); |
| 108 | ++iv; |
| 109 | // Choose the value with the fewest neighbors |
| 110 | while (iv()) { |
| 111 | if (x[iv.val()].size() < min) { |
| 112 | n = iv.val(); |
| 113 | min = x[n].size(); |
| 114 | } |
| 115 | ++iv; |
| 116 | } |
| 117 | return new Choice(*this, start, n); |
| 118 | } |
| 119 | /// Return choice |
| 120 | virtual Choice* choice(const Space&, Archive& e) { |
| 121 | int pos, val; |