Eliminate assigned views
| 41 | |
| 42 | /// Eliminate assigned views |
| 43 | forceinline void |
| 44 | eliminate(Term<IntView>* t, int &n, long long int& d) { |
| 45 | for (int i=n; i--; ) |
| 46 | if (t[i].x.assigned()) { |
| 47 | long long int ax = t[i].a * static_cast<long long int>(t[i].x.val()); |
| 48 | if (Limits::overflow_sub(d,ax)) |
| 49 | throw OutOfLimits("Int::linear"); |
| 50 | d=d-ax; t[i]=t[--n]; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /// Rewrite all inequations in terms of IRT_LQ |
| 55 | forceinline void |