| 37 | |
| 38 | template<class TaskView> |
| 39 | forceinline ExecStatus |
| 40 | edgefinding(Space& home, TaskViewArray<TaskView>& t) { |
| 41 | Region r; |
| 42 | |
| 43 | OmegaLambdaTree<TaskView> ol(r,t); |
| 44 | TaskViewIter<TaskView,STO_LCT,false> q(r,t); |
| 45 | |
| 46 | int j = q.task(); |
| 47 | while (q.left() > 1) { |
| 48 | if (ol.ect() > t[j].lct()) |
| 49 | return ES_FAILED; |
| 50 | ol.shift(j); |
| 51 | ++q; |
| 52 | j = q.task(); |
| 53 | while (!ol.lempty() && (ol.lect() > t[j].lct())) { |
| 54 | int i = ol.responsible(); |
| 55 | GECODE_ME_CHECK(t[i].est(home,ol.ect())); |
| 56 | ol.lremove(i); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | return ES_OK; |
| 61 | } |
| 62 | |
| 63 | template<class Task> |
| 64 | ExecStatus |