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

Method arg2intset

gecode/flatzinc/flatzinc.cpp:2381–2395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2379 return sia;
2380 }
2381 IntSet
2382 FlatZincSpace::arg2intset(AST::Node* n) {
2383 AST::SetLit* sl = n->getSet();
2384 IntSet d;
2385 if (sl->interval) {
2386 d = IntSet(sl->min, sl->max);
2387 } else {
2388 Region re;
2389 int* is = re.alloc<int>(static_cast<unsigned long int>(sl->s.size()));
2390 for (int i=sl->s.size(); i--; )
2391 is[i] = sl->s[i];
2392 d = IntSet(is, sl->s.size());
2393 }
2394 return d;
2395 }
2396 IntSetArgs
2397 FlatZincSpace::arg2intsetargs(AST::Node* arg, int offset) {
2398 AST::Array* a = arg->getArray();

Callers 9

p_array_int_element2dFunction · 0.80
p_array_bool_element2dFunction · 0.80
p_int_inFunction · 0.80
p_int_in_reifFunction · 0.80
p_int_in_impFunction · 0.80
p_among_seq_intFunction · 0.80
p_amongFunction · 0.80
p_set_inFunction · 0.80

Calls 3

IntSetClass · 0.85
getSetMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected