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

Function eliminate_zero

gecode/int/bool/clause.hpp:223–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222 template<class VX>
223 forceinline void
224 eliminate_zero(ViewArray<VX>& x, int& n_zero) {
225 if (n_zero > 0) {
226 int n=x.size();
227 // Eliminate all zeros
228 for (int i=n; i--; )
229 if (x[i].zero()) {
230 x[i]=x[--n]; n_zero--;
231 }
232 x.size(n);
233 }
234 }
235
236 template<class VX, class VY>
237 Actor*

Callers 1

copyMethod · 0.70

Calls 2

sizeMethod · 0.45
zeroMethod · 0.45

Tested by

no test coverage detected