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

Method arg2intargs

gecode/flatzinc/flatzinc.cpp:2307–2316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2305 }
2306
2307 IntArgs
2308 FlatZincSpace::arg2intargs(AST::Node* arg, int offset) {
2309 AST::Array* a = arg->getArray();
2310 IntArgs ia(a->a.size()+offset);
2311 for (int i=offset; i--;)
2312 ia[i] = 0;
2313 for (int i=a->a.size(); i--;)
2314 ia[i+offset] = a->a[i]->getInt();
2315 return ia;
2316 }
2317 TupleSet
2318 FlatZincSpace::arg2tupleset(const IntArgs& a, int noOfVars) {
2319 int noOfTuples = a.size() == 0 ? 0 : (a.size()/noOfVars);

Callers 15

p_int_lin_CMPFunction · 0.80
p_int_lin_CMP_reifFunction · 0.80
p_bool_lin_CMPFunction · 0.80
p_bool_lin_CMP_reifFunction · 0.80
p_bin_packing_loadFunction · 0.80
p_global_cardinalityFunction · 0.80
p_regularFunction · 0.80
p_regular_setFunction · 0.80
p_table_intFunction · 0.80

Calls 3

getArrayMethod · 0.80
getIntMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected