Go to the documentation of this file.
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();
143 si[
i].min =
si[
i].pre =
si[
i].low = cnt++;
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();
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();
228 start = o(
x[start]).min();
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);
ExecStatus path(Space &home)
Ensure path property: prune edges that could give too small cycles.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Information for performing a recorded tell.
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
bool me_failed(ModEvent me)
Check whether modification event me is failed.
Base(Space &home, Base &p)
Constructor for cloning p.
Converter with fixed offset.
ExecStatus ES_SUBSUMED(Propagator &p)
bool assigned(View x, int v)
Whether x is assigned to value v.
Stack with fixed number of elements.
Value iterator for integer views.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Offset o
Offset transformation.
Gecode toplevel namespace
Base-class for circuit propagator.
Home class for posting propagators
Post propagator for SetVar SetOpType SetVar SetRelType r
bool empty(void) const
Test whether stack is empty.
T pop(void)
Pop topmost element from stack and return it.
void update(const Offset &o)
Update during cloning.
int ModEvent
Type for modification events.
Int::ViewValues< View > v
Propagation has computed fixpoint.
void push(const T &x)
Push element x on top of stack.
ViewArray< View > y
Array for performing value propagation for distinct.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
int n
Number of negative literals for node type.
Information required for non-recursive checking for a single scc.
Execution has resulted in failure.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Propagation has not computed fixpoint.
Gecode::IntArgs i({1, 2, 3, 4})
int p
Number of positive literals for node type.
ExecStatus connected(Space &home)
Check whether the view value graph is strongly connected.