34 namespace Gecode {
namespace Int {
namespace Circuit {
36 template<
class View,
class Offset>
40 start(0),
y(home,x), o(o0) {
44 template<
class View,
class Offset>
67 template<
class View,
class Offset>
91 unsigned int n_edges = 0;
92 for (
int i=0;
i<
n;
i++) {
93 n_edges +=
x[
i].size();
144 si[
i].
v.init(
o(
x[i]));
146 if (si[si[i].
v.val()].
pre < 0) {
150 }
else if ((subtree_min <= si[si[i].
v.val()].
pre) &&
151 (si[si[i].
v.val()].
pre <= subtree_max)) {
153 eq[n_eq].
x =
o(
x[i]);
154 eq[n_eq].
n = si[
i].
v.val();
155 }
else if (si[si[i].
v.val()].
pre < subtree_min) {
156 nq[n_nq].
x =
o(
x[i]);
157 nq[n_nq].
n = si[
i].
v.val();
161 if (si[si[i].
v.val()].
low < si[
i].
min)
162 si[i].
min = si[si[i].
v.val()].
low;
165 if (si[i].
min < si[i].low) {
167 }
else if (i !=
start) {
181 subtree_min = subtree_max+1;
199 if (subtree_min > 1) {
201 if (si[
v.val()].
pre < subtree_min) {
202 nq[n_nq].
x =
o(
x[
v.val()]);
203 nq[n_nq].
n =
v.val();
211 ModEvent me = eq[n_eq].
x.eq(home,eq[n_eq].n);
220 ModEvent me = nq[n_nq].
x.nq(home,nq[n_nq].n);
234 template<
class View,
class Offset>
245 int* end = r.
alloc<
int>(
n);
246 for (
int i=0;
i<
n;
i++)
253 for (
int i=0;
i<
y.size();
i++) {
273 end[j0]=j; tell.
push(j0);
280 while (!tell.
empty()) {
288 template<
class View,
class Offset>
293 return sizeof(*this);
void push(const T &x)
Push element x on top of stack.
ExecStatus ES_SUBSUMED(Propagator &p)
ActorLink * next(void) const
Routines for double-linked list.
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 too small cycles.
bool empty(void) const
Test whether stack is empty.
int ModEvent
Type for modification events.
ViewArray< View > x
Array of views.
ExecStatus connected(Space &home)
Check whether the view value graph is strongly connected.
Value iterator for integer views.
Propagation has computed fixpoint.
int val(void) const
Return current value.
int start
Remember where to start the next time the propagator runs.
int p
Number of positive literals for node type.
Base(Space &home, Base &p)
Constructor for cloning p.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
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.
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
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.
Post propagator for SetVar x
Propagation has not computed fixpoint.
Information required for non-recursive checking for a single scc.
Gecode toplevel namespace
Int::ViewValues< View > v
Home class for posting propagators
Base-class for circuit propagator.
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.