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

Method getAggregate

contribs/qecode/QCOPPlus.cc:195–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195OptVar* Qcop::getAggregate(int scope, OptVar* opt, Aggregator* agg) {
196 if (!Quantifiers[scope]) {cout<<"Try to get aggregate on existential scope"<<endl;abort();} // aggregateur sur existentiel
197 if (opt->getScope() < scope) {cout<<"aggregated variable out of aggregator scope"<<endl;abort();} // Variable aggr�g�e avant aggregateur
198 for (int i=scope+1; i<opt->getScope();i++) // Universelle entre aggregateur et variable aggr�g�e
199 if (Quantifiers[i])
200 {cout<<"Universal scope between variable and aggregator"<<endl;abort();}
201
202 UnivOptVar* zeopt = new UnivOptVar(scope,opt,agg);
203 optim[scope].vars.push_back(zeopt);
204 return zeopt;
205}
206
207
208OptVar* Qcop::getExistential(int var) {

Callers 3

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

getScopeMethod · 0.80

Tested by

no test coverage detected