34 namespace Gecode {
namespace Int {
namespace Sorted {
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();
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());
void push(const T &x)
Push element x on top of stack.
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 max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool empty(void) const
Test whether stack is empty.
int ModEvent
Type for modification events.
T & top(void) const
Return element on top of stack.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int left
Direct left neighbour of an y-node in a scc.
int rightmost
Rightmost reachable y-node in a scc.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Representation of a strongly connected component.
void reset(void)
Reset stack (pop all elements)
Post propagator for SetVar SetOpType SetVar SetRelType r
int right
Direct right neighbour of an y-node in a scc.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
int leftmost
Leftmost y-node in a scc.
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
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
int size(void) const
Return size of array (number of elements)
bool me_failed(ModEvent me)
Check whether modification event me is failed.