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

Method getSpace

contribs/qecode/QCOPPlus.cc:228–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227
228MySpace* Qcop::getSpace(int scope) {
229 if (scope<0 || scope>nbSpaces) {
230 cout<<"I return NULL coz of bad scope value (<0)"<<endl;
231 return NULL;
232 }
233 if (scope==nbSpaces) {
234 if (goal->status() == SS_FAILED) {
235 cout<<"I return NULL coz goal is failed"<<endl;
236 return NULL;
237 }
238 // cout<<"I return the goal"<<endl;
239 return static_cast<MySpace*>(goal->clone());
240 }
241 if (rules[scope]->status() == SS_FAILED) {
242 cout<<"I return NULL coz scope "<<scope<<" is failed"<<endl;
243 return NULL;
244 }
245 // cout<<"I return the rule "<<scope<<endl;
246 return (static_cast<MySpace*>(rules[scope]->clone()));
247}
248
249
250MySpace* Qcop::getGoal() {

Callers 6

rsolveMethod · 0.45
solveMethod · 0.45
rSolveMethod · 0.45
rSolveMethod · 0.45
rSolveMethod · 0.45
WorkManagerMethod · 0.45

Calls 2

statusMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected