42 namespace Int {
namespace NoOverlap {
46 for (
int i=m.
size();
i--; )
60 using namespace NoOverlap;
64 for (
int i=x.
size();
i--; ) {
75 =
static_cast<Space&
>(home).alloc<ManBox<FixDim,2> >(x.
size());
76 for (
int i=x.
size();
i--; ) {
77 b[
i][0] = FixDim(x[
i],w[i]);
78 b[
i][1] = FixDim(y[i],h[i]);
92 using namespace NoOverlap;
96 for (
int i=x.
size();
i--; ) {
104 if (home.
failed())
return;
108 =
static_cast<Space&
>(home).alloc<OptBox<FixDim,2> >(x.
size());
109 for (
int i=x.
size();
i--; ) {
110 b[
i][0] = FixDim(x[
i],w[i]);
111 b[
i][1] = FixDim(y[i],h[i]);
118 =
static_cast<Space&
>(home).alloc<ManBox<FixDim,2> >(x.
size());
122 b[
n][0] = FixDim(x[
i],w[i]);
123 b[
n][1] = FixDim(y[i],h[i]);
136 using namespace NoOverlap;
141 if (home.
failed())
return;
143 for (
int i=x0.
size();
i--; ) {
150 for (
int i=x0.
size();
i--; ) {
157 =
static_cast<Space&
>(home).alloc<ManBox<FlexDim,2> >(x0.
size());
158 for (
int i=x0.
size();
i--; ) {
159 b[
i][0] = FlexDim(x0[
i],w[i],x1[i]);
160 b[
i][1] = FlexDim(y0[i],h[i],y1[i]);
174 using namespace NoOverlap;
179 if (home.
failed())
return;
181 for (
int i=x0.
size();
i--; ) {
188 for (
int i=x0.
size();
i--; ) {
195 =
static_cast<Space&
>(home).alloc<OptBox<FlexDim,2> >(x0.
size());
196 for (
int i=x0.
size();
i--; ) {
197 b[
i][0] = FlexDim(x0[
i],w[i],x1[i]);
198 b[
i][1] = FlexDim(y0[i],h[i],y1[i]);
205 =
static_cast<Space&
>(home).alloc<ManBox<FlexDim,2> >(x0.
size());
207 for (
int i=0;
i<x0.
size();
i++)
209 b[
n][0] = FlexDim(x0[
i],w[i],x1[i]);
210 b[
n][1] = FlexDim(y0[i],h[i],y1[i]);
bool failed(void) const
Check whether corresponding space is failed.
IntConLevel
Consistency levels for integer propagators.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
int size(void) const
Return size of array (number of elements)
bool assigned(void) const
Test if all variables are assigned.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l...
No-overlap propagator for mandatory boxes.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
struct Gecode::@512::NNF::@54::@55 b
For binary nodes (and, or, eqv)
Passing integer variables.
Passing integer arguments.
Passing Boolean variables.
No-overlap propagator for optional boxes.
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
#define GECODE_ME_FAIL(me)
Check whether modification event me is failed, and fail space home.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntConLevel)
Post propagator for rectangle packing.
Gecode toplevel namespace
bool optional(const BoolVarArgs &m)
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
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.