38 namespace Int {
namespace NoOverlap {
42 for (
int i=0; i<m.
size(); i++)
56 using namespace NoOverlap;
57 if ((
x.size() != w.
size()) || (
x.size() !=
y.size()) ||
58 (
x.size() != h.
size()))
60 for (
int i=0; i<
x.size(); i++) {
71 =
static_cast<Space&
>(home).alloc<ManBox<FixDim,2> >(
x.size());
72 for (
int i=0; i<
x.size(); i++) {
73 b[i][0] = FixDim(
x[i],w[i]);
74 b[i][1] = FixDim(
y[i],h[i]);
88 using namespace NoOverlap;
89 if ((
x.size() != w.
size()) || (
x.size() !=
y.size()) ||
90 (
x.size() != h.
size()) || (
x.size() != m.
size()))
92 for (
int i=0; i<
x.size(); i++) {
104 =
static_cast<Space&
>(home).alloc<OptBox<FixDim,2> >(
x.size());
105 for (
int i=0; i<
x.size(); i++) {
106 b[i][0] = FixDim(
x[i],w[i]);
107 b[i][1] = FixDim(
y[i],h[i]);
114 =
static_cast<Space&
>(home).alloc<ManBox<FixDim,2> >(
x.size());
116 for (
int i=0; i<
x.size(); i++)
118 b[
n][0] = FixDim(
x[i],w[i]);
119 b[
n][1] = FixDim(
y[i],h[i]);
132 using namespace NoOverlap;
139 for (
int i=0; i<x0.
size(); i++) {
146 for (
int i=0; i<x0.
size(); i++) {
153 =
static_cast<Space&
>(home).alloc<ManBox<FlexDim,2> >(x0.
size());
154 for (
int i=0; i<x0.
size(); i++) {
155 b[i][0] = FlexDim(x0[i],w[i],x1[i]);
156 b[i][1] = FlexDim(y0[i],h[i],y1[i]);
170 using namespace NoOverlap;
177 for (
int i=0; i<x0.
size(); i++) {
184 for (
int i=0; i<x0.
size(); i++) {
189 }
else if (optional(m)) {
191 =
static_cast<Space&
>(home).alloc<OptBox<FlexDim,2> >(x0.
size());
192 for (
int i=0; i<x0.
size(); i++) {
193 b[i][0] = FlexDim(x0[i],w[i],x1[i]);
194 b[i][1] = FlexDim(y0[i],h[i],y1[i]);
201 =
static_cast<Space&
>(home).alloc<ManBox<FlexDim,2> >(x0.
size());
203 for (
int i=0; i<x0.
size(); i++)
205 b[
n][0] = FlexDim(x0[i],w[i],x1[i]);
206 b[
n][1] = FlexDim(y0[i],h[i],y1[i]);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int n
Number of negative literals for node type.
int size(void) const
Return size of array (number of elements)
Passing Boolean variables.
Home class for posting propagators
Passing integer arguments.
Passing integer variables.
Exception: Arguments are of different size
Integer view for integer variables.
No-overlap propagator for mandatory boxes.
No-overlap propagator for optional boxes.
bool assigned(void) const
Test if all variables are assigned.
#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.
#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, IntPropLevel ipl=IPL_DEF)
Post propagator for rectangle packing.
IntPropLevel
Propagation levels for integer propagators.
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
bool optional(const BoolVarArgs &m)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar x