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

Function ann2asnivalsel

gecode/flatzinc/flatzinc.cpp:500–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498 }
499
500 IntAssign ann2asnivalsel(AST::Node* ann, Rnd rnd) {
501 if (AST::Atom* s = dynamic_cast<AST::Atom*>(ann)) {
502 if (s->id == "indomain_min")
503 return INT_ASSIGN_MIN();
504 if (s->id == "indomain_max")
505 return INT_ASSIGN_MAX();
506 if (s->id == "indomain_median")
507 return INT_ASSIGN_MED();
508 if (s->id == "indomain_random") {
509 return INT_ASSIGN_RND(rnd);
510 }
511 }
512 std::cerr << "Warning, ignored search annotation: ";
513 ann->print(std::cerr);
514 std::cerr << std::endl;
515 return INT_ASSIGN_MIN();
516 }
517
518 TieBreak<BoolVarBranch> ann2bvarsel(AST::Node* ann, Rnd rnd, double decay) {
519 if (AST::Atom* s = dynamic_cast<AST::Atom*>(ann)) {

Callers 1

createBranchersMethod · 0.85

Calls 5

INT_ASSIGN_MINFunction · 0.85
INT_ASSIGN_MAXFunction · 0.85
INT_ASSIGN_MEDFunction · 0.85
INT_ASSIGN_RNDFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected