MCPcopy Create free account
hub / github.com/Gecode/gecode / ExecStatus detectable

Function ExecStatus detectable

gecode/int/unary/detectable.hpp:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36 template<class ManTaskView>
37 forceinline ExecStatus
38 detectable(Space& home, TaskViewArray<ManTaskView>& t) {
39 sort<ManTaskView,STO_ECT,true>(t);
40
41 Region r;
42
43 OmegaTree<ManTaskView> o(r,t);
44 TaskViewIter<ManTaskView,STO_LST,true> q(r,t);
45 int* est = r.alloc<int>(t.size());
46
47 for (int i=0; i<t.size(); i++) {
48 while (q() && (t[i].ect() > t[q.task()].lst())) {
49 o.insert(q.task()); ++q;
50 }
51 est[i] = o.ect(i);
52 }
53
54 for (int i=0; i<t.size(); i++)
55 GECODE_ME_CHECK(t[i].est(home,est[i]));
56
57 return ES_OK;
58 }
59
60 template<class ManTask>
61 ExecStatus

Callers

nothing calls this directly

Calls 10

taskMethod · 0.80
ES_SUBSUMEDMethod · 0.80
sizeMethod · 0.45
ectMethod · 0.45
lstMethod · 0.45
insertMethod · 0.45
estMethod · 0.45
mandatoryMethod · 0.45
excludedMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected