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

Method load_rev

examples/bacp.cpp:193–207  ·  view source on GitHub ↗

Value selection function for reverse load branching

Source from the content-addressed store, hash-verified

191 }
192 /// Value selection function for reverse load branching
193 static int load_rev(const Space& home, IntVar x, int) {
194 const BACP& b = static_cast<const BACP&>(home);
195 IntVarValues values(x);
196 int val = -1;
197 int best = Int::Limits::min-1;
198 while (values()) {
199 if (b.l[values.val()].min() > best) {
200 val = values.val();
201 best = b.l[val].min();
202 }
203 ++values;
204 }
205 assert(val != -1);
206 return val;
207 }
208 /// Constructor for copying \a bacp
209 BACP(BACP& bacp) : IntMinimizeScript(bacp),
210 curr(bacp.curr) {

Callers

nothing calls this directly

Calls 3

valuesFunction · 0.85
minMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected