38 namespace Gecode {
namespace Int {
namespace Sorted {
67 for (
int j = 0; j < xs; j++) {
68 int yjmin = y[j].min();
78 int ximin = x[
i].min();
101 for (
int i = 0;
i < xs;
i++) {
102 if (sinfo[
i].left ==
i) {
106 while (sinfo[z].right != z) {
108 scclist[phi[z]] = scc;
112 scclist[phi[z]] = scc;
132 template<
class View,
bool Perm>
147 for (
int i = 0;
i < xs;
i++) {
149 int xmin = x[
i].min();
158 while (y[start].
max() < xmin) {
159 start = sinfo[start].
right;
178 y[start].min() != x[
i].min());
180 int ptau = tau[xs - 1 -
i];
181 int xmax = x[ptau].max();
190 while (y[start].
min() > xmax) {
191 start = sinfo[start].
left;
197 ModEvent me_pub = z[ptau].lq(home, start);
201 nofix |= (
me_modified(me_pub) && start != z[ptau].max());
209 y[start].max() != x[ptau].max());
228 int phi[],
int phiprime[],
bool& nofix) {
229 for (
int i=x.
size();
i--; ) {
235 x[phiprime[
i]].min() != y[
i].min());
242 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.
T & top(void) const
Return element on top of stack.
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 .
int ModEvent
Type for modification events.
void computesccs(Space &home, ViewArray< View > &x, ViewArray< View > &y, int phi[], SccComponent sinfo[], int scclist[])
Compute the sccs of the oriented intersection-graph.
bool empty(void) const
Test whether stack is empty.
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.
Representation of a strongly connected component.
void reset(void)
Reset stack (pop all elements)
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 .
Node * x
Pointer to corresponding Boolean expression node.
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.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
bool me_failed(ModEvent me)
Check whether modification event me is failed.