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

Function valselcommit

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

Source from the content-addressed store, hash-verified

36namespace Gecode { namespace Float { namespace Branch {
37
38 ValSelCommitBase<FloatView,FloatNumBranch>*
39 valselcommit(Space& home, const FloatValBranch& fvb) {
40 switch (fvb.select()) {
41 case FloatValBranch::SEL_SPLIT_MIN:
42 return new (home) ValSelCommit<ValSelLq,ValCommitLqGq>(home,fvb);
43 case FloatValBranch::SEL_SPLIT_MAX:
44 return new (home) ValSelCommit<ValSelGq,ValCommitLqGq>(home,fvb);
45 case FloatValBranch::SEL_SPLIT_RND:
46 return new (home) ValSelCommit<ValSelRnd,ValCommitLqGq>(home,fvb);
47 case FloatValBranch::SEL_VAL_COMMIT:
48 if (!fvb.commit()) {
49 return new (home)
50 ValSelCommit<ValSelFunction<FloatView>,ValCommitLqGq>(home,fvb);
51 } else {
52 return new (home)
53 ValSelCommit<ValSelFunction<FloatView>,ValCommitFunction<FloatView> >(home,fvb);
54 }
55 default:
56 throw UnknownBranching("Float::branch");
57 }
58 }
59
60 ValSelCommitBase<FloatView,FloatNumBranch>*
61 valselcommit(Space& home, const FloatAssign& fa) {

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