45 for (
int i=0; i<c.size(); i++)
57 for (
int i=0; i<c.size(); i++)
74 for (
int i=0; i<c.size(); i++)
86 for (
int i=0; i<c.size(); i++)
104 for (
int i=0; i<c.size(); i++)
118 for (
int i=0; i<c.size(); i++)
292 pair(Home home, IntVar x,
int w, IntVar y,
int h) {
293 IntVar xy(home,0,w*h-1);
300 pairWithOffsets(
Home home,
IntVar x,
int xoff,
int w,
IntVar y,
int yoff,
int h) {
302 if (xoff==0 && yoff==0) {
323 element(home, a, pair(home,x,w,y,h), z, ipl);
328 IntVar x,
int xoff,
int w,
329 IntVar y,
int yoff,
int h,
335 element(home, a, pairWithOffsets(home,x,xoff,w,y,yoff,h), z, ipl);
346 element(home, a, pair(home,x,w,y,h), z, ipl);
357 element(home, a, pairWithOffsets(home,x,xoff,w,y,yoff,h), z, ipl);
368 element(home, a, pair(home,x,w,y,h), z, ipl);
373 IntVar x,
int xoff,
int w,
374 IntVar y,
int yoff,
int h,
380 element(home, a, pairWithOffsets(home,x,xoff,w,y,yoff,h), z, ipl);
391 element(home, a, pair(home,x,w,y,h), z, ipl);
396 IntVar x,
int xoff,
int w,
397 IntVar y,
int yoff,
int h,
403 element(home, a, pairWithOffsets(home,x,xoff,w,y,yoff,h), z, ipl);
Passing Boolean variables.
Boolean integer variables.
FloatNum size(void) const
Return size of float value (distance between maximum and minimum).
Home class for posting propagators
Passing integer variables.
Exception: Arguments are of different size
static ExecStatus post(Home home, OffsetView x0, OffsetView x1, IntView x2, int w, int h)
Post propagator .
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2, int w, int h)
Post propagator .
Bounds consistent element propagator for array of views.
Domain consistent element propagator for array of views.
An array of IdxView pairs.
Exception: Too few arguments available in argument array
#define GECODE_POST
Check for failure in a constraint post function.
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_DEF
Simple propagation levels.
ExecStatus post_int(Home home, IntSharedArray &c, V0 x0, V1 x1)
Post propagator with appropriate index and value types.
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
Gecode toplevel namespace
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
void element(Home home, IntSharedArray n, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
@ ES_OK
Execution is okay.