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

Function valselcommit

gecode/set/branch/val-sel-commit.cpp:38–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace Gecode { namespace Set { namespace Branch {
37
38 ValSelCommitBase<SetView,int>*
39 valselcommit(Space& home, const SetValBranch& svb) {
40 switch (svb.select()) {
41 case SetValBranch::SEL_MIN_INC:
42 return new (home) ValSelCommit<ValSelMin,ValCommitInc>(home,svb);
43 case SetValBranch::SEL_MIN_EXC:
44 return new (home) ValSelCommit<ValSelMin,ValCommitExc>(home,svb);
45 case SetValBranch::SEL_MED_INC:
46 return new (home) ValSelCommit<ValSelMed,ValCommitInc>(home,svb);
47 case SetValBranch::SEL_MED_EXC:
48 return new (home) ValSelCommit<ValSelMed,ValCommitExc>(home,svb);
49 case SetValBranch::SEL_MAX_INC:
50 return new (home) ValSelCommit<ValSelMax,ValCommitInc>(home,svb);
51 case SetValBranch::SEL_MAX_EXC:
52 return new (home) ValSelCommit<ValSelMax,ValCommitExc>(home,svb);
53 case SetValBranch::SEL_RND_INC:
54 return new (home) ValSelCommit<ValSelRnd,ValCommitInc>(home,svb);
55 case SetValBranch::SEL_RND_EXC:
56 return new (home) ValSelCommit<ValSelRnd,ValCommitExc>(home,svb);
57 case SetValBranch::SEL_VAL_COMMIT:
58 if (!svb.commit()) {
59 return new (home)
60 ValSelCommit<ValSelFunction<SetView>,ValCommitInc>(home,svb);
61 } else {
62 return new (home)
63 ValSelCommit<ValSelFunction<SetView>,ValCommitFunction<SetView> >(home,svb);
64 }
65 default:
66 throw UnknownBranching("Set::branch");
67 }
68 }
69
70 ValSelCommitBase<SetView,int>*
71 valselcommit(Space& home, const SetAssign& sa) {

Callers 3

branchFunction · 0.50
branchFunction · 0.50
assignFunction · 0.50

Calls 2

selectMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected