| 38 | using namespace Int; |
| 39 | |
| 40 | void |
| 41 | linear(Home home, const BoolVarArgs& x, IntRelType irt, int c, |
| 42 | IntPropLevel ipl) { |
| 43 | GECODE_POST; |
| 44 | |
| 45 | int n=x.size(); |
| 46 | Region re; |
| 47 | Linear::Term<BoolView>* t = re.alloc<Linear::Term<BoolView>>(n); |
| 48 | for (int i=0; i<n; i++) { |
| 49 | t[i].a=1; t[i].x=x[i]; |
| 50 | } |
| 51 | |
| 52 | Linear::post(home,t,n,irt,c,ipl); |
| 53 | } |
| 54 | |
| 55 | void |
| 56 | linear(Home home, const BoolVarArgs& x, IntRelType irt, IntVar y, |