55 while (xi() && (*v != NULL)) {
56 if ((*v)->val() == xi.
val()) {
60 v = (*v)->next_val_ref();
62 }
else if ((*v)->val() < xi.
val()) {
64 v = (*v)->next_val_ref();
96 if (!e->
val(
x)->matching()) {
100 x = m.
pop(); e =
x->iter;
101 e->
val(
x)->matching()->revert(e->
val(
x));
115 x = e->
val(
x)->matching()->view(e->
val(
x));
122 x = m.
pop(); e =
x->iter;
goto next;
131 if (
count > (UINT_MAX >> 1)) {
133 for (
int i=0; i<
n_view; i++)
149 unsigned int cnt0 =
count;
150 unsigned int cnt1 =
count;
152 for (
int i=0; i<
n_view; i++)
173 if (e->
dst(w)->low < w->
min)
188 if (!visit.
empty()) {
189 w=visit.
pop(); e=w->
iter;
goto next;
Edges in view-value graph.
ValNode< View > * val(ViewNode< View > *x) const
Return value node when view node x is given.
Edge< View > * next_edge(void) const
Return next edge in list of value edges.
Edge< View > ** next_edge_ref(void)
Return reference to next edge in list of value edges.
Node< View > * dst(Node< View > *s) const
Return destination of edge when source s is given.
Edge< View > * next(void) const
Return next edge in list of edges per node.
void revert(Node< View > *d)
Revert edge to node d for matching.
Support::StaticStack< ViewNode< View > *, Region > ViewNodeStack
Stack used during matching.
void purge(void)
Purge graph if necessary (reset information to avoid overflow)
Graph(void)
Construct graph as not yet initialized.
void init(Space &home, ViewNode< View > *x)
Initialize the edges for the view node x.
unsigned int count
Marking counter.
ViewNode< View > ** view
Array of view nodes.
bool match(ViewNodeStack &m, ViewNode< View > *x)
Find a matching for node x.
int n_view
Number of view nodes.
int n_val
Number of value nodes.
void scc(void)
Compute the strongly connected components.
ValNode< View > * val
Array of value nodes.
Base-class for nodes (both view and value nodes)
Edge< View > * edge_fst(void) const
Return first edge (organized by bi-links)
Edge< View > * iter
Next edge for computing strongly connected components.
Edge< View > * edge_lst(void) const
Return last edge (organized by bi-links)
unsigned int low
Values for computing strongly connected components.
Value nodes in view-value graph.
ValNode< View > ** next_val_ref(void)
Return pointer to next value node fields.
View nodes in view-value graph.
Value iterator for integer views.
int val(void) const
Return current value.
Stack with fixed number of elements.
void push(const T &x)
Push element x on top of stack.
T pop(void)
Pop topmost element from stack and return it.
bool empty(void) const
Test whether stack is empty.
Support classes for propagators using a view-value 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 x