MCPcopy Create free account
hub / github.com/Gecode/gecode / constrain

Method constrain

gecode/search/par/bab.hpp:186–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

betterMethod · 0.45
solutionMethod · 0.45
findMethod · 0.45

Calls 5

betterMethod · 0.80
acquireMethod · 0.45
statusMethod · 0.45
releaseMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected