38 namespace Int {
namespace NoOverlap {
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++) {
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::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
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.
Post propagator for SetVar SetOpType SetVar y
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
#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 &x0, const IntVarArgs &w, const IntVarArgs &x1, const IntVarArgs &y0, const IntVarArgs &h, const IntVarArgs &y1, const BoolVarArgs &m, IntPropLevel)
Post propagator for rectangle packing.
IntPropLevel
Propagation levels for integer propagators.
const FloatNum max
Largest allowed float value.
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)
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
Gecode::IntArgs i({1, 2, 3, 4})