Go to the documentation of this file.
38 namespace Gecode {
namespace Int {
namespace NoOverlap {
43 :
Base<Box>(home,
b,
n), m(m0) {
88 if (
b[
n+
i].excluded()) {
89 b[
n+
i].cancel(home,*
this);
100 int* db =
r.alloc<
int>(
n);
106 for (
int i=
n;
i--; ) {
107 assert(
b[
i].mandatory());
110 assert(db[
i] > 0); assert(db[j] > 0);
111 if (--db[
i] == 0) e++;
112 if (--db[j] == 0) e++;
127 b[
i].cancel(home, *
this);
136 for (
int i=m;
i--; ) {
141 b[
n+
i].cancel(home,*
this);
148 assert(
b[
n+
i].excluded());
149 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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
Home class for posting propagators
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
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.
No-overlap propagator for optional boxes.
void cancel(Space &home, Propagator &p, IntSet &y)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
bool overlap(const FloatVal &x, const FloatVal &y)
bool shared(const IntSet &, VX)
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.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.