40 namespace Gecode {
namespace Int {
namespace ViewValGraph {
45 : view(NULL), val(NULL), n_view(0), n_val(0),
count(1U) {}
59 while (xi() && (*
v != NULL)) {
60 if ((*v)->val() == xi.val()) {
64 v = (*v)->next_val_ref();
66 }
else if ((*v)->val() < xi.val()) {
68 v = (*v)->next_val_ref();
100 if (!e->
val(
x)->matching()) {
104 x = m.
pop(); e =
x->iter;
105 e->
val(
x)->matching()->revert(e->
val(
x));
119 x = e->
val(
x)->matching()->view(e->
val(
x));
126 x = m.
pop(); e =
x->iter;
goto next;
135 if (
count > (UINT_MAX >> 1)) {
137 for (
int i=n_view;
i--; )
153 unsigned int cnt0 =
count;
154 unsigned int cnt1 =
count;
156 for (
int i = n_view;
i--; )
177 if (e->
dst(w)->low < w->
min)
192 if (!visit.
empty()) {
193 w=visit.
pop(); e=w->
iter;
goto next;
void push(const T &x)
Push element x on top of stack.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
Edge< View > ** next_edge_ref(void)
Return reference to next edge in list of value edges.
bool empty(void) const
Test whether stack is empty.
Value iterator for integer views.
Edges in view-value graph.
ValNode< View > ** next_val_ref(void)
Return pointer to next value node fields.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Edge< View > * next_edge(void) const
Return next edge in list of value edges.
View nodes in view-value graph.
Edge< View > * next(void) const
Return next edge in list of edges per node.
Node< View > * dst(Node< View > *s) const
Return destination of edge when source s is given.
unsigned int low
Values for computing strongly connected components.
void revert(Node< View > *d)
Revert edge to node d for matching.
Graph(void)
Construct graph as not yet initialized.
ValNode< View > * val(ViewNode< View > *x) const
Return value node when view node x is given.
Edge< View > * edge_lst(void) const
Return last edge (organized by bi-links)
View-value graph base class.
Node * x
Pointer to corresponding Boolean expression node.
Value nodes in view-value graph.
Stack with fixed number of elements.
T pop(void)
Pop topmost element from stack and return it.
Gecode toplevel namespace
Edge< View > * edge_fst(void) const
Return first edge (organized by bi-links)
Edge< View > * iter
Next edge for computing strongly connected components.
FloatVal min(const FloatVal &x, const FloatVal &y)
Return minimum of x and y.
ExecStatus purge(Space &home, Propagator &p, TaskArray< OptTask > &t)
Purge optional tasks that are excluded and possibly rewrite propagator.
Base-class for nodes (both view and value nodes)