69 ::
post(home,xv,off)));
72 ::
post(home,xv,off)));
96 for (
int i=0;
i<offset;
i++)
98 for (
int i=n;
i--; ) {
99 for (
int j=0; j<
n; j++)
100 cx[offset+j] = c[
i*n+j];
116 if (home.
failed())
return;
118 circuit(home, c, offset, x, y, z, icl);
136 if (home.
failed())
return;
148 ::
post(home,xv,no)));
151 ::
post(home,xv,no)));
156 for (
int i=offset; i--; )
159 ox[offset + i] = x[i];
160 element(home, ox, e, offset+n);
165 ::
post(home,xv,off)));
168 ::
post(home,xv,off)));
175 path(home,0,x,s,e,icl);
191 if (home.
failed())
return;
192 path(home, offset, x, s, e, icl);
194 for (
int i=0;
i<offset;
i++)
197 for (
int i=n;
i--; ) {
198 for (
int j=0; j<
n; j++)
199 cx[offset+j] = c[
i*n+j];
209 path(home,c,0,x,s,e,y,z,icl);
216 if (home.
failed())
return;
218 path(home, c, offset, x, s, e, y, z, icl);
224 path(home,c,0,x,s,e,z,icl);
bool failed(void) const
Check whether corresponding space is failed.
IntConLevel
Consistency levels for integer propagators.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatNum c)
Post propagator for .
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
int size(void) const
Return size of array (number of elements)
Converter without offsets.
Exception: Too few arguments available in argument array
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l...
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntConLevel icl)
Post propagator such that x forms a Hamiltonian path.
const int max
Largest allowed integer value.
const int min
Smallest allowed integer value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntConLevel)
Post domain consistent propagator for .
"Value-consistent" circuit propagator
Passing integer variables.
Passing integer arguments.
Converter with fixed offset.
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
Exception: Arguments contain same variable multiply
Gecode toplevel namespace
void circuit(Home home, int offset, const IntVarArgs &x, IntConLevel icl)
Post propagator such that x forms a circuit.
Home class for posting propagators
Exception: Arguments are of different size
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
"Domain consistent" circuit propagator
Domain propagation or consistency.
bool same(const Space &home) const
Test whether array contains same variable multiply.