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

Function overload

gecode/int/cumulative/overload.hpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 // Overload checking for mandatory tasks
39 template<class ManTask>
40 ExecStatus
41 overload(Space& home, int c, TaskArray<ManTask>& t) {
42 TaskViewArray<typename TaskTraits<ManTask>::TaskViewFwd> f(t);
43 sort<typename TaskTraits<ManTask>::TaskViewFwd,STO_LCT,true>(f);
44
45 Region r;
46 OmegaTree<typename TaskTraits<ManTask>::TaskViewFwd> o(r,c,f);
47
48 for (int i=0; i<f.size(); i++) {
49 if (f[i].mandatory())
50 o.insert(i);
51 if (o.env() > static_cast<long long int>(c)*f[i].lct())
52 GECODE_ME_CHECK(f[i].excluded(home));
53 }
54 return ES_OK;
55 }
56
57}}}
58

Callers 2

propagateMethod · 0.70
propagateMethod · 0.70

Calls 6

envMethod · 0.80
sizeMethod · 0.45
mandatoryMethod · 0.45
insertMethod · 0.45
lctMethod · 0.45
excludedMethod · 0.45

Tested by

no test coverage detected