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

Function eliminate

gecode/int/linear/bool-post.cpp:42–51  ·  view source on GitHub ↗

Eliminate assigned views

Source from the content-addressed store, hash-verified

40
41 /// Eliminate assigned views
42 forceinline void
43 eliminate(Term<BoolView>* t, int &n, long long int& d) {
44 for (int i=n; i--; )
45 if (t[i].x.one()) {
46 d -= t[i].a; t[i]=t[--n];
47 } else if (t[i].x.zero()) {
48 t[i]=t[--n];
49 }
50 Limits::check(d,"Int::linear");
51 }
52
53 /// Rewrite non-strict relations
54 forceinline void

Callers 2

post_allFunction · 0.70
postFunction · 0.70

Calls 3

checkFunction · 0.50
oneMethod · 0.45
zeroMethod · 0.45

Tested by

no test coverage detected