63 for (
int j = 0; j < xs; j++) {
64 int yjmin =
y[j].min();
74 int ximin =
x[i].min();
97 for (
int i = 0; i < xs; i++) {
98 if (sinfo[i].left == i) {
102 while (sinfo[
z].right !=
z) {
104 scclist[phi[
z]] = scc;
108 scclist[phi[
z]] = scc;
128 template<
class View,
bool Perm>
143 for (
int i = 0; i < xs; i++) {
145 int xmin =
x[i].min();
153 int start = sinfo[scclist[i]].
leftmost;
154 while (
y[start].
max() < xmin) {
155 start = sinfo[start].
right;
174 y[start].min() !=
x[i].min());
176 int ptau = tau[xs - 1 - i];
177 int xmax =
x[ptau].max();
186 while (
y[start].
min() > xmax) {
187 start = sinfo[start].
left;
193 ModEvent me_pub =
z[ptau].lq(home, start);
197 nofix |= (
me_modified(me_pub) && start !=
z[ptau].max());
205 y[start].max() !=
x[ptau].max());
224 int phi[],
int phiprime[],
bool& nofix) {
225 for (
int i=
x.size(); i--; ) {
231 x[phiprime[i]].min() !=
y[i].min());
238 x[phi[i]].max() !=
y[i].max());
Representation of a strongly connected component.
int leftmost
Leftmost y-node in a scc.
int left
Direct left neighbour of an y-node in a scc.
int right
Direct right neighbour of an y-node in a scc.
int rightmost
Rightmost reachable y-node in a scc.
Stack with fixed number of elements.
void push(const T &x)
Push element x on top of stack.
void reset(void)
Reset stack (pop all elements)
T pop(void)
Pop topmost element from stack and return it.
bool empty(void) const
Test whether stack is empty.
T & top(void) const
Return element on top of stack.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
bool narrow_domy(Space &home, ViewArray< View > &x, ViewArray< View > &y, int phi[], int phiprime[], bool &nofix)
Narrowing the domains of the y views.
bool narrow_domx(Space &home, ViewArray< View > &x, ViewArray< View > &y, ViewArray< View > &z, int tau[], int[], int scclist[], SccComponent sinfo[], bool &nofix)
Narrowing the domains of the x variables.
void computesccs(ViewArray< View > &x, ViewArray< View > &y, int phi[], SccComponent sinfo[], int scclist[])
Compute the sccs of the oriented intersection-graph.
Gecode toplevel namespace
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 SetRelType SetVar z
Post propagator for SetVar SetOpType SetVar y
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar x
int ModEvent
Type for modification events.