| 184 | |
| 185 | template<class Tracer> |
| 186 | void |
| 187 | BAB<Tracer>::constrain(const Space& b) { |
| 188 | m_search.acquire(); |
| 189 | if (best != nullptr) { |
| 190 | best->constrain(b); |
| 191 | if (best->status() != SS_FAILED) { |
| 192 | m_search.release(); |
| 193 | return; |
| 194 | } |
| 195 | delete best; |
| 196 | } |
| 197 | best = b.clone(); |
| 198 | // Announce better solutions |
| 199 | for (unsigned int i=0U; i<workers(); i++) |
| 200 | worker(i)->better(best); |
| 201 | m_search.release(); |
| 202 | } |
| 203 | |
| 204 | /* |
| 205 | * Actual work |