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

Method post

test/int/no-overlap.cpp:118–128  ·  view source on GitHub ↗

Post constraint on \a xwyho

Source from the content-addressed store, hash-verified

116 }
117 /// Post constraint on \a xwyho
118 virtual void post(Gecode::Space& home, Gecode::IntVarArray& xyo) {
119 using namespace Gecode;
120 int n = xyo.size() / 3;
121 IntVarArgs x(n), y(n);
122 BoolVarArgs o(n);
123 for (int i=0; i<n; i++) {
124 x[i]=xyo[3*i+0]; y[i]=xyo[3*i+1];
125 o[i]=expr(home, xyo[3*i+2] > 0);
126 }
127 nooverlap(home, x, w, y, h, o);
128 }
129 };
130
131 /// %Test for no-overlap with variable dimensions (rectangles)

Callers

nothing calls this directly

Calls 3

nooverlapFunction · 0.85
exprFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected