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

Method updateTrue

contribs/qecode/WorkManager.cc:266–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266void WorkManager::updateTrue(Strategy s) { //called when s has a son who is a complete strategy
267 // cout<<" UT on ";
268 // vector<int> hihi = s.getPosition();
269 // if (hihi.empty()) cout<<"empty";
270 // for (int i=0;i< hihi.size();i++) cout<<hihi[i]<<" ";
271 // cout<<endl;
272
273
274 if (s.isComplete()) {
275 // cout<<" UT Complete ";
276 if (s.quantifier()) {
277 // cout<< " A ";
278 if (s.hasFather()) {
279 // cout<<" with father"<<endl;
280 updateTrue(s.getFather());
281 }
282 else {
283 // cout<<" without father"<<endl;
284 }
285 }
286 else {
287 // cout<<" E ";
288 if (s.hasFather()) {
289 // cout<<" with father"<<endl;
290 Strategy father = s.getFather();
291 while (father.degree() != 0) {
292 father.detach(father.degree()-1);
293 }
294 father.attach(s);
295 trashWorks(father.getPosition());
296 updateTrue(father);
297 }
298 else {
299 // cout<<" without father"<<endl;
300
301 }
302 }
303 }
304 else {
305 // cout<<" UT incomplete"<<endl;
306 }
307}
308
309void WorkManager::updateFalse(Strategy s) { // called when s is false
310 // cout<<" UF on ";

Callers

nothing calls this directly

Calls 7

hasFatherMethod · 0.80
getFatherMethod · 0.80
detachMethod · 0.80
attachMethod · 0.80
getPositionMethod · 0.80
quantifierMethod · 0.45
degreeMethod · 0.45

Tested by

no test coverage detected