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

Function getTheValues

contribs/qecode/Worker.cc:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25
26inline vector<int> getTheValues(MySpace* sol,int vmin,int vmax){
27 vector<int> zevalues;
28// cout<<sol<<" "<<vmin<<" "<<vmax<<endl;
29 if (vmax > (sol->nbVars())) cout<<"getTheValues mal appele"<<endl;
30 for (int i = vmin; i<=vmax;i++) {
31 // cout<<i<<" ";
32 // cout.flush();
33 switch (sol->type_of_v[i]) {
34 case VTYPE_INT :
35 zevalues.push_back( (static_cast<IntVar*>(sol->v[i]))->val() );
36 break;
37 case VTYPE_BOOL :
38 zevalues.push_back( (static_cast<BoolVar*>(sol->v[i]))->val() );
39 break;
40 default :
41 cout<<"4Unknown variable type"<<endl;
42 abort();
43 }
44 }
45// cout<<endl;
46
47 return zevalues;
48}
49
50
51QWorker::~QWorker() {

Callers 1

rsolveMethod · 0.70

Calls 1

valMethod · 0.45

Tested by

no test coverage detected