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

Function vs2bsh

gecode/flatzinc/flatzinc.cpp:388–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386 }
387
388 int vs2bsh(BoolVarSpec* bs) {
389 if (bs->assigned) {
390 return bs->i;
391 }
392 if (bs->domain()) {
393 AST::SetLit* sl = bs->domain.some();
394 assert(sl->interval);
395 return std::max(0, std::min(1, sl->max));
396 }
397 return 1;
398 }
399
400 TieBreak<IntVarBranch> ann2ivarsel(AST::Node* ann, Rnd rnd, double decay) {
401 if (AST::Atom* s = dynamic_cast<AST::Atom*>(ann)) {

Callers 1

newBoolVarMethod · 0.85

Calls 4

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

Tested by

no test coverage detected