Go to the documentation of this file.
34 namespace Gecode {
namespace Int {
namespace NoOverlap {
39 :
Base<Box>(home,
b,
n), m(m0) {
40 for (
int i=0;
i<
m;
i++)
58 for (
int i=0;
i<m;
i++)
68 :
Base<Box>(home,
p,
p.
n +
p.m), m(
p.m) {}
84 if (
b[
n+
i].excluded()) {
85 b[
n+
i].cancel(home,*
this);
96 int* db =
r.alloc<
int>(
n);
97 for (
int i=0;
i<
n;
i++)
102 for (
int i=0;
i<
n;
i++) {
103 assert(
b[
i].mandatory());
104 for (
int j=0; j<
i; j++)
106 assert(db[
i] > 0); assert(db[j] > 0);
107 if (--db[
i] == 0) e++;
108 if (--db[j] == 0) e++;
123 b[
i].cancel(home, *
this);
132 for (
int i=m;
i--; ) {
137 b[
n+
i].cancel(home,*
this);
144 assert(
b[
n+
i].excluded());
145 b[
n+
i].cancel(home,*
this);
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
bool optional(const BoolVarArgs &m)
ExecStatus ES_SUBSUMED(Propagator &p)
int m
Number of optional boxes: b[n] ... b[n+m-1].
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Base-class for both propagators and branchers.
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)
Gecode toplevel namespace
static ExecStatus post(Home home, Box *b, int n)
Post propagator for boxes b.
virtual size_t dispose(Space &home)
Destructor.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Home class for posting propagators
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
static int partition(Box *b, int i, int n)
Partition n boxes b starting at position i.
Post propagator for SetVar SetOpType SetVar SetRelType r
OptProp(Home home, Box *b, int n, int m)
Constructor for posting.
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
No-overlap propagator for optional boxes.
void cancel(Space &home, Propagator &p, IntSet &y)
bool overlap(const FloatVal &x, const FloatVal &y)
Base class for no-overlap propagator.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel)
Post propagator for rectangle packing.
int n
Number of mandatory boxes: b[0] ... b[n-1].
void subscribe(Space &home, Propagator &p, IntSet &y)
int n
Number of negative literals for node type.
int ModEventDelta
Modification event deltas.
@ ES_NOFIX
Propagation has not computed fixpoint.
Gecode::IntArgs i({1, 2, 3, 4})
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.