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

Function eliminate

gecode/int/linear/int-post.cpp:43–52  ·  view source on GitHub ↗

Eliminate assigned views

Source from the content-addressed store, hash-verified

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

Callers 4

postFunction · 0.70
propagateMethod · 0.50
propagateMethod · 0.50
propagateMethod · 0.50

Calls 2

assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected