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

Method commit

gecode/float/branch/val-commit.hpp:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 ValCommitLqGq::ValCommitLqGq(Space& home, ValCommitLqGq& vc)
45 : ValCommit<FloatView,FloatVal>(home,vc) {}
46 forceinline ModEvent
47 ValCommitLqGq::commit(Space& home, unsigned int a, FloatView x, int,
48 FloatNumBranch nl) {
49 // Should we try the smaller half first?
50 if ((a == 0) == nl.l) {
51 if ((x.min() == nl.n) || (x.max() == nl.n))
52 return x.eq(home,x.min());
53 else
54 return x.lq(home,nl.n);
55 } else {
56 if ((x.min() == nl.n) || (x.max() == nl.n))
57 return x.eq(home,x.max());
58 else
59 return x.gq(home,nl.n);
60 }
61 }
62 forceinline NGL*
63 ValCommitLqGq::ngl(Space&, unsigned int, FloatView, FloatNumBranch) const {
64 return nullptr;

Callers 1

valselcommitFunction · 0.45

Calls 5

minMethod · 0.45
maxMethod · 0.45
eqMethod · 0.45
lqMethod · 0.45
gqMethod · 0.45

Tested by

no test coverage detected