38 namespace Gecode {
namespace Int {
namespace NoOverlap {
44 template<
class Dim,
int n>
47 assert((i >= 0) && (i <
n));
50 template<
class Dim,
int n>
53 assert((i >= 0) && (i <
n));
56 template<
class Dim,
int n>
62 template<
class Dim,
int n>
67 template<
class Dim,
int n>
72 template<
class Dim,
int n>
78 template<
class Dim,
int n>
84 template<
class Dim,
int n>
87 for (
int i=0;
i<
n;
i++)
88 if ((
d[
i].lec() <= box.
d[
i].ssc()) || (box.
d[
i].lec() <=
d[
i].ssc()))
93 template<
class Dim,
int n>
96 for (
int i=0;
i<
n;
i++)
97 if ((
d[
i].sec() <= box.
d[
i].lsc()) || (box.
d[
i].sec() <=
d[
i].lsc()))
102 template<
class Dim,
int n>
105 for (
int i=0;
i<
n;
i++)
106 if ((
d[
i].sec() <= box.
d[
i].lsc()) ||
107 (box.
d[
i].sec() <=
d[
i].lsc())) {
109 for (
int j=
i+1; j<
n; j++)
110 if ((
d[j].sec() <= box.
d[j].lsc()) ||
111 (box.
d[j].sec() <=
d[j].lsc()))
114 d[
i].nooverlap(home, box.
d[
i]);
115 box.
d[
i].nooverlap(home,
d[
i]);
122 template<
class Dim,
int n>
125 for (
int i=0;
i<
n;
i++)
126 d[
i].update(home,share,b.
d[
i]);
129 template<
class Dim,
int n>
132 for (
int i=0;
i<
n;
i++)
135 template<
class Dim,
int n>
138 for (
int i=0;
i<
n;
i++)
147 template<
class Dim,
int n>
152 template<
class Dim,
int n>
157 template<
class Dim,
int n>
162 template<
class Dim,
int n>
168 template<
class Dim,
int n>
175 template<
class Dim,
int n>
179 o.update(home, share, b.
o);
182 template<
class Dim,
int n>
188 template<
class Dim,
int n>
bool mandatory(void) const
Whether box is mandatory.
const Dim & operator[](int i) const
Access to dimension i.
void cancel(Space &home, Propagator &p, IntSet &y)
bool overlap(const ManBox< Dim, n > &b) const
Check whether this box overlaps with b.
Base-class for propagators.
bool excluded(void) const
Whether box is excluded.
static int dim(void)
Return number of dimensions.
void cancel(Space &home, Propagator &p)
Cancel propagator p from box.
bool optional(void) const
Whether box is optional.
void update(Space &home, bool share, ManBox< Dim, n > &r)
Update box during cloning.
int p
Number of positive literals for node type.
void subscribe(Space &home, Propagator &p)
Subscribe propagator p to box.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Execution has resulted in failure.
void subscribe(Space &home, Propagator &p, IntSet &y)
bool optional(void) const
Whether box is optional.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void subscribe(Space &home, Propagator &p)
Subscribe propagator p to box.
ExecStatus exclude(Space &home)
Exclude box.
void update(Space &home, bool share, OptBox< Dim, n > &r)
Update box during cloning.
bool nooverlap(const ManBox< Dim, n > &b) const
Check whether this box does not any longer overlap with b.
BoolView o
Whether box is optional or not.
bool excluded(void) const
Whether box is excluded.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
ExecStatus exclude(Space &home)
Exclude box.
void cancel(Space &home, Propagator &p)
Cancel propagator p from box.
bool mandatory(void) const
Whether box is mandatory.
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
Boolean view for Boolean variables.