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

Method getPosition

contribs/qecode/Strategy.cc:222–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222vector<int> Strategy::getPosition() {
223 vector<int> ret;
224 Strategy asc = *this;
225 while (!asc.isDummy()) {
226// cout<<"GetPosition adding "<<asc.values().size()<<" elements to a vector of size "<<ret.size()<<endl;
227 vector<int> ret2;
228 ret2.reserve(ret.size() + asc.values().size() +1);
229 for (int i=0;i<asc.values().size();i++) {
230 ret2.push_back(asc.values()[i]);
231 }
232 for (int i=0;i<ret.size();i++) {
233 ret2.push_back(ret[i]);
234 }
235 ret=ret2;
236 asc = asc.getFather();
237 }
238 return ret;
239}
240
241int Strategy::checkIntegrity() {
242 int ret=0;

Callers 2

updateTrueMethod · 0.80
updateFalseMethod · 0.80

Calls 3

valuesMethod · 0.80
getFatherMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected