38 namespace Gecode {
namespace Int {
namespace Circuit {
40 template<
class View,
class Offset>
47 template<
class View,
class Offset>
52 y.update(home,share,p.
y);
70 template<
class View,
class Offset>
78 start = o(
x[start]).val();
79 if (start == 0)
break;
86 unsigned int n_edges = 0;
87 for (
int i=n;
i--; ) {
88 n_edges +=
x[
i].size();
139 si[
i].
v.init(o(
x[i]));
141 if (si[si[i].
v.val()].
pre < 0) {
145 }
else if ((subtree_min <= si[si[i].
v.val()].
pre) &&
146 (si[si[i].
v.val()].
pre <= subtree_max)) {
148 eq[n_eq].
x = o(
x[i]);
149 eq[n_eq].
n = si[
i].
v.val();
150 }
else if (si[si[i].
v.val()].
pre < subtree_min) {
151 nq[n_nq].
x = o(
x[i]);
152 nq[n_nq].
n = si[
i].
v.val();
156 if (si[si[i].
v.val()].
low < si[
i].
min)
157 si[i].
min = si[si[i].
v.val()].
low;
160 if (si[i].
min < si[i].low) {
162 }
else if (i != start) {
176 subtree_min = subtree_max+1;
187 ModEvent me = eq[n_eq].
x.eq(home,eq[n_eq].n);
195 ModEvent me = nq[n_nq].
x.nq(home,nq[n_nq].n);
205 template<
class View,
class Offset>
216 int* end = r.
alloc<
int>(
n);
224 for (
int i=y.
size();
i--; ) {
244 end[j0]=j; tell.
push(j0);
251 while (!tell.
empty()) {
259 template<
class View,
class Offset>
264 return sizeof(*this);
void push(const T &x)
Push element x on top of stack.
int size(void) const
Return size of array (number of elements)
Offset o
Offset transformation.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
ExecStatus path(Space &home)
Ensure path property: prune edges that could give to small cycles.
int ModEvent
Type for modification events.
ExecStatus connected(Space &home)
Check whether the view value graph is strongly connected.
Value iterator for integer views.
Propagation has computed fixpoint.
int p
Number of positive literals for node type.
bool empty(void) const
Test whether stack is empty.
Information required for non-recursive checking for a single scc.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Execution has resulted in failure.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
ViewArray< View > y
Array for performing value propagation for distinct.
void update(const Offset &o)
Update during cloning.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Converter with fixed offset.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Node * x
Pointer to corresponding Boolean expression node.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Base(Space &home, bool share, Base &p)
Constructor for cloning p.
bool assigned(View x, int v)
Whether x is assigned to value v.
Stack with fixed number of elements.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
T pop(void)
Pop topmost element from stack and return it.
Propagation has not computed fixpoint.
int val(void) const
Return current value.
Gecode toplevel namespace
Home class for posting propagators
Base-class for circuit propagator.
Int::ViewValues< View > v
bool me_failed(ModEvent me)
Check whether modification event me is failed.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Information for performing a recorded tell.