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

Method load

examples/bacp.cpp:177–191  ·  view source on GitHub ↗

Value selection function for load branching

Source from the content-addressed store, hash-verified

175 }
176 /// Value selection function for load branching
177 static int load(const Space& home, IntVar x, int) {
178 const BACP& b = static_cast<const BACP&>(home);
179 IntVarValues values(x);
180 int val = -1;
181 int best = Int::Limits::max+1;
182 while (values()) {
183 if (b.l[values.val()].min() < best) {
184 val = values.val();
185 best = b.l[val].min();
186 }
187 ++values;
188 }
189 assert(val != -1);
190 return val;
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);

Callers 5

get_resultMethod · 0.80
next_batchMethod · 0.80
continue_testingMethod · 0.80
pidMethod · 0.80
operator boolMethod · 0.80

Calls 3

valuesFunction · 0.85
minMethod · 0.45
valMethod · 0.45

Tested by 3

get_resultMethod · 0.64
next_batchMethod · 0.64
continue_testingMethod · 0.64