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

Method eliminate

gecode/int/nvalues/int-base.hpp:106–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105 template<class VY>
106 void
107 IntBase<VY>::eliminate(Space& home) {
108 int n=x.size();
109 for (int i=n; i--; )
110 if (vs.subset(x[i])) {
111 // All values are already contained in vs, eliminate x[i]
112 x[i].cancel(home, *this, PC_INT_DOM);
113 x[i] = x[--n];
114 }
115 x.size(n);
116 }
117
118 template<class VY>
119 ExecStatus

Callers

nothing calls this directly

Calls 3

subsetMethod · 0.80
sizeMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected