36 namespace Gecode {
namespace Int {
namespace ViewValGraph {
41 : view(NULL), val(NULL), n_view(0), n_val(0),
count(1U) {}
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()) {
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;
void push(const T &x)
Push element x on top of stack.
Edge< View > * val_edges(void) const
Return first edge of all value edges.
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.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i({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.
Edge< View > ** val_edges_ref(void)
Return pointer to first edge fields of all value edges.
Value nodes in view-value graph.
Stack with fixed number of elements.
View view(void) const
Return view.
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.
ExecStatus purge(Space &home, Propagator &p, TaskArray< OptTask > &t)
Purge optional tasks that are excluded and possibly rewrite propagator.
const int * e
Arrays of edges (as vertex pairs)
Base-class for nodes (both view and value nodes)