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

Function vs2bsl

gecode/flatzinc/flatzinc.cpp:376–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374 }
375
376 int vs2bsl(BoolVarSpec* bs) {
377 if (bs->assigned) {
378 return bs->i;
379 }
380 if (bs->domain()) {
381 AST::SetLit* sl = bs->domain.some();
382 assert(sl->interval);
383 return std::min(1, std::max(0, sl->min));
384 }
385 return 0;
386 }
387
388 int vs2bsh(BoolVarSpec* bs) {
389 if (bs->assigned) {

Callers 1

newBoolVarMethod · 0.85

Calls 4

someMethod · 0.80
minFunction · 0.50
maxFunction · 0.50
domainMethod · 0.45

Tested by

no test coverage detected